WO2015027846A1 - 应用程序的权限确定方法和装置 - Google Patents

应用程序的权限确定方法和装置 Download PDF

Info

Publication number
WO2015027846A1
WO2015027846A1 PCT/CN2014/084797 CN2014084797W WO2015027846A1 WO 2015027846 A1 WO2015027846 A1 WO 2015027846A1 CN 2014084797 W CN2014084797 W CN 2014084797W WO 2015027846 A1 WO2015027846 A1 WO 2015027846A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
permission
permissions
shared user
permission list
Prior art date
Application number
PCT/CN2014/084797
Other languages
English (en)
French (fr)
Inventor
黄曦
吴黄伟
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to EP14840964.2A priority Critical patent/EP2993603B1/en
Publication of WO2015027846A1 publication Critical patent/WO2015027846A1/zh
Priority to US14/966,350 priority patent/US9971908B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/629Protecting access to data via a platform, e.g. using keys or access control rules to features or functions of an application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2145Inheriting rights or properties, e.g., propagation of permissions or restrictions within a hierarchy

Definitions

  • the application can access the user's address book, text message, photo and other information by applying the corresponding permission. After installing the new application, the user cannot know the risk brought by the newly installed application to the newly installed application, and the security is low.
  • the embodiment of the invention provides a method and a device for determining the permission of an application, so that the application cannot increase the permission of the application by adding a plug-in, thereby reducing the system risk.
  • the first application is a plug-in of the second application that is installed in the system
  • the first permission list according to the application of the first application and the second permission list corresponding to the first shared user identifier The permissions in the first application are determined.
  • the first privilege list according to the application of the first application and the privilege in a second privilege list corresponding to the first shared user identifier are determined.
  • the rights of the first application specifically include:
  • the first privilege list and the first shared user identifier according to the application of the first application Corresponding in the second permission list, determining the authority of the first application, determining the After the permissions of the first application, it also includes:
  • the tag information is set in the system installation file, and the tag information is used to indicate that the first application does not use the first shared user identifier.
  • the first privilege list of the application and the privilege in the second privilege list corresponding to the first shared user identifier further include:
  • a second aspect of the embodiments of the present invention provides an apparatus for determining rights of an application, including: a receiving module, configured to receive an installation request of a first application, where the installation request carries a first response Using the first privilege list of the application and the first shared user identifier requested by the first application; the searching module, configured to search, according to the first shared user identifier, at least the installed first shared user identifier that is installed in the system a second application;
  • a processing module configured to: if the first application is a plug-in of the second application that is installed in the system, the first permission list according to the application of the first application and the first shared user identifier The permissions in the second permission list determine the permissions of the first application.
  • the processing module is specifically configured to: determine, according to the rights of the first application, all the rights in the second rights list; or: The rights existing in the second rights list in the permission list are determined as the rights of the first application; or
  • the processing module is further configured to:
  • the processing module is further configured to:
  • the first application is not a plug-in of the second application, or the source of the first application is not an official market;
  • the first shared user identifier is allocated to the first application, and the first After the application permission of the application is determined as the permission of the first application, the processing module is further configured to: set label information in the system installation file, where the label information is used to indicate that the first application is not defective Using the first shared user identity.
  • the assigning the second shared user identifier to the first application After the application permission of the first application is determined as the permission of the first application, the processing module is further configured to: add the information of the first application to the system installation file.
  • the method further: determining the first application and the second The applied signing certificate is the same.
  • a third aspect of the embodiments of the present invention provides an apparatus for determining authority of an application, including: a memory and a processor, wherein the memory is in communication with the processor, the program code is stored in the memory, and the processor is used by the processor.
  • the method of any one of the first to fifth possible implementations of the first aspect is performed by invoking program code stored in the memory.
  • the method and device for determining the permission of the application program in the embodiment of the present invention the application plug-in installation request of the installed application, determining the application plug-in according to the permission of the application plug-in application and the permission list corresponding to the shared user identifier of the installed application. Permissions. Thereby improving the security of the system.
  • Embodiment 1 is a flowchart of Embodiment 1 of a method for determining an authority of an application according to the present invention
  • Embodiment 2 is a flowchart of Embodiment 2 of a method for determining an authority of an application according to the present invention
  • FIG. 3 is a flowchart of Embodiment 3 of a method for determining an authority of an application according to the present invention
  • 4 is a schematic structural diagram of an apparatus for determining an authority of an application program according to the present invention
  • FIG. 5 is a schematic structural diagram of another embodiment of an apparatus for determining authority of an application program according to the present invention.
  • FIG. 1 is a flowchart of Embodiment 1 of a method for determining an authority of an application according to the present invention.
  • a method for determining an authority of an application provided by an embodiment of the present invention may be applied to various user equipments, for example, a mobile phone, a PC. Machine, tablet (PAD), etc.
  • the execution subject of the method embodiment is a module or unit having a processing function in the above terminal device, for example, a central processing unit (CPU) or the like.
  • the method of this embodiment may include:
  • Step 101 Receive an installation request of the first application.
  • the installation request of the first application carries the first permission list and the first shared user identifier of the first application application;
  • Step 102 Search for at least one second application that is installed in the system and that uses the first shared user identifier according to the first shared user identifier.
  • the embodiments of the present invention are applicable to various operating systems, such as a Microsoft operating system, an Android (Android) operating system, and the like.
  • the permissions involved can usually refer to various access rights, such as: access to the user's address book, text messages, photos and other operations. If two or more applications use the same shared user ID ( sharedUser ld ), the permissions that these applications have are also shared.
  • the second application refers to an installed application in the system, and after the second application is installed in the system, the various plug-ins of the second application are downloaded, and the user is prompted to install.
  • the first application prompted by the system
  • the installation request carries the application permission of the first application.
  • the first shared user identifier (shareUer ld ) of the first application may be used to find the used first share recorded in the at least one system.
  • the application of the user identifier, that is, the second application, the second application may be one or multiple applications.
  • the second application that is installed in the corresponding system may be the second application by searching for the same application in the package and xml file as the shared identifier of the first application.
  • the installation package of the first application may include the application resource file, data, configuration file, execution file, signature information, and information of the certificate used for signature.
  • the following is an example of the Android system's .
  • a pk file The specifics of the a pk file are as follows:
  • the above directory structure is only an example. When implemented, some apks may not have one or some files or directories in the above directory;
  • the permissions that the application needs to use are declared in the AndroidManifes t. xml file in the application installation package, as follows:
  • the above statement indicates that the application is applying for permission to send text messages;
  • the application's sharedUser ld is also declared in the above file, as shown below:
  • the configuration file may include the name of the application, the permission to apply for the application, etc.
  • the information of the certificate used for the signature includes the public key of the certificate, the index of the certificate, the owner information of the certificate, and the encryption algorithm of the certificate.
  • the system may also scan and parse the application information to determine whether the first application is from the official market.
  • Step 103 If the first application is a plug-in of the second application that is installed in the system, determine the first one according to the first permission list of the application of the first application and the permission in the second permission list corresponding to the first shared user identifier. App permissions.
  • all the rights in the second permission list may be determined as the rights of the first application.
  • the right that exists in the second permission list in the first permission list may also be determined as the right of the first application.
  • all the rights in the first permission list may be determined as the rights of the first application if the user agrees, or the system confirms that there is no risk.
  • the technical solution of the method embodiment shown in FIG. 1 will be described in detail below with reference to specific embodiments. 4
  • the system has installed the first application X of the second application X.
  • the permission list corresponding to app.X includes the permissions al, a2, a3, a4.
  • the plug-in is downloaded in the background of the system, that is, the first application Y, and the permissions of the first application Y are a2, a3, a4, a5. It can be judged whether Y is from the official market, and if so, it can be further judged whether it is a plugin of X, and if so, all the permissions al, a2, a3, a4 in the permission list corresponding to com.app.X in the system can be determined. For the permission of Y; or, the rights a2, a3, and a4 existing in the permission list of the first application may be determined as the rights of Y, or may be in the case that the user agrees or the system confirms that there is no risk.
  • the permissions a2, a3, a4, a5 are determined as Y permissions. If it is judged that it is not from the official market or is not a plug-in for X, then a second shared user identifier can be reassigned to ⁇ , and only the permissions a2, a3, a4, a5 required by the application will be granted.
  • FIG. 2 is a flowchart of a second embodiment of a method for determining an authority of an application according to the present invention. As shown in FIG. 2, based on the embodiment shown in FIG. 1, the embodiment provides a method for determining an authority of an application and a plug-in installation. Detailed process. The method of this embodiment may include:
  • Step 201 Install a second application.
  • the suffix name of the installation file on the Android platform is generally ". apk” (the application software is rar or zip format, and needs to be installed after decompression).
  • There are three common installation methods for Android platform applications specifically : 1), using the Android (Android) system Market or also called the electronic market to download and install; 2), if the user's device already has "APK Installer", you can directly select the relevant application installation package through the "APK Installer” , to install. If there is no APK installer in the user's device, you can choose to download the software installer; 3) Install the app on the computer via USB connection.
  • the user selects the appropriate installation method according to the requirements to install the second application in the system.
  • Step 202 The second application downloads the first application by using a network, and requests to install the first application.
  • the second application downloads the first application in the background, and requests to install the first application.
  • the installation request of the first application carries the application permission of the first application.
  • Step 203 Search for the already-used system in the system according to the first shared user identifier in the information of the first application. At least one second application that uses the first shared user ID.
  • Step 204 Determine whether the source of the first application is an official market.
  • the first application is an official market
  • the application downloaded on the *. apk and the application attribute of the first application downloaded through the network are consistent, thereby determining whether the first application is from the official website.
  • Step 205 Whether the first application is a plugin for the second application.
  • the first application is a second application plug-in
  • Step 206 Determine permissions of the first application.
  • the specific step 205 further includes two specific steps, as follows:
  • Step 11 Determine all rights in the permission list corresponding to the first shared user identifier in the system as the rights of the first application;
  • Step 12 Determine, in the application permission of the first application, the permission that exists in the permission list corresponding to the first shared user identifier as the permission of the first application.
  • Step 207 Install the first application, add information of the first application to the system installation file, and add the first shared user identifier to the information of the first application.
  • the system installation files are installation information log files such as ackages, xml, package, list, etc.
  • Step 208 when the first application is an unofficial market and or a plug-in other than the second application, the permission is determined.
  • step 203, 204 it is determined that the first application is not from the official market, or is not a plug-in of the second application, and the user installs the processing method of the first application.
  • the method further includes the following steps:
  • Step 20 The system assigns a unique second user identifier to the first application, and determines the application right of the first application as the right of the first application;
  • Step 21 Set label information in the system installation file, where the label information is used to indicate that the first application does not use the first shared user identifier;
  • Step 22 Add the information of the first application to the system installation file.
  • the second application A is installed in an Android (Andro id) system, and the first user sharing identifier com. app. A of the second application A is Pl, P2, as follows Show:
  • the second application A downloads the first application B in the system background, the application B applies the rights P2, P3, P4, and requests to install the second application B;
  • the system responds to the request of the second application A to install the first application B, and starts the system installer to install the first application B, first detecting whether the source of the first application B is the official market. Specifically, the application signature certificate and the package name of the first application B are uploaded to the official market for comparison and comparison. If the inspection is passed, the application is in the official market. Otherwise, it is not;
  • the first application is from the official market, it can be further determined whether the first application B is a plug-in of the second application A, and the specific determination method may be:
  • the installation requires the first application to declare whether it is a plugin in the configuration file.
  • first application B generates a corresponding application icon, that is, whether it is a plug-in according to whether it can run independently; whether the first application B generates an application icon may be, check whether Have activity set
  • the application icon will be generated, otherwise it will not be generated. If the first application B is able to generate a corresponding application icon, the first application B is not the plug of the second application A, otherwise the first application B is the plug-in of the second application A.
  • the system specifically has three ways to determine the permission of the first application B: 1;), ignoring the new permission applied by the first application B, and only granting the first application B system Record the permissions in the corresponding sharedUserld permission list. That is, only the first application B rights Pl, P2 are granted. 2)
  • the rights granted in the permission list of sharedUserld in the permission applied by the first application B are granted to the first application B, P 1 is granted to the user or the system determines no risk.
  • the authority applied by the first application B is granted to the first application B, that is, 4 is granted the rights P2, P3, and P4.
  • the system may also display the foregoing two processing schemes to the user, and the user selects which processing manner to use, and the method for informing the user may be:
  • the dialog box displays two processing methods, prompting the user to select.
  • the first application B is processed as follows: 1), extracting and processing the information in the application installation package, ignoring The sharedUser ld information, the first application B is assigned a unique User Id; 2), the first application B is installed, and when the system installation is completed and the first application B information is recorded, the label is added to the packages, the xml file, and the label is marked first.
  • Application B is the excluded sharedUser ld application, as follows:
  • the information of the first application B is recorded into the packages, the xml file, and the application installation is completed.
  • FIG. 3 is a flowchart of Embodiment 3 of a method for determining rights of an application according to the present invention. As shown in FIG. 3, the difference between this embodiment and the embodiment shown in FIG. 2 is that the user is reminded in this embodiment that installing the first application increases the risk, and the user selects whether to install the first application.
  • the method of this embodiment may include: Step 301: Install a second application, and record related information of the second application.
  • the second application is A and the first application is B.
  • the related information specifically includes but is not limited to: the second application A name, the second application A's sharedUser ld, the second application A's permission information, etc.; assume that the second application A's sharedUser ld information is
  • the permission information is:
  • the sharedUserld information is added to the system record file packages, xml, including the permission list information of the sharedUserld.
  • Step 302 The second application downloads the first application by using a network, and requests to install the first application.
  • the information of the first application B includes, but is not limited to, the name of the first application B, the sharedUserld information of the first application B, and the rights information of the first application B.
  • the information recording form refers to the information recording form of the second application A in step 301.
  • Step 303 Extract all rights in the s ha r edU s e r I d permission list.
  • Step 304 Compare the permissions in the permission application and the permission list of the first application, and extract the newly added permissions.
  • the permission list information recorded by the first application B is:
  • Step 305 extract all the application information sharing this sharedUserld, inform the user that these should Use will increase the above new permissions.
  • xml record find the application whose sharedUser Id record is "com. app. A".
  • the method of informing the user may be: pop-up dialog box, displaying information of each application found above or a package named com. app. A, the information may be, the name of the application, the existing permissions of the application, the installation of the application Any or any combination of information such as location.
  • the information of the permission P3 is added to the prompt information and displayed to the user.
  • Step 306 After the user knows the risk, choose whether to install or not.
  • Step 307 Install the first application in a normal process.
  • Step 308 Abandon the installation of the first application.
  • FIG. 4 is a schematic structural diagram of an embodiment of an authority determining apparatus of an application program according to the present invention. As shown in FIG. 4, the apparatus of this embodiment may include:
  • the receiving module 41 is configured to receive an installation request of the first application, where the installation request carries the first permission list of the first application application and the first shared user identifier of the first application request;
  • the processing module 43 is configured to: if the first application is a plug-in of the second application installed in the system, according to the first permission list of the application of the first application and the permission in the second permission list corresponding to the first shared user identifier, Determine the permissions of the first app.
  • processing module 43 is further configured to:
  • processing module 43 is further configured to:
  • the first application is not a plug-in of the second application, or the source of the first application is not an official market; assigning a second shared user identifier to the first application, and determining the application right of the first application as the right of the first application.
  • the processing module 43 is further configured to:
  • the tag information is set in the system installation file, and the tag information is used to indicate that the first application does not use the first shared user identity.
  • the processing module 43 is further configured to:
  • the permission determining apparatus of the application is further configured to: after receiving the installation request of the first application:
  • the apparatus for determining the rights of the application provided in this embodiment corresponds to the method embodiment provided in FIG. 1, FIG. 2, and FIG. 3, and the method for executing the method embodiments shown in FIG. 1, FIG. 2, and FIG.
  • the principle, and the technical effect of the device to perform the permission determination refer to the method embodiment, and details are not described herein again.
  • FIG. 5 is a schematic structural diagram of still another embodiment of an authority determining apparatus of an application program according to the present invention.
  • the method includes: a memory and a processor, the memory is in communication with the processor, the program code is stored in the memory, and the processor is configured to call the program code stored in the memory, and is used to execute the method embodiment shown in FIG. 1, FIG. 2, FIG.
  • the technical solution, the method, the principle, and the technical effect of the apparatus for performing the authority determination can be referred to the method embodiment, and details are not described herein again.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the above-described method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as ROM, RAM, disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Stored Programmes (AREA)

