201224832 六、發明說明: 【發明所屬之技術領域】 本發明是有關於一種安全應用程式,特別是指一種基於 使用者安全權限載入類別到該應用程式。 【先前技術】 當在一裝置上引用一應用程式時,必須根據使用者的安 全權限來避免未經授權地存取該應用程式或該應用程式的 某些忐力。現有解決方式使用應用程式邏輯内或一安全模組 内的條件邏輯來決定受到保護的能力是否可被存取。然而, 若是意外地或是惡意地將權限設定錯誤,則受到保護的能力 即可被存取,假如實現那些能力的編碼對該應用冑式而言是 可見的。這在分散式應用程式中可能是一個嚴重的問題。 需要一種用於發展及/或提供安全應用程式的改良系統 及方法。 【發明内容】 因此’本發明之目的,即在提供—種用於在一應用程式 中載入-類別的方法,該方法包含決i類別需求,決定一 安全權限,提取與該安全權限關聯的該所需求類別的一類別 變數’及載入該所提取類別變數。 人一本發明之又-目的是提供—種應用程式該應用程式包 含一請求處置ϋ及至少-類職人器。該請求處置器可被組 配以處理-類別之-請求,及決定該應用程式的一安全權 :。邊類別載入器可被組配以根據該安全權限載入一類別變 201224832 本發明之再一目的是提供一種電腦可讀媒體該電腦可 »貝媒體包含由一處理器執行之電腦可執行指令該等指令在 被執行時,使該處理器解碼一安全標記從該安全標記決定 安全權限,選擇與該安全權限關聯之一類別儲存庫,及從 該所選擇類別儲存庫载入一類別。 本發明之功效在於提供一種基於該安全權限而載入應 用程式類別的系統與方法。 【實施方式】 有關本發明之前述及其他技術内容、特點與功效,在以 下配〇參考圖式之一個較佳實施例的詳細說明中,將可清楚 的呈現。 本發明用於載入應用程式類別的系統與方法之較佳實 &例如圖1所示,一應用程式包括已被載入且被使用以 執行該應㈣式10之功能的應靠式類別12。應用程式類 别2般疋利用一睛求處置器15内的一類別載入器丨4被 載入在本實施例十,該應用程式丨〇可被組配以具有被編 碼為一文全標記的一組安全權限。在該應用程式執行一 安全操作時,該請求處置器15可在呼叫程式中或是在一遠 端過程中截取則。本實施例之㈣載人H 14被組配以基 於被編碼在該安全標記中的該等權限載人類別的多個變 數。在該應用程式被安裝於一特定計算設備時在一使用者 執行-登人操作時,或藉由建立該使用者的安全憑證的任何 其匕手奴,該安全標記可被產生。在一分散式應用程式中, 該安全標記可利用經建立的用以執行遠端操作的機制,諸如 201224832 在傳遞過程間’透過—安全(經加密)連線的遠端調用。該類 別載入器14利用該等安全權限來決定該載入哪個變數。 種用於載入一類別的過程顯示在圖2的流程圖⑽ 中。在步驟UU,—將被載人類別的1求被產生。之後, 該應用程式的該等安全權限被評估(步冑1〇2)。t後與該 安全權限關聯的該所需求類別的—類別變數被提取(步驟 103)及被載入(步驟1〇4)。 權限的一特定組合被映射到類別 該組合可包括類別的一不同群組。然而,將被= 接接取的各該變數類別具有相同的名稱及名稱空間,且提供 相同的公開應用程式設計介面(Αρι)。變數類別的各該組合 被包括在一分離的儲存庫中,諸如儲存庫A 17(參閱圖〇、 儲存庫B 18等。該等類別儲存庫可位於㈣系統中或是透 過網路從一中央遠端伺服器得到。該類別載入器14利用該 等安全權限來決定從哪個儲存庫載入類別。在該應用程式需 要依據安全權限接取一類別時,該類別載入器將基於該應用 程式之權限從該適當的儲存庫載入該類別的一變數。這保護 該系統免於被意外或是惡意使用受到保護的能力。因為該類 別的各該變數具有正確的名稱空間且提供正確的公開 API,所以在該類別於該應用程式内被載入及引用時,該類 別將適當地執行。 該類別的一變數可被編碼以提供一完整能力,該完整能 力只可被具有管理安全權限的一使用者接取,而該相同類別 的另一變數可被編碼以提供一簡化功能,該簡化功能可被具 201224832 有唯讀安全權限的-使用者接取。舉例來說,—類別變數可 支援所有使用者帳號的建立及刪除,另__類別變數可支援更 新帳號資訊,而非建立或刪除,及—第三類別變數只可支援 目前使用者瀏覽帳號資訊。 圖3顯示一種用於藉由該應用程式執行一類別之調用 的過程200。在步驟2(U,該請求處置器15(參閱圖1}接收 該調用並且在步驟202從該調用解碼該安全標記。假設該 安全標記是有效的(步驟203),該類別載入器14從與該安全 標記所指示的該等安全權限匹配的該適當類別儲存庫提取 該類別變數(步驟204)。之後,該所提取類別可被使用以執 行該調用(步驟205)。 一種用於提取該類別實例的過程顯示於圖4的流程圖 300。在步驟301,基於所需求安全權限及正被執行的類別 操作,一類別需求被產生。若是如在步驟3〇2所決定的該類 別先前已被載入,且如在步驟303所決定的該類別的一實例 疋可用的,則該調用可被照常執行3〇5。若是該類別實例是 不可用的但先前已被載入’則在前進到執行該調用3〇5之 前’在步驟304該類別實例可被產生。若是該類別先前未被 載入(302),則在步驟306將被使用以載入該類別的該類別 載入器會被決定。在該應用程式裡,各該類別儲存庫可具有 一分離的類別載入器。這有助於適當防護該應用程式,並且 允許在相同應用程式過程中載入相同類別的多個變數。基於 該類別需求所指示的該等安全權限,諸如從該安全標記,該 類別載入器被決定。若是該所選擇類別載入器是可用的 201224832 (307),則該類別被載3〇 右疋如在步驟309所決定的該 類別被成功載入,則該類另,丨的 ^ . 類別的—實例被產生304,使得該調 用可被執行305。 在該應用程式被開啟時,其載入儲存於區域計算裝置中 之一組安全權限。該應用程式也被組配以知道類別儲存庫的 數目及各該儲存庫需求的權限。之後,該制程式初始化一 組安全類別載人器以從各該儲存庫載入類別。各該安全類別 載入器被減以從該等儲存庫中的—者載人類別,且知道該 儲存庫所需求的安全權限。如先前所提的,該物別儲存庫 可在該計算裝置中’或是透過—飼服器可遠端接取的。 該應用程式可以硬體、軟體、勒體或是硬體、軟體及/ 或勃體的-組合被實施。如圖5所示,在—硬體實施例中, 該應用程式可在操作上與-記憶體62關聯的—處理器Μ 上執行。如圖6所示,該記憶體62可儲存該處理器61可執 行的一指令組400❻該指令組允許該處理器61解碼一可被 儲存於該記憶體62裡之安全標記(步驟4〇1)。解碼完成後, 該處理器61可決定該安全標記所指示的一安全權限(步驟 402),並且之後選擇與該安全權限關聯之一類別儲存庫(步 驟403)。之後,該處理器61從該所選擇儲存庫載入一類別 (步驟404)。 該處理器61可與一第二處理器71,諸如與儲存許多類 別儲存庫的一記憶體72關聯的一類別儲存庫處理器通訊。 該應用程式處理器61可透過一適當的通訊連線65傳送類別 請求至該類別儲存庫處理器71。 7 201224832 综上所述’該用於載入應用程式類別的系統與方法用以 替代應用程式邏輯内或該安全模組内的條件邏輯,以決定是 否可接取該受.到保護的能力,避免該系統被意外或是惡意地 使用該受到保護的能力。 雖然本發明的實施例已在隨附的圖式中繪示且在以上 描述中說明,惟以上所述者,僅為本發明之較佳實施例而 已’當不能以此限定本發明實施之範圍,即大凡依本發明申 請專利範圍及發明說明内容所作之簡單的等效變化與修 飾,皆仍屬本發明專利涵蓋之範圍内.舉例來說,本發明之 月b力可全部及/或部分地以一或更多模塊、模組、處理器或 是記憶體執行。此外,這些能力可以目前方式或一分散方式 以及在或透過能提供及/或接收資訊的任何裝置被執行。進 一步,雖然以一特定方式描繪,但是各個模組或模塊可被重 新定位,且不脫離本發明的範圍。更進一步,雖然以一特定 方式描繪,但是較多或是較少數目的模組及連接可與本發明 一起使用,以實現本發明,提供額外的已知特徵給本發明, 及/或使本發明更有效率《此外,在各個模組間被傳送的資 訊可透過一資料網、網際網路、一網際網路協定網、一無線 源及一有線源中的至少一者或是透過複數協定在該等模組 間被傳送。 【圖式簡單說明】 圖1說明一應用程式結構; 圖2說明一種用於載入類別到圖丨應用程式的過程; 201224832 圖3說明一種用於執行一調用的過程; 圖4說明一種用於得到一類別實例的過程; 圖5說明用於執行該應用程式的一處理器及記憶體; 圖6說明圖5之處理器可執行的一指令組;及 圖7說明與一類別儲存庫處理器通訊的一應用程式處 理器。 S. 9 201224832 【主要元件符號說明】 10......... 應用程式結構 300 12......... 應用程式類別 301 〜309步驟 14......... 類別載入器 400 .......指令組 15......... 請求處置器 401 〜404步驟 17......... 儲存庫A 61._ .......應用程式處理器 18......... 儲存庫B 62·· .......記憶體 100....... 流程圖 65" .......通訊連線 101〜104 步驟 71.· .......類別儲存庫處理 200 ....... 過程 器 201-205 步驟 72·· .......記憶體 10201224832 VI. Description of the Invention: [Technical Field of the Invention] The present invention relates to a security application, and more particularly to a class that loads a category based on user security rights. [Prior Art] When an application is referenced on a device, unauthorized access to the application or some of the application's power must be avoided based on the user's security rights. Existing solutions use conditional logic within the application logic or within a security module to determine if the protected capability is accessible. However, if the permissions are set incorrectly or maliciously, the protected ability can be accessed, provided that the encoding of those capabilities is visible to the application. This can be a serious problem in a distributed application. There is a need for an improved system and method for developing and/or providing secure applications. SUMMARY OF THE INVENTION Therefore, the object of the present invention is to provide a method for loading a category in an application, the method comprising determining a security requirement, and extracting a security authority associated with the security authority. A category variable ' of the required category' and the extracted category variable. A person invented the invention - the purpose is to provide an application that includes a request for disposition and at least a class of workers. The request handler can be configured to process-category-requests and determine a security right for the application: The side class loader can be configured to load a category change according to the security right 201224832. A further object of the present invention is to provide a computer readable medium. The computer can include computer executable instructions executed by a processor. The instructions, when executed, cause the processor to decode a security token from the security token to determine security rights, select a category repository associated with the security authority, and load a category from the selected category repository. The effect of the present invention is to provide a system and method for loading application categories based on the security rights. The above and other technical contents, features and effects of the present invention will be apparent from the following detailed description of the preferred embodiments. A preferred embodiment of the system and method for loading an application category of the present invention is shown in FIG. 1. An application includes a dependent category that has been loaded and used to perform the function of Equation 4. 12. The application category 2 is loaded with a class loader 4 in the processor 15 in this embodiment, and the application can be configured to have a full mark. A set of security permissions. When the application performs a secure operation, the request handler 15 can intercept it in the calling program or during a remote process. The (4) manned H 14 of the present embodiment is configured with a plurality of variables based on the class of the rights manned being encoded in the security tag. The security token can be generated when the application is installed on a particular computing device, during a user-delegation operation, or by any of the hackers who establish the user's security credentials. In a distributed application, the security token can utilize a mechanism established to perform remote operations, such as 201224832, a remote call through a secure-secured (encrypted) connection during the delivery process. The class loader 14 uses the security permissions to determine which variable to load. The process for loading a category is shown in flowchart (10) of FIG. At step UU, a request for the manned category is generated. After that, the security permissions of the application are evaluated (step 1〇2). The category variable of the required category associated with the security right is extracted (step 103) and loaded (step 1〇4). A specific combination of permissions is mapped to a category The combination can include a different group of categories. However, each of the variable categories to be taken by = has the same name and namespace and provides the same public application design interface (Αρι). Each of the combinations of the variable categories is included in a separate repository, such as repository A 17 (see Figure 储存, Repository B 18, etc. These categories of repositories may be located in the (4) system or through a network from a central The remote server obtains. The category loader 14 uses the security permissions to determine from which repository the category is loaded. When the application needs to access a category based on security permissions, the category loader will be based on the application. The program's permissions load a variable of the category from the appropriate repository. This protects the system from being protected by accidental or malicious use. Because each variable of the category has the correct namespace and provides the correct The API is exposed so that when the category is loaded and referenced within the application, the category will be executed appropriately. A variable of the category can be encoded to provide a complete capability that can only be managed with security privileges One user picks up, and another variable of the same category can be encoded to provide a simplified function, which can be read by 201224832 with read-only security rights. - User access. For example, - category variables can support the creation and deletion of all user accounts, and other __ category variables can support updating account information instead of creating or deleting, and - the third category variable can only support The user currently views account information. Figure 3 shows a process 200 for performing a category call by the application. In step 2 (U, the request handler 15 (see Figure 1) receives the call and at step 202 Decoding the security token from the call. Assuming the security token is valid (step 203), the category loader 14 extracts the category variable from the appropriate category repository that matches the security permissions indicated by the security token ( Step 204). Thereafter, the extracted category can be used to perform the call (step 205). A process for extracting the category instance is shown in flowchart 300 of Figure 4. In step 301, based on the required security rights and The category operation being performed, a category requirement is generated. If the category has been previously loaded as determined in step 3〇2, and the category is determined as determined in step 303 An instance is available, then the call can be executed as usual. If the class instance is not available but has been previously loaded 'then before proceeding to execute the call 3〇5', the class instance is in step 304. Can be generated. If the category was not previously loaded (302), then the category loader that will be used to load the category will be determined in step 306. In the application, each category repository can be Has a separate category loader. This helps to properly protect the application and allows multiple variables of the same category to be loaded during the same application process. Based on the security permissions indicated by the category requirements, such as from The security token, the category loader is determined. If the selected category loader is available 201224832 (307), then the category is loaded and the category is successfully loaded as determined in step 309. Then, the class of the class is generated 304, so that the call can be executed 305. When the application is opened, it loads a set of security permissions stored in the regional computing device. The application is also configured to know the number of category repositories and the permissions for each of the repositories. The program then initializes a set of security class handlers to load categories from each of the repositories. Each of the security category loaders is decremented from the person-carrying category in the repository and knows the security permissions required by the repository. As previously mentioned, the object repository can be remotely accessed from the computing device or through the feeder. The application can be implemented in hardware, software, or a combination of hardware, software, and/or carousel. As shown in FIG. 5, in a hardware embodiment, the application can be executed on a processor 关联 that is operatively associated with the memory 62. As shown in FIG. 6, the memory 62 can store an instruction set 400 executable by the processor 61. The instruction set allows the processor 61 to decode a security token that can be stored in the memory 62 (step 4〇1). ). After decoding is complete, the processor 61 can determine a security right indicated by the security token (step 402) and then select a category repository associated with the security authority (step 403). Thereafter, the processor 61 loads a category from the selected repository (step 404). The processor 61 can be in communication with a second processor 71, such as a class repository processor associated with a memory 72 that stores a plurality of types of repositories. The application processor 61 can transmit a category request to the category repository processor 71 via an appropriate communication link 65. 7 201224832 In summary, the system and method for loading an application category is used to replace the conditional logic within the application logic or within the security module to determine whether the ability to receive the protection is acceptable. Avoid the system being protected from accidental or malicious use. Although the embodiments of the present invention have been illustrated in the accompanying drawings and are described in the foregoing description, the foregoing description The simple equivalent changes and modifications made by the present invention in the scope of the invention and the description of the invention are still within the scope of the invention. For example, the monthly b force of the present invention may be all and/or part of The ground is executed in one or more modules, modules, processors or memory. Moreover, these capabilities can be performed in a current or decentralized manner and at or through any device capable of providing and/or receiving information. Further, although depicted in a particular manner, various modules or modules may be repositioned without departing from the scope of the invention. Furthermore, although depicted in a particular manner, a greater or lesser number of modules and connections can be used with the present invention to implement the present invention, to provide additional known features to the present invention, and/or to enable The invention is more efficient. In addition, information transmitted between modules can be transmitted through at least one of a data network, the Internet, an Internet protocol network, a wireless source, and a wired source, or through a plurality of protocols. Transferred between these modules. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 illustrates an application structure; FIG. 2 illustrates a process for loading a category to a graphics application; 201224832 FIG. 3 illustrates a process for performing a call; FIG. 4 illustrates a method for Figure 1 illustrates a processor and memory for executing the application; Figure 6 illustrates an instruction set executable by the processor of Figure 5; and Figure 7 illustrates a class library processor An application processor for communication. S. 9 201224832 [Description of main component symbols] 10......... Application structure 300 12......... Application category 301 ~ 309 Step 14........ Category Loader 400.......Instruction Group 15......... Request Processors 401~404 Step 17......Repository A 61._ .. .....Application Processor 18.........Repository B 62·· . . . Memory 100....... Flowchart 65" .... ...communication connection 101~104 Step 71.·.......category repository processing 200.......Processor 201-205 Step 72·· .......Memory 10