Abstract

本发明实施例提供一种应用程序的权限确定方法和装置。本发明应用程序的权限确定方法,包括:接收第一应用的安装请求,安装请求中携带第一应用的申请的第一权限列表和第一应用请求的第一共享用户标识,根据第一共享用户标识查找系统中已安装的使用第一共享用户标识的至少一个第二应用,若第一应用为系统中已安装的第二应用的插件,则根据第一应用的申请的第一权限列表和第一共享用户标识对应的第二权限列表中的权限,确定第一应用的权限。本发明实施例让应用无法通过增加插件来增加应用的权限,降低了系统风险,提高了系统的安全性。

Description

应用程序的权限确定方法和装置
本申请要求于 2013年 8月 28 日提交中国专利局, 申请号为
201310382219. 8 , 发明名称为 "应用程序的权限确定方法和装置" 的中国专 利申请, 其全部内容通过引用结合在本申请中。 技术领域
本发明实施例涉及信息技术领域, 尤其涉及一种应用程序的权限确定方 法和装置。
背景技术
安卓 (Android ) 系统正在成为全球最受欢迎的应用平台之一。 Android 平台的开发性是其众多优势之一, 开发的平台允许任何移动终端厂商加入到 Android应用开发中来。 显著的开放性可以使其拥有更多的开发者, 随着用户 和应用的日益丰富, Android平台的应用特别丰富。 这些不同的应用能够满足 不同用户的各种需求, 给了用户更多的体验。
Android操作系统有一套共享用户标识( sharedUser Id )的机制, 在安装 应用安装包. apk文件到系统之后, 该应用会在后台下载应用插件, 并提示用 户安装下载的应用插件, 若用户选择安装插件并且应用插件要求共享用户标 识, 则会判断系统当前 packages, xml文件中如果已记录的相同的 sharedUser ld , 则会提取系统已有的 sharedUser ld对应的签名证书信息, 并 且签名证书信息一致时, 则允许待安装应用与已安装使用同一个 sharedUser ld , 并将待安装应用的所申请的所有权限提取出来, 添加到 shareduser ld的权限列表中, 就可以与已安装的应用共用一个 sharedUser ld, 从而达到与已安装应用共享权限的目的, 原应用同时也具有新应用的所有权 限。
新安装的应用与已安装的应用共享 sharedUser ld时, 若用户选择安装, 应用可以通过申请相应的权限来访问用户的通讯录, 短信, 照片等信息, 用 户在安装了新的应用后, 无法知晓新安装应用给已安装应用新增权限带来的 风险, 安全性低。
发明内容
本发明实施例提供一种应用程序的权限确定方法和装置, 使的应用无法 通过增加插件来增加应用的权限, 降低了系统风险。
本发明实施例第一方面提供一种应用程序的权限确定方法, 包括: 接收第一应用的安装请求, 所述安装请求中携带第一应用申请的第一权 限列表和所述第一应用请求的第一共享用户标识;
根据所述第一共享用户标识查找系统中已安装的使用所述第一共享用户 标识的至少一个第二应用;
若所述第一应用为系统中已安装的所述第二应用的插件, 则根据所述第 一应用的申请的所述第一权限列表和所述第一共享用户标识对应的第二权限 列表中的权限, 确定所述第一应用的权限。
在第一方面的第一种可能的实施方式中, 所述根据所述第一应用的申请 的所述第一权限列表和所述第一共享用户标识对应的第二权限列表中的权 限, 确定所述第一应用的权限, 具体包括:
将系统中所述第二权限列表中的所有权限确定为所述第一应用的权限; 或者,
将所述第一权限列表中存在于所述第二权限列表中的权限确定为所述第 一应用的权限; 或者,
将所述第一权限列表中的所有权限确定为所述第一应用的权限。
结合第一方面的第一种可能的实施方式, 在第一方面的第二种可能的实 现方式中, 根据所述第一应用的申请的所述第一权限列表和所述第一共享用 户标识对应的第二权限列表中的权限, 确定所述第一应用的权限, 确定所述 第一应用的权限之后, 还包括:
将所述第一应用的信息添加至系统安装文件中, 并将所述第一共享用户 标识添加至所述第一应用的信息中。
结合第一方面, 在第一方面的第三种可能的实施方式中, 所述根据所述 第一共享用户标识查找系统中已安装的使用所述第一共享用户标识的第二应 用之后, 还包括:
若所述第一应用不是所述第二应用的插件, 或者所述第一应用的来源不 是官方市场;
为所述第一应用分配第二共享用户标识, 将所述第一应用的申请权限确 定为所述第一应用的权限。
结合第一方面的第三种可能的实施方式, 在第一方面的第四种可能的实 施方式中, 所述为所述第一应用分配所述第二共享用户标识, 将所述第一应 用的申请权限确定为所述第一应用的权限之后, 还包括:
在系统安装文件中设置标签信息, 标签信息用于指示所述第一应用不釆 用所述第一共享用户标识。
结合第一方面的第三、 第四种可能的实施方式, 在第一方面的第五种可 能的实施方式中, 所述为所述第一应用分配所述第二共享用户标识, 将所述 第一应用的申请权限确定为所述第一应用的权限之后, 还包括: 将所述第一 应用的信息添加至系统安装文件中。
结合第一方面的第一、 二、 三、 四和五种可能的实施方式中的任一实施 方式, 在第一方面的第六种可能的实施方式中, 所述根据所述第一应用的申 请的所述第一权限列表和所述第一共享用户标识对应的第二权限列表中的权 限, 确定所述第一应用的权限之前, 还包括:
确定所述第一应用与所述第二应用的签名证书相同;
本发明实施例的第二个方面提供了一种应用程序的权限确定装置, 包 括: 接收模块, 用于接收第一应用的安装请求, 所述安装请求中携带第一应 用申请的第一权限列表和所述第一应用请求的第一共享用户标识; 查找模块, 用于根据所述第一共享用户标识查找系统中已安装的使用所 述第一共享用户标识的至少一个第二应用;
处理模块, 用于若所述第一应用为系统中已安装的所述第二应用的插 件, 则根据所述第一应用的申请的所述第一权限列表和所述第一共享用户标 识对应的第二权限列表中的权限, 确定所述第一应用的权限。
在第二方面的第一种可能的实施方式中, 所述处理模块具体用于: 将所述第二权限列表中的所有权限确定为所述第一应用的权限; 或者, 将所述第一权限列表中存在于所述第二权限列表中的权限确定为所述第 一应用的权限; 或者,
将所述第一权限列表中的所有权限确定为所述第一应用的权限。
结合第二方面的第一种可能的实施方式, 在第二方面的第二种可能的实 现方式中, 所述处理模块还用于:
将所述第一应用的信息添加至系统安装文件中, 并将所述第一共享用户 标识添加至所述第一应用的信息中。
结合第二方面, 在第二方面的第三种可能的实施方式中, 在判断所述第 一应用是否为系统中已安装的所述第二应用的插件之后, 所述处理模块还用 于:
若所述第一应用不是所述第二应用的插件, 或者所述第一应用的来源不 是官方市场;
为所述第一应用分配第二共享用户标识, 将所述第一应用的申请权限确 定为所述第一应用的权限。
结合第二方面的第三种可能的实施方式, 在第二方面的第四种可能的实 施方式中, 在所述为所述第一应用分配所述第二共享用户标识, 将所述第一 应用的申请权限确定为所述第一应用的权限之后, 所述处理模块还用于: 在系统安装文件中设置标签信息, 标签信息用于指示所述第一应用不釆 用所述第一共享用户标识。
结合第二方面的第三、 第四种可能的实施方式, 在第二方面的第五种可 能的实施方式中, 在所述为所述第一应用分配所述第二共享用户标识, 将所 述第一应用的申请权限确定为所述第一应用的权限之后, 所述处理模块还用 于: 将所述第一应用的信息添加至系统安装文件中。
结合第二方面的第一、 二、 三、 四和五种可能的实施方式中的任一实施 方式, 在第二方面的第六种可能的实施方式中, 所述根据所述第一应用的申 请的所述第一权限列表和所述第一共享用户标识对应的第二权限列表中的权 限, 确定所述第一应用的权限之前还用于: 确定所述第一应用与所述第二应 用的签名证书相同。
本发明实施例的第三个方面提供了一种应用程序的权限确定装置, 包 括: 存储器和处理器, 所述存储器与所述处理器通信, 所述存储器中存储程 序代码, 且所述处理器用于调用所述存储器中存储的程序代码, 执行第一方 面的第一到五种可能的实施方式中的任一种所述的方法。
本发明实施例应用程序的权限确定方法和装置, 对于已安装的应用的应 用插件安装请求, 根据该应用插件申请的权限和已安装的应用的共享用户标 识对应的权限列表来确定该应用插件的权限。 从而提高系统的安全性。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明应用程序的权限确定方法实施例一的流程图;
图 2为本发明应用程序的权限确定方法实施例二的流程图;
图 3为本发明应用程序的权限确定方法实施例三的流程图; 图 4为本发明应用程序的权限确定装置实施例的结构示意图; 图 5为本发明应用程序的权限确定装置又一实施例的结构示意图。
具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明应用程序的权限确定方法实施例一的流程图, 如图 1所示, 本发明实施例提供的应用程序的权限确定方法, 可以适用于各种用户设备, 例如: 手机, PC机, 平板电脑(PAD )等。 方法实施例的执行主体是上述终端 设备中具有处理功能的模块或单元, 例如: 中央处理单元(CPU )等。 本实施 例的方法可以包括:
步骤 101、 接收第一应用的安装请求。
其中, 第一应用的安装请求中携带第一应用申请的第一权限列表和第一 共享用户标识;
步骤 102、根据第一共享用户标识查找系统中已安装的使用第一共享用户 标识的至少一个第二应用。
本发明实施例适用于各种操作系统,例如:微软操作系统,安卓( Android ) 操作系统等各种类型的操作系统。 其中涉及的权限通常可以是指各种访问权 限, 例如: 访问用户的通讯录, 短信, 照片等操作。 如果两个或两个以上的 应用使用同样的共享用户标识 ( sharedUser ld ) , 则这些应用所具有的权限 也共享。
其中, 第二应用是指系统中已安装的应用, 上述第二应用在安装到系统 之后, 会下载第二应用的各种插件, 并提示用户安装。 系统提示的第一应用 的安装请求中携带第一应用的申请权限。
由于某一应用与该应用的插件具有相同的共享标识 ( shareUer ld ) , 因 此, 可以根据第一应用的第一共享用户标识 ( shareUer ld ) , 查找出至少一 个系统中已记录的使用第一共享用户标识的应用, 也就是第二应用, 第二应 用可以是一个, 也可以是多个应用。
具体的, 对应系统中已安装的第二应用, 可以通过查找 packages, xml文 件中与第一应用的共享标识相同的应用, 即为第二应用。 需要说明的是, 第 一应用的安装包. apk ( android package )文件中可以包括应用的资源文件, 数据, 配置文件, 执行文件, 签名信息, 签名时使用的证书的信息等内容。 以下以安卓系统的 . a pk文件为例进行说明, . a pk文件的具体如下:
S. Apk
—res (资源文件 )
— META-INF (签名信息及签名时使用的证书文件目录)
Manifes t, xml (哈希表)
—— CERT. SF (对 Manifes t中哈希值的哈希)
—— CERT. RSA (签名后的哈希值以及签名时使用的证书的信息)
— l ib (库文件目录)
—as set s (经过编译的资源文件目录 )
—c las ses, dex (应用的可执行文件)
— AndroidManifes t. xml (应用的清单文件 )
以上目录结构只是一个实例, 具体实现时, 某些 apk可能不具有上述目录 中的某个或某些文件或目录;
Android操作系统中, 应用需要使用的权限要在应用安装包中的 AndroidManifes t. xml文件中声明 , 如下所示:
<uses-permi s s ion android: name=" SEND—SMS" />
上面的声明表示应用申请使用发送短信的权限; 应用的 sharedUser ld也在上述文件中声明, 如下所示:
<manif es t xmlns : android= " ht tp: / / schemas. android, com/ apk/ res/android"
Package=" com. tes t, ac t ivi tynew"
android: vers ionCode=" 2"
android: vers ionName=" 2. 0"
android: shareUser Id=" com. tes t, ac t ivi ty" >
上面 sharedUser Id= "com. tes t, act ivi ty"就表示该应用的 sharedUser ld 是 com. tes t. act ivi ty。
其中, 配置文件可以包括应用的名称, 应用所需要申请的权限等, 签名 时使用的证书的信息包括证书的公钥, 证书的索引, 证书的所有者信息, 以 及证书的加密算法等。
可选的, 安装过程中, 系统还可以扫描解析应用的信息, 判断第一应用 是否来源于官方市场。
步骤 103、 若第一应用为系统中已安装的第二应用的插件, 则根据第一应 用的申请的第一权限列表和第一共享用户标识对应的第二权限列表中的权 限, 确定第一应用的权限。
作为一种可行的实施方式, 可以将将第二权限列表中的所有权限确定为 第一应用的权限。
作为另一种可行的实施方式, 还可以将将第一权限列表中存在于第二权 限列表中的权限确定为第一应用的权限。
作为再一种可行的实施方式, 还可以在用户同意, 或系统确认无风险的 情况下, 将第一权限列表中的所有权限确定为第一应用的权限。
本发明实施例应用程序的权限确定方法和装置, 对于已安装的应用的应 用插件安装请求, 根据该应用插件申请的权限和已安装的应用的共享用户标 识对应的权限列表来确定该应用插件的权限。 从而提高系统的安全性。 下面釆用具体的实施例, 对图 1所示方法实施例的技术方案进行详细说 明。 4叚设系统已安装了第二应用 X第二应用 X的第一共享用户标识 com. app.X 对应的权限列表中包括权限 al、 a2、 a3、 a4。 第二应用 X安装后在系统后台 下载插件, 即第一应用 Y, 第一应用 Y申请的权限为 a2、 a3、 a4、 a5。 可以 判断 Y是否来源于官方市场, 若是, 再可以进一步判断 Υ是否是 X的插件, 若是, 则可以将系统中 com.app.X对应的权限列表中的所有权限 al、 a2、 a3、 a4确定为 Y的权限; 或者, 还可以将第一应用的申请权限中存在于权限列表 中的权限 a2、 a3、 a4确定为 Y的权限, 又或者, 可以在用户同意或系统确认 无风险的情况下, 将权限 a2、 a3、 a4、 a5确定为 Y的权限。 若判断 Υ不是来 源于官方市场或者不是 X的插件, 则可以为 Υ重新分配一个第二共享用户标 识, 将只授予应用 Υ要求的权限 a2、 a3、 a4、 a5。
图 2为本发明应用程序的权限确定方法实施例二的流程图, 如图 2所示, 在图 1所示实施例的基础上, 本实施例提供了应用程序的权限确定方法以及 插件安装的详细过程。 本实施例的方法可以包括:
步骤 201、 安装第二应用。
在安卓(Android)平台上安装文件的后缀名一般为 ". apk" (也有应用 软件是 rar或者 zip格式的, 需要解压之后再安装) , 安卓平台应用常用的 安装方法一共有三种, 具体地: 1 ) 、 使用安卓(Android) 系统的 Market或 者也叫电子市场中下载安装; 2 ) 、 若用户的设备中已有 "APK安装器" , 可 直接通过 "APK安装器" 选择相关应用安装包, 进行安装。 若用户的设备中无 APK安装器, 可选择下载软件安装器; 3)、 通过 USB连接在电脑上安装应用。
首先, 用户根据需求选择合适的安装方式在系统中安装第二应用。
步骤 202、 第二应用使用网络下载第一应用, 并请求安装第一应用。
用户在应用运行第二应用时, 第二应用在后台下载第一应用, 并请求安 装第一应用, 第一应用的安装请求中携带第一应用的申请权限。
步骤 203、根据第一应用的信息中的第一共享用户标识查找系统中的已经 使用此第一共享用户标识的至少一个第二应用。
步骤 204、 判断第一应用的来源是否为官方市场。
其中判断第一应用是否为官方市场, 通常有如下几种方式: 1 ) 、 检查第 一应用的关于 (about ) ,找到官方市场的网站, 下载安装文件 *. apk,通过搜 索引擎, 搜索到官方市场网站, 进行对比; 2 ) 、 通过应用助手获取到第一应 用的软件名称, 应用包名, 软件版本, 文件大小, 软件权限等应用信息, 确 定是否来源于官方市场; 3 ) 、 对比从官网上下载的应用 *. apk和通过网络下 载的第一应用的应用属性是否一致, 从而确定第一应用是否来源于官方网 站。 (4 ) 、 将第一应用的签名信息及安装包中文件的哈希值传送到应用服务 器(可以是 Goog le Play, 也可以是第三方服务器)进行签名和哈希值对比; 步骤 205、 判断第一应用是否为第二应用的插件。
判断第一应用是否为第二应用插件通常有以下几种判断方法: 1 ) 、 检测 配置文件中是否声明第一应用为插件; 2 )、 检查第一应用是否会生成应用图 标等。 通过这样的方式可以判断第一应用是否为插件; 3 )检查第一应用配置 文件中是否有声明了 <ca tegory
android: name=" android. intent, ca tegory. LAUNCHER" />的 act ivi ty。
步骤 206、 确定第一应用的权限。
本实施例中有两种方式可通过系统确定授予第一应用权限, 具体的步骤 205还包括两个具体的步骤, 如下:
步骤 11、 将系统中第一共享用户标识对应的权限列表中的所有权限确定 为第一应用的权限;
步骤 12、 将第一应用的申请权限中存在于第一共享用户标识对应的权限 列表中的权限确定为第一应用的权限。
步骤 207、 安装第一应用, 将第一应用的信息添加至系统安装文件中, 并 将第一共享用户标识添加至第一应用的信息中。
系统安装文件为像 ackages, xml , package, l i s t等安装信息记录文件。 步骤 208、 第一应用非官方市场和或非第二应用的插件时, 确定权限。 在步骤 203、 204判断第一应用并非来源于官方市场, 或者不是第二应用 的插件, 用户安装第一应用的处理办法, 具体的, 还包括如下步骤:
步骤 20、 系统为第一应用分配唯一的第二用户标识, 将第一应用的申请 权限确定为第一应用的权限;
步骤 21、 在系统安装文件中设置标签信息, 标签信息用于指示第一应用 不釆用第一共享用户标识;
步骤 22、 将第一应用的信息添加至系统安装文件中。
根据图 2中的步骤, 4叚设某安卓(Andro id ) 系统中安装了第二应用 A, 第二应用 A的第一用户共享标识 com. app. A对应的权限为 Pl、 P2, 如下所示:
<packagename=" com. huawe i. android, remotecont rol"
codePa th=" /sys tem/app/PhoneFinder. apk" na t iveLibraryPa th=" /da ta/da ta/com. huawe i. andro id, remotecontrol/ 1 ib" f lags=" 1"
f t=" 137c481adb0" i t=" 137c481adb0" ut=" 137c481adb0" vers ion=" 2206"
sharedUser Id=" 1001" >
安装第二应用 A, 第二应用 A在系统后台下载第一应用 B, 应用 B申请权 限 P2、 P3、 P4 , 并且请求安装第二应用 B;
系统响应第二应用 A安装第一应用 B的请求, 启动系统安装器安装第一 应用 B, 首先检测第一应用 B的来源是否为官方市场。 具体的, 将第一应用 B 的应用签名证书和包名等信息上传到官方市场进行检查对比, 若检查通过, 则是官方市场的应用, 否则, 不是;
若第一应用是来源于官方市场, 可以进一步判断第一应用 B是否为第二 应用 A的插件, 具体的判断方法可以是:
安装时要求第一应用在配置文件中声明是否为插件, 声明的格式可以为 下: <app-plug android: name=" true" >
<parent-app android: name=" parent_app-name" />
</app-plug>
当检测到有 app_plug标签且标签属性值为 true时, 则可以判定该第一 应用为一个插件; 否则, 不是插件。
另外, 还可以通过检查第一应用 B是否会生成对应的应用图标, 即根据 其是否可以独立运行来判断其是否为一个插件; 检查第一应用 B是否会生成 应用图标的方法可以是, 检查是否有 activity设置了
<category android: name="android. intent, category. LAUNCHER" />的 属性。
若有 activity设置了此属性, 则说明会生成应用图标, 否则, 不会生成。 如果第一应用 B能够生成对应的应用图标, 第一应用 B不是第二应用 A的插 件, 否则第一应用 B为第二应用 A的插件。
若第一应用 B为第二应用 A的插件, 系统具体有三种确定第一应用 B的 权限的方式: 1;)、 忽略第一应用 B申请的新的权限, 只授予第一应用 B系统 中记录的对应的 sharedUserld的权限列表中的权限。 即只授予第一应用 B权 限 Pl、 P2。 2)、 根据第一应用 B新申请的权限, 授予第一应用 B所申请的权 限中 sharedUserld的权限列表中已有的权艮 即授予第一应用 B权限 P 1 在用户同意或系统确定无风险时, 将第一应用 B所申请的权限授予第一应用 B, 即 4受予权限 P2、 P3、 P4。
可选的, 在判断第一应用 B是第二应用 A的插件后, 系统也可将上述两 种处理方案显示给用户, 由用户自己选择使用哪种处理方式, 告知用户的方 法可以为, 弹出对话框, 显示两种处理方式, 提示用户选择。
确定权限后, 安装第一应用 B, 记录第一应用 B的相关信息, 并将对应 sharedUserld添力。到应用 B的记录中, 如下:
<SharedUser Id android: name=" com. app. A" /> 若判断第一应用 B不是来源于官方市场, 或者第一应用 B不是第二应用 A 的一个插件, 将对第一应用 B做如下处理: 1 )、 提取和处理应用安装包中的 信息, 忽略 sharedUser ld信息, 为第一应用 B分配一个唯一的 User Id; 2)、 安装第一应用 B, 在系统安装完成并记录第一应用 B信息时, 在 packages, xml 文件中增加标签, 标记第一应用 B为被排除的 sharedUser ld应用, 如下:
<di sable-shareduid-app android: name= "app-B" />
在系统启动时, 当扫描到第一应用 B的安装包中有 sharedUser ld信息时, 一旦 packages, xml文件中有此标签记录, 就会忽略此 sharedUser ld信息, 并 且不会将第一应用 B添加到 sharedUser ld为 com. app. A的记录中, 第一应用 B不 会获得 com. app. A权限列表中的权限。
最后将第一应用 B的信息记录到 packages, xml文件中, 完成应用安装。 本发明实施例应用程序的权限确定方法和装置, 对于已安装的应用的应 用插件安装请求, 根据该应用插件申请的权限和已安装的应用的共享用户标 识对应的权限列表来确定该应用插件的权限。 让用户知晓新应用的安装风 险, 从而提高系统的安全性。
图 3为本发明应用程序的权限确定方法实施例三的流程图。 如图 3所示, 本实施例与图 2所示实施例的区别在于本实施例中提醒用户, 安装第一应用 会增加风险, 由用户选择是否安装第一应用。 本实施例的方法可以包括: 步骤 301、 安装第二应用, 记录第二应用的相关信息。
本实施例中假设第二应用为 A, 第一应用为 B。 相关信息具体包括但不限 于: 第二应用 A的名称, 第二应用 A的 sharedUser ld, 第二应用 A的权限信息等; 假定第二应用 A的 sharedUser ld信息为
<sharedUer Id android: name=" com. app. A" >
权限信息为:
<perm>
< i tern android: name=" android: permi s s ion. PI" /> <i tern android: name=" android: permission. P2" />
</ erm>
若第二应用 A包含 sharedUserld信息, 则将 sharedUserld信息添加到系统 记录文件 packages, xml中, 包括 sharedUserld的权限列表信息。
步骤 302、 第二应用使用网络下载第一应用, 并请求安装第一应用。 其中, 第一应用 B的信息包括但不限于: 第一应用 B的名称, 第一应用 B的 sharedUserld信息, 第一应用 B的权限信息。 信息记录形式参考步骤 301中第 二应用 A的信息记录形式。
根据第一应用 B的 s ha r eUe r I d信息以及系统记录的 s ha r e dU s e r I d信息, 判 断第一应用 B是否与系统其它应用共享相同的 sharedUserld;
步骤 303、 提取 s ha r edU s e r I d权限列表中的所有权限。
提取新增权限的方法举例如下:
系统 packages, xml中记录的 sharedUserld权限歹 'J表为:
<perm>
<i tern android: name=" android: permission. PI" />
<i tern android: name=" android: permission. P2" />
</ erm>
步骤 304、 对比第一应用申请的权限和权限列表中的权限, 提取出新增的 权限。
第一应用 B记录的权限列表信息为:
<perm>
<i tern android: name=" android: permission. PI" />
<i tern android: name=" android: permission. P3" />
</ erm>
则新增的权限为<1^6111 android: name=" android: permiss ion. P3" /> 步骤 305、 提取所有共享此 sharedUserld的应用信息, 告知用户, 这些应 用都会增加上述新增的权限。
提取所有共享此 s h a r e d U s e r I d的应用信息的具体的方法为:
根据 packages, xml记录, 查找 sharedUser Id记录为 "com. app. A"的应用。 告知用户的方法可以为, 弹出对话框, 显示每一个上面查找到的应用或 包名为 com. app. A的应用的信息,信息可以是,应用的名称,应用已有的权限, 应用的安装位置等信息的任一或其任意组合。 并将权限 P3的信息添加到提示 信息中, 显示给用户。
步骤 306、 用户知晓风险后选择是否安装
若用户选择安装则执行步骤 307 , 若选择否, 则执行步骤 308。
步骤 307、 正常流程安装第一应用。
步骤 308、 放弃安装第一应用。
步骤 309、 结束。
本发明实施例应用程序的权限确定方法和装置, 对于已安装的应用的应 用插件安装请求, 根据该应用插件申请的权限和已安装的应用的共享用户标 识对应的权限列表, 提醒用户安装风险, 从而提高系统的安全性。
图 4为本发明应用程序的权限确定装置实施例的结构示意图。 如图 4所 示, 本实施例的装置可以包括:
接收模块 41 , 用于接收第一应用的安装请求, 安装请求中携带第一应用 申请的第一权限列表和第一应用请求的第一共享用户标识;
查找模块 42 , 用于根据所述第一共享用户标识查找系统中已安装的使用 所述第一共享用户标识的至少一个第二应用; ;
处理模块 43 , 用于若第一应用为系统中已安装的第二应用的插件, 则根 据第一应用的申请的第一权限列表和第一共享用户标识对应的第二权限列表 中的权限, 确定第一应用的权限。
可选的, 处理模块 43具体用于:
将系统中第二权限列表中的所有权限确定为第一应用的权限; 或者, 将第一权限列表中存在于第二权限列表中的权限确定为第一应用的权 限; 或者,
将所述第一权限列表中的所有权限确定为所述第一应用的权限。
可选的, 处理模块 43还用于:
将第一应用的信息添加至系统安装文件中, 并将第一共享用户标识添加 至第一应用的信息中。
可选的, 处理模块 43还用于:
若第一应用不是第二应用的插件, 或者第一应用的来源不是官方市场; 为第一应用分配第二共享用户标识, 将第一应用的申请权限确定为第一 应用的权限。
可选的, 在为第一应用分配第二共享用户标识, 将第一应用的申请权限 确定为第一应用的权限之后, 处理模块 43还用于:
在系统安装文件中设置标签信息, 标签信息用于指示第一应用不釆用第 一共享用户标识。
可选的, 在为第一应用分配第二共享用户标识, 将第一应用的申请权限 确定为第一应用的权限之后, 处理模块 43还用于:
将第一应用的信息添加至系统安装文件中。
可选的, 本发明提供的应用程序的权限确定装置, 在接收第一应用的安 装请求之后, 还用于:
根据第一应用的签名证书和第二应用的签名证书是否一致, 判断第一应 用是否为第二应用的插件; 若一致, 则第一应用为第二应用的插件。
本实施例提供的应用程序的权限确定装置, 与本发明图 1、 图 2、 图 3所 提供的方法实施例相对应, 用于执行图 1、 图 2、 图 3所示方法实施例的技术 方案, 该装置执行权限确定的方法、 原理以及技术效果可参见方法实施例, 此处不再赘述。
图 5为本发明应用程序的权限确定装置又一实施例的结构示意图。如图 5 所示, 包括: 存储器和处理器, 存储器与处理器通信, 存储器中存储程序代 码, 且处理器用于调用存储器中存储的程序代码, 用于执行图 1、 图 2、 图 3 所示方法实施例的技术方案, 该装置执行权限确定的方法、 原理以及技术效 果可参见方法实施例, 此处不再赘述。
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算机可 读取存储介质中。 该程序在执行时, 执行包括上述各方法实施例的步骤; 而 前述的存储介质包括: R0M、 RAM, 磁碟或者光盘等各种可以存储程序代码的 介质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要求 书
1、 一种应用程序的权限确定方法, 其特征在于, 包括:
接收第一应用的安装请求, 所述安装请求中携带第一应用申请的第一权限 列表和所述第一应用请求的第一共享用户标识;
根据所述第一共享用户标识查找系统中已安装的使用所述第一共享用户标 识的至少一个第二应用;
若所述第一应用为系统中已安装的所述第二应用的插件, 则根据所述第一 应用的申请的所述第一权限列表和所述第一共享用户标识对应的第二权限列表 中的权限, 确定所述第一应用的权限。
2、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述第一应用的申 请的所述第一权限列表和所述第一共享用户标识对应的第二权限列表中的权 限, 确定所述第一应用的权限, 具体包括:
将所述第二权限列表中的所有权限确定为所述第一应用的权限; 或者, 将所述第一权限列表中存在于所述第二权限列表中的权限确定为所述第一 应用的权限; 或者,
将所述第一权限列表中的所有权限确定为所述第一应用的权限。
3、 根据权利要求 2所述的方法, 其特征在于, 所述根据所述第一应用的申 请的所述第一权限列表和所述第一共享用户标识对应的第二权限列表中的权 限, 确定所述第一应用的权限, 确定所述第一应用的权限之后, 还包括:
将所述第一应用的信息添加至系统安装文件中, 并将所述第一共享用户标 识添加至所述第一应用的信息中。
4、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述第一共享用户 标识查找系统中已安装的使用所述第一共享用户标识的第二应用之后, 还包括: 若所述第一应用不是所述第二应用的插件, 或者所述第一应用的来源不是 官方市场;
为所述第一应用分配第二共享用户标识, 将所述第一应用的申请权限确定 为所述第一应用的权限。
5、 根据权利要求 4所述的方法, 其特征在于, 所述为所述第一应用分配所 述第二共享用户标识, 将所述第一应用的申请权限确定为所述第一应用的权限 之后, 还包括:
在系统安装文件中设置标签信息, 所述标签信息用于指示所述第一应用不 釆用所述第一共享用户标识。
6、 根据权利要求 4或 5所述的方法, 其特征在于, 所述为所述第一应用分 配所述第二共享用户标识, 将所述第一应用的申请权限确定为所述第一应用的 权限之后, 还包括:
将所述第一应用的信息添加至系统安装文件中。
7、 根据权利要求 1-6任一项所述的方法, 其特征在于, 所述根据所述第一 应用的申请的所述第一权限列表和所述第一共享用户标识对应的第二权限列表 中的权限, 确定所述第一应用的权限之前, 还包括:
确定所述第一应用与所述第二应用的签名证书相同。
8、 一种应用程序的权限确定装置, 其特征在于, 包括:
接收模块, 用于接收第一应用的安装请求, 所述安装请求中携带第一应用 申请的第一权限列表和所述第一应用请求的第一共享用户标识;
查找模块, 用于根据所述第一共享用户标识查找系统中已安装的使用所述 第一共享用户标识的至少一个第二应用;
处理模块, 用于若所述第一应用为系统中已安装的所述第二应用的插件, 则根据所述第一应用的申请的所述第一权限列表和所述第一共享用户标识对应 的第二权限列表中的权限, 确定所述第一应用的权限。
9、 根据权利要求 8所述的装置, 其特征在于, 所述处理模块具体用于: 将所述第二权限列表中的所有权限确定为所述第一应用的权限; 或者, 将所述第一权限列表中存在于所述第二权限列表中的权限确定为所述第一 应用的权限; 或者, 将所述第一权限列表中的所有权限确定为所述第一应用的权限。
10、 根据权利要求 9所述的装置, 其特征在于, 所述处理模块还用于: 将所述第一应用的信息添加至系统安装文件中, 并将所述第一共享用户标 识添加至所述第一应用的信息中。
11、 根据权利要求 8所述的装置, 其特征在于, 所述处理模块还用于: 若所述第一应用不是所述第二应用的插件, 或者所述第一应用的来源不是 官方市场;
为所述第一应用分配第二共享用户标识, 将所述第一应用的申请权限确定 为所述第一应用的权限。
12、 根据权利要求 11所述的装置, 其特征在于, 在所述为所述第一应用分 配所述第二共享用户标识, 将所述第一应用的申请权限确定为所述第一应用的 权限之后, 所述处理模块还用于:
在系统安装文件中设置标签信息, 所述标签信息用于指示所述第一应用不 釆用所述第一共享用户标识。
13、 根据权利要求 11或 12所述的装置, 其特征在于, 在所述为所述第一 应用分配所述第二共享用户标识, 将所述第一应用的申请权限确定为所述第一 应用的权限之后, 所述处理模块还用于:
将所述第一应用的信息添加至系统安装文件中。
14、 根据权利要求 8-13任一项所述的装置, 其特征在于, 所述根据所述第 一应用的申请的所述第一权限列表和所述第一共享用户标识对应的第二权限列 表中的权限, 确定所述第一应用的权限之前, 还用于:
确定所述第一应用与所述第二应用的签名证书相同。
15、 一种应用程序的权限确定装置, 其特征在于, 包括: 存储器和处理器, 所述存储器与所述处理器通信, 所述存储器中存储程序代码, 且所述处理器用 于调用所述存储器中存储的程序代码, 执行如权利要求 Γ7任一项所述的方法。
PCT/CN2014/084797 2013-08-28 2014-08-20 应用程序的权限确定方法和装置 WO2015027846A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP14840964.2A EP2993603B1 (en) 2013-08-28 2014-08-20 Permission determining method and device for application program
US14/966,350 US9971908B2 (en) 2013-08-28 2015-12-11 Method and apparatus for determining permission of application program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310382219.8 2013-08-28
CN201310382219.8A CN104424423B (zh) 2013-08-28 2013-08-28 应用程序的权限确定方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/966,350 Continuation US9971908B2 (en) 2013-08-28 2015-12-11 Method and apparatus for determining permission of application program

Publications (1)

Publication Number Publication Date
WO2015027846A1 true WO2015027846A1 (zh) 2015-03-05

Family

ID=52585556

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/084797 WO2015027846A1 (zh) 2013-08-28 2014-08-20 应用程序的权限确定方法和装置

Country Status (4)

Country Link
US (1) US9971908B2 (zh)
EP (1) EP2993603B1 (zh)
CN (1) CN104424423B (zh)
WO (1) WO2015027846A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886711A (zh) * 2015-12-15 2017-06-23 北京奇虎科技有限公司 权限请求响应方法及相应的装置
CN106125887A (zh) * 2016-06-22 2016-11-16 乐视控股(北京)有限公司 一种权限检测的方法及电子设备
US10346189B2 (en) * 2016-12-05 2019-07-09 Red Hat, Inc. Co-locating containers based on source to improve compute density
CN108415786B (zh) * 2018-03-13 2022-05-31 联想(北京)有限公司 信息处理方法及装置、电子设备和计算机可读介质
US10831904B2 (en) * 2018-04-09 2020-11-10 International Business Machines Corporation Automatically discovering attribute permissions
CN110908728B (zh) * 2018-09-15 2021-04-09 Oppo广东移动通信有限公司 权限配置方法及相关产品
WO2020132876A1 (zh) * 2018-12-25 2020-07-02 奇安信安全技术(珠海)有限公司 一种操作检测方法、系统及电子设备
CN109725952B (zh) * 2019-01-07 2021-09-24 深圳市网心科技有限公司 一种应用程序插件化的方法、系统以及相关装置
CN110929233B (zh) * 2019-11-22 2022-11-15 连尚(新昌)网络科技有限公司 信息处理方法和装置
CN111522560A (zh) * 2020-04-21 2020-08-11 北京三快在线科技有限公司 软件安装方法、装置、存储介质及电子设备

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609267A (zh) * 2012-02-16 2012-07-25 深圳市酷开网络科技有限公司 基于安卓浏览器的插件管理方法及系统

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151643A (en) * 1996-06-07 2000-11-21 Networks Associates, Inc. Automatic updating of diverse software products on multiple client computer systems by downloading scanning application to client computer and generating software list on client computer
US6438600B1 (en) * 1999-01-29 2002-08-20 International Business Machines Corporation Securely sharing log-in credentials among trusted browser-based applications
KR100601633B1 (ko) * 2000-04-26 2006-07-14 삼성전자주식회사 디지털 컨텐츠의 다단계 유통 시스템 및 방법
US7149510B2 (en) * 2002-09-23 2006-12-12 Telefonaktiebolaget Lm Ericsson (Publ) Security access manager in middleware
US8856859B2 (en) 2007-02-06 2014-10-07 Blackberry Limited System and method for setting application permissions
JP4766038B2 (ja) * 2007-11-29 2011-09-07 コニカミノルタビジネステクノロジーズ株式会社 画像処理装置の管理プログラム、画像処理装置の管理装置、および画像処理装置の管理方法
US9378512B2 (en) * 2008-04-02 2016-06-28 Microsoft Technology Licensing, Llc Interaction between ads and applications
JP5620781B2 (ja) * 2010-10-14 2014-11-05 キヤノン株式会社 情報処理装置、その制御方法、及びプログラム
US8978106B2 (en) * 2011-03-21 2015-03-10 Microsoft Technology Licensing, Llc Programming, verifying, visualizing, and deploying browser extensions with fine-grained security policies
CN102289633A (zh) 2011-09-02 2011-12-21 广东欧珀移动通信有限公司 Android平台下的应用程序动态权限管理方法

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609267A (zh) * 2012-02-16 2012-07-25 深圳市酷开网络科技有限公司 基于安卓浏览器的插件管理方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG, WEI. ET AL.: "The System based on the Android Principle Analysis of Malicious Program", NETINFO SECURITY, 31 October 2012 (2012-10-31), pages 72, XP055258286, DOI: 10.3969/J.ISSN.1671-1122.2012.10.017 *

Also Published As

Publication number Publication date
EP2993603B1 (en) 2020-05-13
CN104424423A (zh) 2015-03-18
CN104424423B (zh) 2018-06-19
EP2993603A4 (en) 2016-07-06
US20160098570A1 (en) 2016-04-07
EP2993603A1 (en) 2016-03-09
US9971908B2 (en) 2018-05-15

Similar Documents

Publication Publication Date Title
WO2015027846A1 (zh) 应用程序的权限确定方法和装置
JP5830102B2 (ja) 取得ファイルの評判チェック
US10871953B2 (en) Application update method and apparatus
KR101723937B1 (ko) 애플리케이션 보안 검증을 위한 클라우드 지원형 방법 및 서비스
AU2016404863B2 (en) Patch-upgrade-based file processing method and apparatus, terminal, and storage medium
US10019558B2 (en) Controlling licensable features of software using access tokens
KR101384085B1 (ko) 보안 브라우저 기반 애플리케이션
CN109462601B (zh) 基于eSIM的多平台访问方法及装置
US20150378714A1 (en) Providing Context-Specific Software Updates to Client Applications
JP2015531502A (ja) アプリケーション用の中間言語コードからネイティブコードを生成すること
JP6018316B2 (ja) 端末認証登録システム、端末認証登録方法およびプログラム
TW201814509A (zh) 實現網路頁面與本體應用通信的方法、裝置和電子設備
CN103744686A (zh) 智能终端中应用安装的控制方法和系统
US20140006598A1 (en) Methods, apparatuses and computer program products for facilitating dynamic origin-based domain allocation
US9513762B1 (en) Static content updates
KR20110125698A (ko) 웹 어플리케이션 실행을 위한 보안 제공 장치 및 방법
CN103544434A (zh) 用于确保应用程序安全运行的方法和终端
US20240281234A1 (en) Method, apparatus, electronic device and storage medium for installing applications across systems
US20180260538A1 (en) Timestamped license data structure
CN110928571A (zh) 业务程序开发方法和装置
US20200302035A1 (en) Source-based authentication for a license of a license data structure
US11244031B2 (en) License data structure including license aggregation
KR20150057328A (ko) 어플리케이션 업데이트 방법 및 이를 지원하는 단말
CN104751046A (zh) 一种应用程序的用户认证方法及移动终端设备
WO2017220014A1 (zh) 系统权限管理方法、装置及智能终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14840964

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2014840964

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE