WO2022193494A1 - Permission control method, server, terminal, storage medium, and computer program - Google Patents

Permission control method, server, terminal, storage medium, and computer program Download PDF

Info

Publication number
WO2022193494A1
WO2022193494A1 PCT/CN2021/105569 CN2021105569W WO2022193494A1 WO 2022193494 A1 WO2022193494 A1 WO 2022193494A1 CN 2021105569 W CN2021105569 W CN 2021105569W WO 2022193494 A1 WO2022193494 A1 WO 2022193494A1
Authority
WO
WIPO (PCT)
Prior art keywords
token
file
server
path
terminal device
Prior art date
Application number
PCT/CN2021/105569
Other languages
French (fr)
Chinese (zh)
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 KR1020227014600A priority Critical patent/KR20220130088A/en
Publication of WO2022193494A1 publication Critical patent/WO2022193494A1/en

Links

Images

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/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/33User authentication using certificates
    • G06F21/335User authentication using certificates for accessing specific resources, e.g. using Kerberos tickets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos

Abstract

Embodiments of the present application disclose a permission control method, a server, a terminal, a storage medium, and a computer program. The method comprises: the server receives a first file operation request from a terminal device, the first file operation request being used for requesting to perform a first operation on a file of a first path, the first file operation request carrying a first token, the first token comprising a second path and a first operation set, the first operation set comprising at least one operation, and the first path and the second path being both paths in a file management system operated by the server; when the first file operation request satisfies first conditions, the server performs the first operation on the file, the first conditions comprising: validity verification of the first token by the server is successful, the first operation is comprised in the first operation set, and the second path comprises the first path. A permission of a user can be verified more quickly.

Description

权限控制方法及服务器、终端、存储介质和计算机程序Authority control method and server, terminal, storage medium and computer program
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请基于申请号为202110274535.8、申请日为2021年03月15日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引用的方式引入本申请。This application is based on the Chinese patent application with the application number of 202110274535.8 and the filing date of March 15, 2021, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference into this application in its entirety. .
技术领域technical field
本申请涉及权限控制领域,尤其涉及一种权限控制方法及服务器、终端、存储介质和计算机程序。The present application relates to the field of authority control, and in particular, to an authority control method and a server, a terminal, a storage medium and a computer program.
背景技术Background technique
在线文档领域中,个人的文件(图片、文档、音频、视频等)存储在网络云端,例如提供文件管理服务的服务器。服务器对其存储的一些私密文件,需要做访问权限控制。服务器对文件做访问权限控制可理解为服务器在验证用户具备对其访问的文件执行第一操作的权限之后,才允许该用户执行该第一操作。第一操作可包括:只读、写、修改、删除等中的至少一项。举例来说,当用户输入针对其访问的在线文件的修改指令之后,服务器验证该用户是否具备修改该在线文件的权限。若服务器验证该用户具备修改该在线文件的权限,则按照修改指令执行相应的操作;否则,拒绝执行该修改指令。In the field of online documents, personal files (pictures, documents, audio, video, etc.) are stored in the network cloud, such as a server that provides file management services. Some private files stored by the server need to be controlled by access rights. When the server controls the access authority to the file, it can be understood that the server only allows the user to perform the first operation after verifying that the user has the authority to perform the first operation on the file accessed by the server. The first operation may include at least one of read-only, write, modify, delete, and the like. For example, after the user inputs the modification instruction for the online file accessed by the user, the server verifies whether the user has the right to modify the online file. If the server verifies that the user has the right to modify the online file, it will execute the corresponding operation according to the modification instruction; otherwise, it will refuse to execute the modification instruction.
目前,服务器通常通过查询用户的权限信息来验证用户是否具备对其访问的文档执行某项操作的权限。然而,查询用户的权限信息通常需要花费较长的时间,这就导致验证用户的权限花费较多的时间,用户体验差。因此,需要研究能够更快地验证用户的权限的方式。At present, the server usually verifies whether the user has the right to perform an operation on the document it accesses by querying the user's permission information. However, it usually takes a long time to query the user's permission information, which leads to a long time to verify the user's permission and poor user experience. Therefore, there is a need to investigate ways to verify a user's permissions more quickly.
发明内容SUMMARY OF THE INVENTION
本申请实施例公开了一种权限控制方法及服务器、终端、存储介质和计算机程序。The embodiments of the present application disclose an authority control method, a server, a terminal, a storage medium and a computer program.
第一方面,本申请实施例提供了一种在线文件的权限控制方法,该方法包括:服务器接收来自终端设备的第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径;在所述第一文件操作请求满足第一条件的情况下,所述服务器对所述文件执行所述第一操作;所述第一条件包括:所述第一令牌通过所述服务器的合法性校验、所述第一操作包含于所述第一操作集合以及所述第二路径包括所述第一路径。In a first aspect, an embodiment of the present application provides an online file permission control method. The method includes: a server receives a first file operation request from a terminal device; the first file operation request is used to request permission for a first path The file performs a first operation, the first file operation request carries a first token, the first token includes a second path and a first operation set, the first operation set includes at least one operation, the Both the first path and the second path are paths in the file management system run by the server; when the first file operation request satisfies the first condition, the server executes the first file operation request on the file. An operation; the first condition includes: the first token passes the validity check of the server, the first operation is included in the first operation set, and the second path includes the first path.
服务器判断第一文件操作请求是否满足第一条件花费的时间要少于校验用户(对应于终端设备)是否具备对第一路径的文件执行第一操作的权限花费的时间。The time taken by the server to determine whether the first file operation request satisfies the first condition is less than the time taken to verify whether the user (corresponding to the terminal device) has the right to perform the first operation on the file of the first path.
本申请实施例中,服务器在第一文件操作请求满足第一条件的情况下,对文件执行第一操作;不需要查询用户(对应于终端设备)的权限信息,可以更快地验证用户的权限,进而更快地响应该第一文件操作请求。In this embodiment of the present application, the server performs the first operation on the file when the first file operation request satisfies the first condition; there is no need to query the permission information of the user (corresponding to the terminal device), and the user's permission can be verified more quickly , so as to respond to the first file operation request faster.
在一个可能的实现方式中,所述第一令牌还包括所述第一令牌的有效期;所述第一条件还包括:所述服务器接收到所述第一文件操作请求的时间在所述有效期内。In a possible implementation manner, the first token further includes a validity period of the first token; the first condition further includes: the time when the server receives the first file operation request is within the within the validity period.
所述第一令牌的有效期可用于确定所述第一令牌的有效性。应理解,若服务器接收到第一令牌的时间(即接收到第一文件操作请求的时间)在该第一令牌的有效期内,则该第一令牌有效;否则,该第一令牌失效。The validity period of the first token may be used to determine the validity of the first token. It should be understood that if the time when the server receives the first token (that is, the time when the first file operation request is received) is within the validity period of the first token, the first token is valid; otherwise, the first token is valid invalid.
在该实现方式中,第一条件还包括:服务器接收到第一文件操作请求的时间在有效期内,可以快速、准确地确定令牌有效。另外,通过设置令牌的有效期可减少由于令牌的泄露造成的不良影响。在一些实施例中,服务器根据权限(对应于第一操作集合)的不同可以设置不同的有效期。例如,对于一些针对文件的修改、删除等高危操作,令牌的有效期会设置的尽量短;对于一些查看文件的权限,有效期可以放宽。In this implementation manner, the first condition further includes: the server can quickly and accurately determine that the token is valid when the time when the server receives the first file operation request is within the validity period. In addition, by setting the validity period of the token, the adverse effects caused by the leakage of the token can be reduced. In some embodiments, the server may set different validity periods according to different permissions (corresponding to the first operation set). For example, for some high-risk operations such as modification and deletion of files, the validity period of the token will be set as short as possible; for some permissions to view files, the validity period can be relaxed.
在一个可能的实现方式中,在所述服务器对所述文件执行所述第一操作之前,所述方法还包括:所述服务器对所述第一令牌进行合法性校验和有效性校验;所述有效性校验为校验所述服务器接收到所述第一文件操作请求的时间是否在所述有效期内;在所述第一令牌通过合法性校验和有效性校验的情况下,所述服务器验证所述第一操作是否包含于所述第一操作集合以及所述第二路径是否包括所述第一路径。In a possible implementation manner, before the server performs the first operation on the file, the method further includes: the server performs a legality check and a validity check on the first token ; The validity check is to check whether the time when the server receives the first file operation request is within the validity period; in the case that the first token passes the validity check and validity check Next, the server verifies whether the first operation is included in the first operation set and whether the second path includes the first path.
在该实现方式中,先对第一令牌进行合法性校验和有效性校验,在该第一令牌通过合法性校验和有效性校验的情况下,再验证第一操作是否包含于第一操作集合以及第二路径是否包括第一路径;可以减少验证第一操作是否包含于第一操作集合以及第二路径是否包括第一路径。In this implementation, the first token is checked for validity and validity, and if the first token passes the validity check and validity check, it is then checked whether the first operation includes In the first operation set and whether the second path includes the first path; it can be reduced to verify whether the first operation is included in the first operation set and whether the second path includes the first path.
在一个可能的实现方式中,在服务器接收来自终端设备的第一文件操作请求之前,所述方法还包括:所述服务器生成所述第一令牌;所述服务器向所述终端设备发送所述第一令牌。In a possible implementation manner, before the server receives the first file operation request from the terminal device, the method further includes: the server generates the first token; the server sends the first token to the terminal device first token.
在该实现方式中,服务器向终端设备发送第一令牌,以便于该终端设备通过该第一令牌生成所需的文件操作请求。In this implementation manner, the server sends the first token to the terminal device, so that the terminal device can generate the required file operation request by using the first token.
在一个可能的实现方式中,所述服务器生成所述第一令牌包括:所述服务器生成初始令牌;基于HMACSHA256算法加密所述初始令牌,得到所述第一令牌;其中,所述服务器可存储密钥(Secret)。所述服务器生成初始令牌可以是:所述服务器采用JSON Web Token(缩写JWT)生成所述初始令牌;其中,JWT是目前流行的跨域认证解决方案。In a possible implementation manner, the generating, by the server, the first token includes: generating, by the server, an initial token; encrypting the initial token based on the HMACSHA256 algorithm to obtain the first token; wherein, the The server can store the secret (Secret). The generation of the initial token by the server may be: the server uses JSON Web Token (JWT for short) to generate the initial token; wherein, JWT is a currently popular cross-domain authentication solution.
本申请实施例中,基于HMACSHA256算法加密初始令牌,得到第一令牌;使得该第一令牌的内容无法被外部破解,并避免该第一令牌被伪造,安全性高。In the embodiment of the present application, the initial token is encrypted based on the HMACSHA256 algorithm to obtain the first token; the content of the first token cannot be deciphered externally, and the forgery of the first token is avoided, and the security is high.
在一个可能的实现方式中,在所述服务器生成所述第一令牌之前,所述方法还包括:所述服务器接收来自所述终端设备的令牌获取请求,所述令牌获取请求用于获取对所述第一路径的文件进行所述第一操作所需的令牌;所述服务器根据所述令牌获取请求,获取所述终端设备登录的目标账号的角色权限信息;所述目标账号为所述终端设备登录所述文件管理系统使用的账号;所述服务器生成所述第一令牌包括:所述服务器根据所述角色权限信息,生成所述第一令牌。In a possible implementation manner, before the server generates the first token, the method further includes: the server receives a token acquisition request from the terminal device, and the token acquisition request is used for Obtain the token required for the first operation on the file of the first path; the server obtains, according to the token obtaining request, the role permission information of the target account logged in by the terminal device; the target account The account used for logging in the file management system for the terminal device; and generating the first token by the server includes: the server generating the first token according to the role permission information.
在该实现方式中,服务器根据角色权限信息,生成第一令牌;可以快速地生成与该角色权限信息相匹配的第一令牌。In this implementation manner, the server generates the first token according to the role permission information; the first token matching the role permission information can be quickly generated.
在一个可能的实现方式中,在所述服务器接收来自所述终端设备的令牌获取请求之前,所述方法还包括:所述服务器通过所述终端设备使用所述目标账号登录所述文件管理系统的登录认证;所述服务器接收来自所述终端设备的令牌获取请求包括:所述服务器接收到所述终端设备针对所述文件管理系统中的所述第一路径的文件的访问操作。In a possible implementation manner, before the server receives the token acquisition request from the terminal device, the method further includes: the server uses the target account to log in to the file management system through the terminal device receiving the token acquisition request from the terminal device by the server includes: receiving, by the server, an access operation by the terminal device to the file of the first path in the file management system.
所述服务器可通过校验所述终端设备登录所述文件管理系统使用的所述目标账号和密码来对所述目标账号进行登录认证。所述访问操作可以是所述终端设备选中所述第一路径的文件的操作,例如点击第一路径的文件的操作。The server may perform login authentication on the target account by verifying the target account and password used by the terminal device to log in to the file management system. The access operation may be an operation of selecting the file of the first path by the terminal device, for example, an operation of clicking the file of the first path.
在该实现方式中,服务器接收到终端设备针对文件管理系统中的第一路径的文件的访问操作可视为接收来自所述终端设备的令牌获取请求,可及时生成相应的令牌。In this implementation manner, when the server receives the terminal device's access operation to the file of the first path in the file management system, it can be regarded as receiving a token acquisition request from the terminal device, and a corresponding token can be generated in time.
在一个可能的实现方式中,所述方法还包括:所述服务器接收来自所述终端设备的第二文件操作请求;所述第二文件操作请求用于请求对第三路径的文件执行第二操作,所述第二文件操作请求携带有第二令牌,所述第二令牌包括第四路径、第二操作集合,所述第二操作集合包括至少一项操作;在所述第二文件操作请求未满足第二条件的情况下,所述服务器拒绝所述第二文件操作请求;所述第二条件包括:所述第二令牌通过所述服务器的合法性校验、所述第二操作包含于所述第二操作集合以及所述第四路径包括所述第三路径。In a possible implementation manner, the method further includes: the server receives a second file operation request from the terminal device; the second file operation request is used to request to perform a second operation on the file of the third path , the second file operation request carries a second token, the second token includes a fourth path and a second operation set, and the second operation set includes at least one operation; If the request does not meet the second condition, the server rejects the second file operation request; the second condition includes: the second token passes the validity check of the server, the second operation Included in the second set of operations and the fourth path includes the third path.
本申请实施例中,服务器在第二文件操作请求未满足第二条件的情况下,拒绝该第二文件操作请求;不需要校验用户(对应于终端设备)的权限,可以更快地验证用户的权限,进而更快地响应该第二文件操作请求。In the embodiment of the present application, the server rejects the second file operation request when the second file operation request does not meet the second condition; it does not need to verify the authority of the user (corresponding to the terminal device), and the user can be verified more quickly , and respond faster to the second file operation request.
在一个可能的实现方式中,所述第二令牌还包括所述第二令牌的有效期;所述第二条件还包括:所述服务器接收到所述第二文件操作请求的时间在所述第二令牌的有效期内。In a possible implementation manner, the second token further includes a validity period of the second token; the second condition further includes: the time when the server receives the second file operation request is within the within the validity period of the second token.
在该实现方式中,第二条件还包括:服务器接收到第二文件操作请求的时间在第二令牌的有效期内,可以快速、准确地确定令牌有效。另外,通过设置令牌的有效期可减少由于令牌的泄露造成的不良影响。In this implementation manner, the second condition further includes: the time when the server receives the second file operation request is within the validity period of the second token, and can quickly and accurately determine that the token is valid. In addition, by setting the validity period of the token, the adverse effects caused by the leakage of the token can be reduced.
在一个可能的实现方式中,所述第一路径的文件为同一目录下的部分文件,所述第一操作集合包括:新建、修改、锁定、删除、移动、隐藏中的至少一项。所述第一路径的文件可以是任意文件,而不是整个目录下的全部文件。也就是说,路径可以匹配用户任意目录或者文件。In a possible implementation manner, the files of the first path are partial files in the same directory, and the first operation set includes at least one of creating, modifying, locking, deleting, moving, and hiding. The files in the first path may be any files, not all files in the entire directory. That is, the path can match any directory or file of the user.
在该实现方式中,第一路径的文件可以是任意文件,能够支持更多业务场景;第一操作集合包括:新建、修改、锁定、删除、移动、隐藏中的至少一项,可以实现更多的访问权限控制。应理解,令牌中可自定义路径,令牌中可自定义操作权限,例如新建、修改、锁定、删除、移动、隐藏。In this implementation, the file in the first path can be any file, which can support more business scenarios; the first operation set includes: at least one of creating, modifying, locking, deleting, moving, and hiding, which can achieve more access control. It should be understood that the path can be customized in the token, and the operation authority can be customized in the token, such as creating, modifying, locking, deleting, moving, and hiding.
第二方面,本申请实施例提供了另一种在线文件的权限控制方法,包括:终端设备生成第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径,所述第一令牌用于所述服务器校验所述终端设备是否具备对所述第一路径的文件执行所述第一操作的权限;所述终端设备向所述服务器发送所述第一文件操作请求。In a second aspect, an embodiment of the present application provides another method for controlling permissions of an online file, including: a terminal device generating a first file operation request; the first file operation request is used to request to execute the first file operation operation, the first file operation request carries a first token, the first token includes a second path, a first operation set, the first operation set includes at least one operation, the first path and The second paths are all paths in the file management system run by the server, and the first token is used by the server to verify whether the terminal device has the ability to execute the first token on the files in the first path. an operation authority; the terminal device sends the first file operation request to the server.
本申请实施例中,终端设备向服务器发送携带第一令牌第一文件操作请求,以便于该服务器利用该第一令牌快速、准确地校验该终端设备(对应于用户)是否具备对第一路径的文件执行第一操作的权限。In this embodiment of the present application, the terminal device sends a first file operation request carrying the first token to the server, so that the server can use the first token to quickly and accurately verify whether the terminal device (corresponding to the user) is capable of Permission to perform the first operation on a file with a path.
在一个可能的实现方式中,所述第一令牌还包括所述第一令牌的有效期,所述有效期用于校验所述第一令牌的有效性。In a possible implementation manner, the first token further includes a validity period of the first token, and the validity period is used to verify the validity of the first token.
在该实现方式中,第一令牌还包括该第一令牌的有效期,可以使得服务器校验该第一令牌的有效性。In this implementation manner, the first token further includes the validity period of the first token, so that the server can verify the validity of the first token.
在一个可能的实现方式中,在终端设备生成第一文件操作请求之前,所述方法还包括:所述终端设备获取浏览器或客户端应用缓存的所述第一令牌;所述终端设备生成第一文件操作请求包括:所述终端设备基于所述第一令牌,生成所述第一文件操作请求。In a possible implementation manner, before the terminal device generates the first file operation request, the method further includes: acquiring, by the terminal device, the first token cached by the browser or client application; The first file operation request includes: generating, by the terminal device, the first file operation request based on the first token.
在该实现方式中,终端设备可快速地获取第一令牌,从而快速生成第一文件操作请求。In this implementation manner, the terminal device can quickly acquire the first token, so as to quickly generate the first file operation request.
在一个可能的实现方式中,在终端设备生成第一文件操作请求之前,所述方法还包括:所述终端设备向所述服务器发送令牌获取请求,所述令牌获取请求用于获取对所述第一路径的文件进行所述第一操作所需的令牌;所述终端设备接收来自所述服务器的所述第一令牌,并缓存所述第一令牌。In a possible implementation manner, before the terminal device generates the first file operation request, the method further includes: the terminal device sends a token acquisition request to the server, where the token acquisition request is used to and the terminal device receives the first token from the server and caches the first token.
在该实现方式中,终端设备通过向服务器发送令牌获取请求,可快速获取第一令牌。In this implementation manner, the terminal device can quickly acquire the first token by sending a token acquisition request to the server.
在一个可能的实现方式中,在所述终端设备向所述服务器发送令牌获取请求之前,所述方法还包括:所述终端设备使用目标账号登录所述文件管理系统;所述终端设备向所述服务器发送令牌获取请求包括:响应于用户针对所述文件管理系统中的所述第一路径的文件的访问操作,向所述服务器发送所述令牌获取请求。In a possible implementation manner, before the terminal device sends a token acquisition request to the server, the method further includes: the terminal device uses a target account to log in to the file management system; The sending of the token acquisition request by the server includes: in response to the user's access operation on the file of the first path in the file management system, sending the token acquisition request to the server.
在该实现方式中,响应于用户针对文件管理系统中的第一路径的文件的访问操作,可及时地发送令牌获取请求。In this implementation manner, in response to the user's access operation to the file of the first path in the file management system, the token acquisition request may be sent in time.
在一个可能的实现方式中,所述第一路径的文件为同一目录下的部分文件,所述第一操作集合包括:新建、修改、锁定、删除、移动、隐藏中的至少一项。In a possible implementation manner, the files of the first path are partial files in the same directory, and the first operation set includes at least one of creating, modifying, locking, deleting, moving, and hiding.
在该实现方式中,第一路径的文件可以是任意文件,能够支持更多业务场景;第一操作 集合包括:新建、修改、锁定、删除、移动、隐藏中的至少一项,可以实现更多的访问权限控制。In this implementation, the file in the first path can be any file, which can support more business scenarios; the first operation set includes: at least one of creating, modifying, locking, deleting, moving, and hiding, which can achieve more access control.
第三方面,本申请实施例提供了一种服务器,包括:收发单元,配置为接收来自终端设备的第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径;处理单元,配置为在所述第一文件操作请求满足第一条件的情况下,对所述文件执行所述第一操作;所述第一条件包括:所述第一令牌通过所述服务器的合法性校验、所述第一操作包含于所述第一操作集合以及所述第二路径包括所述第一路径。In a third aspect, an embodiment of the present application provides a server, including: a transceiver unit configured to receive a first file operation request from a terminal device; the first file operation request is used to request to execute a first file operation request on a file of a first path An operation, the first file operation request carries a first token, the first token includes a second path and a first operation set, the first operation set includes at least one operation, the first path and the second path are both paths in the file management system run by the server; the processing unit is configured to execute the first file operation request on the file when the first file operation request satisfies the first condition operation; the first condition includes: the first token passes the validity check of the server, the first operation is included in the first operation set, and the second path includes the first path .
在一个可能的实现方式中,所述第一令牌还包括所述第一令牌的有效期;所述第一条件还包括:所述服务器接收到所述第一文件操作请求的时间在所述有效期内。In a possible implementation manner, the first token further includes a validity period of the first token; the first condition further includes: the time when the server receives the first file operation request is within the within the validity period.
在一个可能的实现方式中,所述处理单元,还配置为对所述第一令牌进行合法性校验和有效性校验;所述有效性校验为校验所述服务器接收到所述第一文件操作请求的时间是否在所述有效期内;在所述第一令牌通过合法性校验和有效性校验的情况下,验证所述第一操作是否包含于所述第一操作集合以及所述第二路径是否包括所述第一路径。In a possible implementation manner, the processing unit is further configured to perform validity check and validity check on the first token; the validity check is to check that the server receives the Whether the time of the first file operation request is within the validity period; if the first token passes the validity check and validity check, verify whether the first operation is included in the first operation set and whether the second path includes the first path.
在一个可能的实现方式中,所述处理单元,还配置为生成所述第一令牌;所述收发单元,还配置为向所述终端设备发送所述第一令牌。In a possible implementation manner, the processing unit is further configured to generate the first token; the transceiver unit is further configured to send the first token to the terminal device.
在一个可能的实现方式中,所述处理单元,配置为基于HMACSHA256算法加密所述初始令牌,得到所述第一令牌。所述处理单元,配置为采用JSON Web Token生成所述初始令牌。In a possible implementation manner, the processing unit is configured to encrypt the initial token based on the HMACSHA256 algorithm to obtain the first token. The processing unit is configured to use JSON Web Token to generate the initial token.
在一个可能的实现方式中,所述收发单元,还配置为接收来自所述终端设备的令牌获取请求,所述令牌获取请求用于获取对所述第一路径的文件进行所述第一操作所需的令牌;所述处理单元,还配置为根据所述令牌获取请求,获取所述终端设备登录的目标账号的角色权限信息;所述目标账号为所述终端设备登录所述文件管理系统使用的账号;所述处理单元,配置为根据所述角色权限信息,生成所述第一令牌。In a possible implementation manner, the transceiver unit is further configured to receive a token acquisition request from the terminal device, where the token acquisition request is used to acquire the first path for the file in the first path. the token required for the operation; the processing unit is further configured to acquire, according to the token acquisition request, the role permission information of the target account logged in by the terminal device; the target account is for the terminal device to log in to the file an account used by the management system; the processing unit is configured to generate the first token according to the role permission information.
在一个可能的实现方式中,所述处理单元,还配置为通过所述终端设备使用所述目标账号登录所述文件管理系统的登录认证;所述收发单元,配置为接收所述终端设备针对所述文件管理系统中的所述第一路径的文件的访问操作。In a possible implementation manner, the processing unit is further configured to use the target account to log in to the file management system through the terminal device for login authentication; the transceiver unit is configured to receive the access operation of the file of the first path in the file management system.
在一个可能的实现方式中,所述收发单元,还配置为接收来自所述终端设备的第二文件操作请求;所述第二文件操作请求用于请求对第三路径的文件执行第二操作,所述第二文件操作请求携带有第二令牌,所述第二令牌包括第四路径、第二操作集合,所述第二操作集合包括至少一项操作;所述处理单元,还配置为在所述第二文件操作请求未满足第二条件的情况下,拒绝所述第二文件操作请求;所述第二条件包括:所述第二令牌通过所述服务器的合法性校验、所述第二操作包含于所述第二操作集合以及所述第四路径包括所述第三路径。In a possible implementation manner, the transceiver unit is further configured to receive a second file operation request from the terminal device; the second file operation request is used to request to perform a second operation on the file of the third path, The second file operation request carries a second token, the second token includes a fourth path and a second operation set, and the second operation set includes at least one operation; the processing unit is further configured to In the case that the second file operation request does not meet the second condition, the second file operation request is rejected; the second condition includes: the second token passes the validity check of the server, and all The second operation is included in the second operation set and the fourth path includes the third path.
在一个可能的实现方式中,所述第一路径的文件为同一目录下的部分文件,所述第一操作包括:新建、修改、锁定、删除、移动、隐藏中的至少一项。In a possible implementation manner, the files of the first path are partial files in the same directory, and the first operation includes at least one of creating, modifying, locking, deleting, moving, and hiding.
关于第三方面或各种可选的实施方式所带来的技术效果,可参考对于第一方面或相应的实现方式的技术效果的介绍。Regarding the technical effects brought about by the third aspect or various optional implementation manners, reference may be made to the introduction to the technical effects of the first aspect or corresponding implementation manners.
第四方面,本申请实施例提供了一种终端设备,包括:处理单元,配置为生成第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径,所述第一令牌用于所述服务器校验所述终端设备是否具备对所述第一路径的文件执行所述第一操作的权限;收发单元,配置为向所述服务器发送所述第一文件操作请求。In a fourth aspect, an embodiment of the present application provides a terminal device, including: a processing unit configured to generate a first file operation request; the first file operation request is used to request to perform a first operation on a file of a first path, The first file operation request carries a first token, the first token includes a second path and a first operation set, the first operation set includes at least one operation, the first path and the The second paths are all paths in the file management system run by the server, and the first token is used by the server to verify whether the terminal device has the capability to perform the first operation on the files in the first path. The right of the server; a transceiver unit, configured to send the first file operation request to the server.
在一个可能的实现方式中,所述第一令牌还包括所述第一令牌的有效期,所述有效期用于校验所述第一令牌的有效性。In a possible implementation manner, the first token further includes a validity period of the first token, and the validity period is used to verify the validity of the first token.
在一个可能的实现方式中,所述处理单元,还配置为获取浏览器或客户端应用缓存的所 述第一令牌;所述处理单元,配置为基于所述第一令牌,生成所述第一文件操作请求。In a possible implementation manner, the processing unit is further configured to acquire the first token cached by the browser or client application; the processing unit is configured to generate the first token based on the first token The first file operation request.
在一个可能的实现方式中,所述收发单元,还配置为向所述服务器发送令牌获取请求,所述令牌获取请求用于获取对所述第一路径的文件进行所述第一操作所需的令牌;接收来自所述服务器的所述第一令牌,并缓存所述第一令牌。In a possible implementation manner, the transceiver unit is further configured to send a token acquisition request to the server, where the token acquisition request is used to acquire the information required for performing the first operation on the file of the first path. required token; receive the first token from the server, and cache the first token.
在一个可能的实现方式中,所述处理单元,还配置为使用目标账号登录所述文件管理系统;所述收发单元,还配置为响应于用户针对所述文件管理系统中的所述第一路径的文件的访问操作,向所述服务器发送所述令牌获取请求。In a possible implementation manner, the processing unit is further configured to log in to the file management system using a target account; the transceiver unit is further configured to respond to the user's request for the first path in the file management system the access operation of the file, and send the token acquisition request to the server.
在一个可能的实现方式中,所述第一路径的文件为同一目录下的部分文件,所述第一操作包括:新建、修改、锁定、删除、移动、隐藏中的至少一项。In a possible implementation manner, the files of the first path are partial files in the same directory, and the first operation includes at least one of creating, modifying, locking, deleting, moving, and hiding.
关于第四方面或各种可选的实施方式所带来的技术效果,可参考对于第二方面或相应的实现方式的技术效果的介绍。Regarding the technical effects brought about by the fourth aspect or various optional implementation manners, reference may be made to the introduction to the technical effects of the second aspect or corresponding implementation manners.
第五方面,本申请实施例提供了一种服务器,该服务器包括:存储器,用于存储程序;处理器,用于执行所述存储器存储的所述程序,当所述程序被执行时,所述处理器用于执行如上述第一方面以及任一种可能的实现方式的方法。In a fifth aspect, an embodiment of the present application provides a server, where the server includes: a memory for storing a program; a processor for executing the program stored in the memory, and when the program is executed, the The processor is configured to execute the method as described above in the first aspect and any of the possible implementations.
第六方面,本申请实施例提供了一种终端设备,该终端设备包括:存储器,用于存储程序;处理器,用于执行所述存储器存储的所述程序,当所述程序被执行时,所述处理器用于执行如上述第二方面以及任一种可能的实现方式的方法。In a sixth aspect, an embodiment of the present application provides a terminal device, the terminal device includes: a memory for storing a program; a processor for executing the program stored in the memory, when the program is executed, The processor is configured to execute the method as described above in the second aspect and any possible implementation manner.
第七方面,本申请实施例提供了一种芯片,该芯片包括处理器与数据接口,该处理器通过该数据接口读取存储器上存储的指令,执行如上述第一方面以及任一种可能的实现方式的方法。In a seventh aspect, an embodiment of the present application provides a chip, the chip includes a processor and a data interface, the processor reads an instruction stored in a memory through the data interface, and executes the first aspect above and any of the possible method of implementation.
第八方面,本申请实施例提供了一种芯片,该芯片包括处理器与数据接口,该处理器通过该数据接口读取存储器上存储的指令,执行如上述第二方面以及任一种可能的实现方式的方法。In an eighth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a data interface, the processor reads an instruction stored in a memory through the data interface, and executes the second aspect and any of the possible method of implementation.
第九方面,本申请实施例提供了一种计算机可读存储介质,该计算机存储介质存储有计算机程序,该计算机程序包括程序指令,该程序指令当被处理器执行时使该处理器执行上述第一方面以及任一种可能的实现方式的方法。In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer storage medium stores a computer program, the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processor to execute the above-mentioned No. Aspects and methods of any possible implementation.
第十方面,本申请实施例提供了一种计算机可读存储介质,该计算机存储介质存储有计算机程序,该计算机程序包括程序指令,该程序指令当被处理器执行时使该处理器执行上述第二方面以及任一种可能的实现方式的方法。In a tenth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer storage medium stores a computer program, the computer program includes program instructions, and when executed by a processor, the program instructions cause the processor to execute the above-mentioned first step. Aspects and methods of any possible implementation.
第十一方面,本申请实施例提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在服务器中运行时,所述服务器中的处理器执行用于实现上述第一方面以及任一种可能的实现方式的方法。In an eleventh aspect, an embodiment of the present application provides a computer program, including computer-readable code, when the computer-readable code is executed in a server, the processor in the server executes the program to implement the above-mentioned first aspect and a method for any possible implementation.
第十二方面,本申请实施例提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在终端设备中运行时,所述终端设备中的处理器执行用于实现上述第二方面以及任一种可能的实现方式的方法。In a twelfth aspect, an embodiment of the present application provides a computer program, including computer-readable code, when the computer-readable code is run in a terminal device, a processor in the terminal device executes the program for implementing the above-mentioned first Aspects and methods of any possible implementation.
本申请实施例提供一种权限控制方法及服务器、终端、存储介质和计算机程序,通过服务器接收来自终端设备的第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径;在所述第一文件操作请求满足第一条件的情况下,所述服务器对所述文件执行所述第一操作;所述第一条件包括:所述第一令牌通过所述服务器的合法性校验、所述第一操作包含于所述第一操作集合以及所述第二路径包括所述第一路径,如此,不需要查询用户(对应于终端设备)的权限信息,能够更快地验证用户的权限,进而更快地响应该第一文件操作请求。Embodiments of the present application provide an authority control method, a server, a terminal, a storage medium, and a computer program. The server receives a first file operation request from a terminal device; the first file operation request is used to request a file in a first path. Execute a first operation, the first file operation request carries a first token, the first token includes a second path and a first operation set, the first operation set includes at least one operation, and the first operation set includes at least one operation. Both the first path and the second path are paths in the file management system run by the server; when the first file operation request satisfies the first condition, the server executes the first file operation request on the file. operation; the first condition includes: the first token passes the validity check of the server, the first operation is included in the first operation set, and the second path includes the first path In this way, there is no need to query the permission information of the user (corresponding to the terminal device), the permission of the user can be verified faster, and the first file operation request can be responded faster.
附图说明Description of drawings
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the accompanying drawings required in the embodiments or the background technology of the present application will be described below.
图1为本申请实施例提供的一种在线文件的权限控制方法流程图;FIG. 1 is a flowchart of a method for controlling the authority of an online file provided by an embodiment of the present application;
图2为本申请实施例提供的另一种在线文件的权限控制方法流程图;2 is a flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application;
图3为本申请实施例提供的另一种在线文件的权限控制方法流程图;3 is a flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application;
图4为本申请实施例提供的另一种在线文件的权限控制方法流程图;4 is a flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application;
图5为本申请实施例提供的另一种在线文件的权限控制方法流程图;5 is a flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application;
图6为本申请实施例提供的一种在线文件的权限控制方法交互流程图;FIG. 6 is an interactive flowchart of an online file permission control method provided by an embodiment of the present application;
图7为本申请实施例提供的另一种在线文件的权限控制方法交互流程图;FIG. 7 is an interactive flowchart of another online file permission control method provided by an embodiment of the present application;
图8为本申请实施例提供的一种服务器的结构示意图;FIG. 8 is a schematic structural diagram of a server according to an embodiment of the present application;
图9为本申请实施例提供的一种终端设备的结构示意图;FIG. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
图10是本申请实施例提供的一种服务器的结构示意图;10 is a schematic structural diagram of a server provided by an embodiment of the present application;
图11为本申请实施例提供的另一种终端设备110的结构示意图;FIG. 11 is a schematic structural diagram of another terminal device 110 provided by an embodiment of the present application;
图12是本申请实施例提供的一种终端设备的部分结构的框图。FIG. 12 is a block diagram of a partial structure of a terminal device provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请的说明书实施例和权利要求书及上述附图中的术语“第一”、“第二”、和“第三”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包括,例如,包括了一系列步骤或单元。方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and the like in the description embodiments and claims of the present application and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, eg, including a series of steps or elements. A method, system, product or device is not necessarily limited to those steps or units expressly listed, but may include other steps or units not expressly listed or inherent to the process, method, product or device.
为防止存储于网络云端的私密文件(即在线文件)被泄露和/或被篡改,通常需要对私密文件做访问权限控制。如背景技术所述,目前一般采用的访问权限控制的方式如下:通过查询用户的权限信息来验证用户是否具备对其访问的文档执行某项操作的权限。然而,查询用户的权限信息通常需要花费较长的时间,这就导致验证用户的权限花费较多的时间,用户体验差。本申请实施例提供了一种在线文件的权限控制方案,借助令牌来验证用户的权限,可以更快地验证用户的权限。In order to prevent the private files (ie online files) stored in the network cloud from being leaked and/or tampered with, it is usually necessary to control the access rights of the private files. As described in the background art, the currently generally adopted method of access authority control is as follows: whether the user has the authority to perform an operation on the document accessed by the user is verified by querying the authority information of the user. However, it usually takes a long time to query the user's permission information, which leads to a long time to verify the user's permission and poor user experience. The embodiment of the present application provides a permission control scheme for online files, and the user's permission is verified by means of a token, so that the user's permission can be verified more quickly.
本申请实施例提供的在线文件的权限控制方法能够应用于编辑在线文件场景。下面对本申请实施例提供的在线文件的权限控制方法在编辑在线文件场景中的应用进行简单的介绍。The online file authority control method provided by the embodiment of the present application can be applied to the scene of editing an online file. The application of the online file authority control method provided by the embodiment of the present application in the scenario of editing an online file is briefly introduced below.
编辑在线文件场景:终端设备对服务器运行的文件管理系统中的在线文件进行编辑处理(例如修改、删除、移动、锁定等)。举例来说,用户使用终端设备登录服务器运行的文件管理系统;用户使用终端设备向服务器发送携带有令牌的文件操作请求,该文件操作请求用于请求对文件管理系统中的某个在线文件进行目标操作;服务器根据该令牌来验证该用户是否具备对该在线文件进行目标操作的权限;服务器在验证该用户具备对该文件进行目标操作的权限之后,对该在线文件进行目标操作,否则,拒绝该文件操作请求。Scenario of editing online files: The terminal device edits (for example, modify, delete, move, lock, etc.) the online files in the file management system running on the server. For example, the user uses a terminal device to log in to the file management system run by the server; the user uses the terminal device to send a file operation request carrying a token to the server, and the file operation request is used to request to perform a certain online file in the file management system. Target operation; the server verifies whether the user has the permission to perform the target operation on the online file according to the token; the server performs the target operation on the online file after verifying that the user has the permission to perform the target operation on the file, otherwise, Deny the file operation request.
上述终端设备可以是手机、个人电脑、平板电脑、可穿戴设备、个人数字助理、信息处理中心等智能终端。上述服务器可以是云服务器、网络服务器、应用服务器以及管理服务器等具有数据处理功能的服务器。上述服务器可通过交互接口接收来自上述终端设备的文件操作请求,再通过存储数据的存储器以及执行数据处理的处理器进行相应的处理。上述存储器可以是一个统称,包括本地存储以及存储历史数据的数据库,上述数据库可以在服务器上,也可以在其它网络服务器上。The above-mentioned terminal device may be an intelligent terminal such as a mobile phone, a personal computer, a tablet computer, a wearable device, a personal digital assistant, and an information processing center. The above server may be a server with data processing functions, such as a cloud server, a network server, an application server, and a management server. The above-mentioned server can receive the file operation request from the above-mentioned terminal device through the interactive interface, and then perform corresponding processing through the memory for storing data and the processor for executing data processing. The above-mentioned memory may be a general term, including a database for local storage and storage of historical data, and the above-mentioned database may be on a server or on other network servers.
在上述场景中,采用本申请实施例提供的在线文件的权限控制方法可以更快地验证用户的权限,进而更快地响应用户的文件操作请求。In the above scenario, using the online file authority control method provided by the embodiment of the present application can verify the user's authority more quickly, and thus respond to the user's file operation request more quickly.
下面介绍附图介绍本申请实施例提供的在线文件的权限控制方法。The following describes the accompanying drawings to introduce the online file authority control method provided by the embodiments of the present application.
图1为本申请实施例提供的一种在线文件的权限控制方法流程图。如图1所示,本申请实施例提供的方法步骤可以通过服务器等硬件设备执行,或者通过处理器运行计算机可执行代码的方式执行,该方法包括:FIG. 1 is a flowchart of an online file permission control method provided by an embodiment of the present application. As shown in FIG. 1 , the steps of the method provided in this embodiment of the present application may be performed by a hardware device such as a server, or performed by a processor running computer-executable code, and the method includes:
101、服务器接收来自终端设备的第一文件操作请求。101. The server receives a first file operation request from a terminal device.
上述第一文件操作请求用于请求对第一路径的文件执行第一操作。上述第一文件操作请求携带有第一令牌。上述第一令牌可被终端设备以请求头或者请求参数的方式带入上述第一文件操作请求。第一路径的文件可理解为第一路径下的文件。The above-mentioned first file operation request is used to request to perform the first operation on the file of the first path. The above-mentioned first file operation request carries the first token. The above-mentioned first token may be brought into the above-mentioned first file operation request by the terminal device in the form of a request header or a request parameter. The file in the first path may be understood as a file under the first path.
上述第一令牌包括第二路径、第一操作集合。上述第一操作集合包括至少一项操作。上述第一路径和上述第二路径均为上述服务器运行的文件管理系统中的路径。上述第一路径可以是服务器运行的文件管理系统中的一个目录对应的路径,也可以是服务器运行的文件管理系统中的任意文件对应的路径,例如一个文件对应的路径。上述第二路径可以是服务器运行的文件管理系统中的一个目录对应的路径,也可以是服务器运行的文件管理系统中的任意文件对应的路径,例如一个文件对应的路径。举例来说,第一路径可能是一个文件的路径,第二路径可能是包括该文件的一个文件/目录的路径。又举例来说,第一路径和第二路径为同一路径。应理解,第一路径的文件可以是一个目录下的全部文件,也可以是一个目录下的部分文件。也就是说,本申请实施例提供的在线文件的权限控制方法能够将访问权限的控制力度精确到任意文件或者文件夹。上述第一操作集合包括的至少一项操作可理解为提供第一令牌的终端设备对第二路径的文件可执行的文件操作,例如读取、新建、修改、锁定、删除、移动、隐藏中的至少一项。上述第一操作可以是读取、新建、修改、锁定、删除、移动、隐藏等中的任一项。相对于传统方案只能做简单的读写控制来说,本申请实施例提供的方案中,通过令牌可以自定义操作权限(即访问权限),例如读取,新建,修改,锁定,删除,移动,隐藏等,可满足多样性需求。The above-mentioned first token includes a second path and a first operation set. The above-mentioned first set of operations includes at least one operation. The above-mentioned first path and the above-mentioned second path are both paths in the file management system running on the above-mentioned server. The above-mentioned first path may be a path corresponding to a directory in the file management system run by the server, or may be a path corresponding to any file in the file management system run by the server, for example, a path corresponding to a file. The second path may be a path corresponding to a directory in the file management system run by the server, or may be a path corresponding to any file in the file management system run by the server, such as a path corresponding to a file. For example, the first path may be the path of a file and the second path may be the path of a file/directory that includes the file. For another example, the first path and the second path are the same path. It should be understood that the files in the first path may be all files in a directory, or may be some files in a directory. That is to say, the online file authority control method provided by the embodiment of the present application can precisely control the access authority to any file or folder. At least one operation included in the first operation set can be understood as a file operation that the terminal device that provides the first token can perform on the file of the second path, such as read, create, modify, lock, delete, move, and hide. at least one of. The above-mentioned first operation may be any one of reading, creating, modifying, locking, deleting, moving, hiding, and the like. Compared with the traditional solution that can only perform simple read-write control, in the solution provided by the embodiment of the present application, the operation authority (that is, the access authority) can be customized through the token, such as read, create, modify, lock, delete, Move, hide, etc., to meet diverse needs.
102、在第一文件操作请求满足第一条件的情况下,服务器对第一路径的文件执行第一操作。102. In the case that the first file operation request satisfies the first condition, the server performs the first operation on the file of the first path.
上述第一条件包括:上述第一令牌通过上述服务器的合法性校验、上述第一操作包含于上述第一操作集合以及上述第二路径包括上述第一路径。服务器可对第一令牌进行合法性校验,能够避免其他人通过伪造的令牌来访问在线文件。上述第一令牌通过上述服务器的合法性校验,表明上述第一令牌不是伪造的令牌。上述第一令牌包括第二路径、第一操作集合,表明提供上述第一令牌的终端设备具备对上述第二路径的文件执行上述第一操作集合中各项操作的权限。应理解,若上述第一操作包含于上述第一操作集合以及上述第二路径包括上述第一路径,也就是说,若第一操作集合中存在第一操作,且第二路径指示的可访问文件范围大于或等于第一路径指示的可访问文件范围,则终端设备必然具备对第一路径的文件执行第一操作的权限。对第一路径的文件执行第一操作的权限可理解为第一文件操作请求对应的权限,对第二路径的文件执行第一操作集合中各项操作的权限为第一令牌对应的权限。在一些实施例中,服务器仅需校验第一令牌的合法性以及第一文件操作请求对应的权限是否与第一令牌对应的权限一致,不需要查询终端设备的权限信息。可见,服务器根据上述第一令牌以及上述第一文件操作请求可直接、快速地确认终端设备是否具备对第一路径的文件执行第一操作的权限,不需要查询终端设备的权限信息,可减少权限验证耗时,有效提高文件访问效率。The first condition includes: the first token passes the validity check of the server, the first operation is included in the first operation set, and the second path includes the first path. The server can verify the validity of the first token, which can prevent others from accessing the online file through the forged token. The above-mentioned first token passes the validity check of the above-mentioned server, indicating that the above-mentioned first token is not a forged token. The first token includes the second path and the first operation set, indicating that the terminal device that provides the first token has the authority to perform the operations in the first operation set on the file in the second path. It should be understood that if the above-mentioned first operation is included in the above-mentioned first operation set and the above-mentioned second path includes the above-mentioned first path, that is, if the first operation exists in the first operation set, and the accessible file indicated by the second path If the range is greater than or equal to the accessible file range indicated by the first path, the terminal device must have the right to perform the first operation on the file in the first path. The permission to perform the first operation on the file in the first path can be understood as the permission corresponding to the first file operation request, and the permission to perform each operation in the first operation set on the file in the second path is the permission corresponding to the first token. In some embodiments, the server only needs to verify the validity of the first token and whether the authority corresponding to the first file operation request is consistent with the authority corresponding to the first token, and does not need to query the authority information of the terminal device. It can be seen that the server can directly and quickly confirm whether the terminal device has the authority to perform the first operation on the file of the first path according to the above-mentioned first token and the above-mentioned first file operation request. Permission verification is time-consuming, effectively improving file access efficiency.
在一个可能的实现方式中,上述第一令牌还包括上述第一令牌的有效期;上述第一条件还包括:上述服务器接收到上述第一文件操作请求的时间在上述有效期内。In a possible implementation manner, the first token further includes a validity period of the first token; the first condition further includes: the time when the server receives the first file operation request is within the validity period.
上述第一令牌的有效期可用于确定上述第一令牌的有效性。应理解,若服务器接收到第一令牌的时间(即接收到第一文件操作请求的时间)在该第一令牌的有效期内,则该第一令牌有效;否则,该第一令牌失效。The validity period of the first token can be used to determine the validity of the first token. It should be understood that if the time when the server receives the first token (that is, the time when the first file operation request is received) is within the validity period of the first token, the first token is valid; otherwise, the first token is valid invalid.
在该实现方式中,第一条件还包括:服务器接收到第一文件操作请求的时间在有效期内,可以快速、准确地确定令牌有效。另外,通过设置令牌的有效期可减少由于令牌的泄露造成 的不良影响。在一些实施例中,服务器根据权限(对应于第一操作集合)的不同可以设置不同的有效期。例如,对于一些针对文件的修改、删除等高危操作,令牌的有效期会设置的尽量短;对于一些查看文件的权限,有效期可以放宽。In this implementation manner, the first condition further includes: the server can quickly and accurately determine that the token is valid when the time when the server receives the first file operation request is within the validity period. In addition, by setting the validity period of the token, the adverse effects caused by the leakage of the token can be reduced. In some embodiments, the server may set different validity periods according to different permissions (corresponding to the first operation set). For example, for some high-risk operations such as modification and deletion of files, the validity period of the token will be set as short as possible; for some permissions to view files, the validity period can be relaxed.
图1中的方法流程可理解为基于令牌的访问权限控制,与登录认证方式(即登录文件管理系统的方式)解耦。也就是说,图1中的方法流程实现的访问权限控制与登录认证方式无关。不同终端设备的登录认证方式可能不同,但文件的权限访问控制均可以通过令牌的方式统一。The method flow in FIG. 1 can be understood as token-based access authority control, which is decoupled from the login authentication method (ie, the method of logging in to the file management system). That is to say, the access authority control implemented by the method flow in FIG. 1 has nothing to do with the login authentication method. The login authentication methods of different terminal devices may be different, but the permission access control of files can be unified through tokens.
在一个实施例中,服务器还可执行如下步骤:In one embodiment, the server may also perform the following steps:
103、服务器接收来自终端设备的第二文件操作请求。103. The server receives the second file operation request from the terminal device.
上述第二文件操作请求用于请求对第三路径的文件执行第二操作。上述第二文件操作请求携带有第二令牌,上述第二令牌包括第四路径、第二操作集合。上述第二操作集合包括至少一项操作。第二文件操作请求与第一文件操作请求类似。The above-mentioned second file operation request is used to request to perform the second operation on the file of the third path. The second file operation request carries a second token, and the second token includes a fourth path and a second operation set. The above-mentioned second operation set includes at least one operation. The second file operation request is similar to the first file operation request.
104、在第二文件操作请求未满足第二条件的情况下,服务器拒绝第二文件操作请求。104. If the second file operation request does not satisfy the second condition, the server rejects the second file operation request.
上述第二条件包括:上述第二令牌通过上述服务器的合法性校验、上述第二操作包含于上述第二操作集合以及上述第四路径包括上述第三路径。服务器拒绝第二文件操作请求可以是:服务器向终端设备发送一个响应信息,该响应信息用于指示服务器拒绝第二文件操作请求。服务器拒绝第二文件操作请求也可以是:服务器针对第二文件操作请求,不作任何响应(包括不对第三路径的文件执行第二操作)。The second condition includes: the second token passes the validity check of the server, the second operation is included in the second operation set, and the fourth path includes the third path. The server rejecting the second file operation request may be: the server sends a response message to the terminal device, where the response message is used to instruct the server to reject the second file operation request. The server rejecting the second file operation request may also mean that the server does not respond to the second file operation request (including not performing the second operation on the file in the third path).
在一个可能的实现方式中,上述第二令牌还包括上述第二令牌的有效期;上述第二条件还包括:上述服务器接收到上述第二文件操作请求的时间在上述第二令牌的有效期内。In a possible implementation manner, the second token further includes the validity period of the second token; the second condition further includes: the time when the server receives the second file operation request is within the validity period of the second token Inside.
本申请实施例中,服务器在接收到文件操作(如第一文件操作请求)满足预设条件(如第一条件)的情况下,对文件执行文件操作请求对应的操作(如第一操作),在服务器在接收到文件操作(如第二文件操作请求)未满足预设条件(如第二条件)的情况下,拒绝该文件操作请求(第二文件操作请求);由此服务器只需要验证文件操作中携带的令牌即可实现权限控制,不需要查询用户(对应于终端设备)的权限信息,可以更快地验证用户的权限,进而更快地响应文件操作请求。In this embodiment of the present application, when the server receives a file operation (such as the first file operation request) and satisfies a preset condition (such as the first condition), the server performs an operation corresponding to the file operation request (such as the first operation) on the file, When the server receives a file operation (such as the second file operation request) that does not meet the preset condition (such as the second condition), it rejects the file operation request (the second file operation request); thus the server only needs to verify the file Permission control can be realized by the token carried in the operation, without querying the permission information of the user (corresponding to the terminal device), the user's permission can be verified faster, and the file operation request can be responded faster.
图2为本申请实施例提供的另一种在线文件的权限控制方法流程图。图2中的方法流程是对图1中的方法流程的细化和完善。如图2所示,本申请实施例提供的方法步骤可以通过服务器等硬件设备执行,或者通过处理器运行计算机可执行代码的方式执行,该方法包括:FIG. 2 is a flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application. The method flow in FIG. 2 is a refinement and improvement of the method flow in FIG. 1 . As shown in FIG. 2 , the steps of the method provided by the embodiment of the present application may be performed by a hardware device such as a server, or performed by a processor running computer-executable code, and the method includes:
201、服务器接收来自终端设备的第一文件操作请求。201. The server receives a first file operation request from a terminal device.
这里,所述步骤201和所述步骤101相同。Here, the step 201 is the same as the step 101 .
202、服务器对第一令牌进行合法性校验和有效性校验。202. The server performs validity check and validity check on the first token.
上述有效性校验为校验上述服务器接收到上述第一文件操作请求的时间是否在上述有效期内。在一个可能的实现方式中,服务器可先对第一令牌进行合法性校验,在该第一令牌通过合法性校验的情况下,再对该第一令牌进行有效性校验。在另一个可能的实现方式中,服务器可先对第一令牌进行有效性校验,在该第一令牌通过有效性校验之后,再对该第一令牌进行合法性校验。在又一个可能的实现方式中,服务器可同时(或者说并行)对第一令牌进行合法性校验以及对该第一令牌进行有效性校验。The validity check is to check whether the time when the server receives the first file operation request is within the validity period. In a possible implementation manner, the server may first perform validity check on the first token, and then perform validity check on the first token if the first token passes the validity check. In another possible implementation manner, the server may first perform validity verification on the first token, and then perform validity verification on the first token after the first token passes the validity verification. In another possible implementation manner, the server may simultaneously (or in parallel) perform validity verification on the first token and perform validity verification on the first token.
203、在第一令牌通过合法性校验和有效性校验的情况下,服务器验证第一操作是否包含于第一操作集合以及第二路径是否包括第一路径。203. In the case that the first token passes the validity check and the validity check, the server verifies whether the first operation is included in the first operation set and whether the second path includes the first path.
第一令牌通过合法性校验和有效性校验,才能表征第一令牌是合法且有效的。应理解,若第一令牌未通过合法性校验或者有效性校验,则服务器不必验证第一操作是否包含于第一操作集合以及第二路径是否包括第一路径,这样就可避免无用的处理流程。Only when the first token passes the validity check and the validity check can it indicate that the first token is legal and valid. It should be understood that if the first token fails the validity check or the validity check, the server does not need to verify whether the first operation is included in the first operation set and whether the second path includes the first path, which can avoid useless Process flow.
204、在第一文件操作请求满足第一条件的情况下,服务器对第一路径的文件执行第一操作。204. In the case that the first file operation request satisfies the first condition, the server performs the first operation on the file of the first path.
步骤204可与步骤102相同,这里不再详述。Step 204 may be the same as step 102 and will not be described in detail here.
本申请实施例中,先对第一令牌进行合法性校验和有效性校验,在该第一令牌通过合法 性校验和有效性校验之后,再验证第一操作是否包含于第一操作集合以及第二路径是否包括第一路径;可以减少验证第一操作是否包含于第一操作集合以及第二路径是否包括第一的操作,减少部分不必要的操作,从而节省验证耗时,提高处理效率。In this embodiment of the present application, the first token is checked for validity and validity, and after the first token passes the validity check and validity check, it is then checked whether the first operation is included in the first operation. Whether an operation set and the second path include the first path; it can reduce the verification of whether the first operation is included in the first operation set and whether the second path includes the first operation, and reduce some unnecessary operations, thereby saving verification time. Improve processing efficiency.
图3为本申请实施例提供的另一种在线文件的权限控制方法流程图。图3中的方法流程是对图1中的方法流程的细化和完善。如图3所示,本申请实施例提供的方法步骤可以通过服务器等硬件设备执行,或者通过处理器运行计算机可执行代码的方式执行,该方法包括:FIG. 3 is a flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application. The method flow in FIG. 3 is a refinement and improvement of the method flow in FIG. 1 . As shown in FIG. 3 , the steps of the method provided by the embodiment of the present application may be performed by a hardware device such as a server, or performed by a processor running computer-executable code, and the method includes:
301、服务器接收来自终端设备的令牌获取请求。301. The server receives a token acquisition request from a terminal device.
上述令牌获取请求用于获取对第一路径的文件进行第一操作所需的令牌。The above token acquisition request is used to acquire the token required to perform the first operation on the file of the first path.
在一个可能的实现方式中,服务器在执行步骤301之前,可通过终端设备使用目标账号登录其运行的文件管理系统的登录认证;步骤301可替换为:服务器接收到终端设备针对上述文件管理系统中的第一路径的文件的访问操作。举例来说,终端设备可使用目标账号登录服务器运行的文件管理系统,服务器接收到终端设备针对该文件管理系统中的第一路径的文件的访问操作(例如点击该文件的图标的操作)。In a possible implementation manner, before executing step 301, the server can use the terminal device to log in to the file management system it is running for login authentication using the target account; step 301 can be replaced with: the server receives the terminal device's target account for the above-mentioned file management system. The first path of the file access operation. For example, the terminal device can use the target account to log in to the file management system run by the server, and the server receives an access operation (eg, an operation of clicking the icon of the file) from the terminal device to the file of the first path in the file management system.
302、服务器根据令牌获取请求,获取终端设备登录的目标账号的角色权限信息。302. The server obtains, according to the token obtaining request, the role permission information of the target account logged in by the terminal device.
上述目标账号为上述终端设备登录服务器运行的文件管理系统使用的账号。目标账号的角色权限信息可以包括目标账号的角色以及该角色对应的权限。服务器运行的文件管理系统支持多种不同角色的账号,不同角色的账号具备的权限不同,即一个角色对应一定的权限。举例来说,服务器运行的文件管理系统支持管理者、普通用户以及高级用户3种不同角色的账号,目标账号的角色为这3种角色中的任一种,目标账号具备的权限为目标账号的角色对应的权限。在该举例中,管理者对应的权限最多、普通用户对应的权限最少。在实际应用中,可根据实际需求设置服务器运行的文件管理系统支持的各种角色以及各种角色对应的权限,以便更方便地管理不同角色的账号的权限。The above-mentioned target account is an account used by the above-mentioned terminal device to log in to the file management system running on the server. The role permission information of the target account may include the role of the target account and the permission corresponding to the role. The file management system running on the server supports a variety of accounts with different roles. Accounts with different roles have different permissions, that is, a role corresponds to a certain permission. For example, the file management system running on the server supports accounts with three different roles: administrator, ordinary user, and advanced user. The role of the target account is any of these three roles, and the permissions of the target account are those of the target account. The permissions corresponding to the role. In this example, the administrator has the most authority, and the ordinary user has the least authority. In practical applications, various roles supported by the file management system running on the server and permissions corresponding to various roles can be set according to actual requirements, so as to more conveniently manage the permissions of accounts with different roles.
303、服务器根据角色权限信息,生成第一令牌。303. The server generates a first token according to the role permission information.
在一些实施例中,服务器可运行有文件服务应用程序,该文件服务应用程序(对应于文件管理系统)可提供文件服务。文件服务可维护独立密钥,该独立密钥用于加密令牌。文件服务还可提供令牌生成接口,该令牌生成接口可提供路径(例如第一路径)、操作集合(例如第一操作集合)以及过期时间参数(对应于有效期),并供调用方(例如在线文件的所有者)自定义。令牌生成接口可先采用JSON Web Token生成初始令牌,再基于散列消息认证码安全散列算法256(Hash-based Message Authentication Code Secure Hash Algorithm 256,HMACSHA256)算法加密该初始令牌,得到上述第一令牌,令牌签名内容无法被外部破解,提高了令牌和文件访问的安全性。上述服务器可存储密钥(Secret)。文件服务可实现对令牌和文件操作请求中的操作(例如上述第一操作)做校验。服务器可提供业务网关服务,该业务网关服务可处理认证任务,例如对用户登录文件管理系统使用的账号和密码进行认证。服务器还可具备独立的用户中心,该用户中心用于维护用户的基本信息和角色权限信息。用户登录文件管理系统之后,服务器可调用用户中心的认证接口校验用户的角色权限信息等。服务器可通过用户中心获取用户的角色权限信息,并调用文件服务的令牌生成接口来获得令牌。服务器可预先配置有不同角色权限信息所具备的访问权限,因此调用文件服务的令牌生成接口可生成与不同角色权限信息相匹配的令牌。In some embodiments, the server may run a file serving application, which (corresponding to a file management system) may provide file services. The file service maintains a separate key, which is used to encrypt the token. The file service may also provide a token generation interface, which may provide a path (eg, the first path), a set of operations (eg, the first set of operations), and an expiration time parameter (corresponding to the validity period), which can be provided by the caller (eg, the owner of the online file) to customize. The token generation interface can first use JSON Web Token to generate the initial token, and then encrypt the initial token based on the Hash-based Message Authentication Code Secure Hash Algorithm 256 (HMACSHA256) algorithm to obtain the above The first token, the content of the token signature cannot be cracked externally, which improves the security of token and file access. The above server may store a secret key (Secret). The file service can verify the token and the operation in the file operation request (for example, the above-mentioned first operation). The server can provide a business gateway service, and the business gateway service can handle authentication tasks, such as authenticating the account and password used by the user to log in to the file management system. The server can also have an independent user center, which is used to maintain the user's basic information and role permission information. After the user logs in to the file management system, the server can call the authentication interface of the user center to verify the user's role and permission information. The server can obtain the user's role permission information through the user center, and call the token generation interface of the file service to obtain the token. The server can be pre-configured with access rights of different role rights information, so calling the token generation interface of the file service can generate tokens that match the rights information of different roles.
304、服务器向终端设备发送第一令牌。304. The server sends the first token to the terminal device.
305、服务器接收来自终端设备的第一文件操作请求。305. The server receives the first file operation request from the terminal device.
306、在第一文件操作请求满足第一条件的情况下,服务器对第一路径的文件执行第一操作。306. In the case that the first file operation request satisfies the first condition, the server performs the first operation on the file of the first path.
步骤306可与步骤102相同,这里不再详述。在一些实施例中,服务器在执行步骤306之前,可执行图2中的步骤202和步骤203,进而判断第一文件操作请求是否满足第一条件。Step 306 may be the same as step 102 and will not be described in detail here. In some embodiments, before executing step 306, the server may execute steps 202 and 203 in FIG. 2, and then determine whether the first file operation request satisfies the first condition.
本申请实施例中,服务器生成第一令牌,并向终端设备发送第一令牌。另外,服务器还校验该第一令牌的有效性和合法性。第一令牌的生成和校验统一由服务器管控,服务器基于HMACSHA256算法加密令牌生成接口生成的初始令牌以得到第一令牌,他人无法伪造令牌, 可以提高安全性。In this embodiment of the present application, the server generates the first token, and sends the first token to the terminal device. In addition, the server also verifies the validity and legality of the first token. The generation and verification of the first token are uniformly managed and controlled by the server. The server encrypts the initial token generated by the token generation interface based on the HMACSHA256 algorithm to obtain the first token. Others cannot forge the token, which can improve security.
本申请实施例提供的在线文件的权限控制方案需要服务器和终端设备配合才能实现。前述实施例描述了服务器在本申请实施例提供的在线文件的权限控制方案中执行的方法流程。下面结合附图介绍终端设备在本申请实施例提供的在线文件的权限控制方案中执行的方法流程。The authorization control solution for an online file provided by the embodiment of the present application requires the cooperation of a server and a terminal device to be implemented. The foregoing embodiments describe the method flow performed by the server in the online file permission control solution provided by the embodiments of the present application. The following describes the method flow performed by the terminal device in the online file authority control solution provided by the embodiments of the present application with reference to the accompanying drawings.
图4为本申请实施例提供的另一种在线文件的权限控制方法流程图。如图4所示,本申请实施例提供的方法步骤可以通过终端设备等硬件设备执行,或者通过处理器运行计算机可执行代码的方式执行,该方法包括:FIG. 4 is a flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application. As shown in FIG. 4 , the steps of the method provided by this embodiment of the present application may be executed by hardware devices such as terminal devices, or executed by a processor running computer-executable codes, and the method includes:
401、终端设备生成第一文件操作请求。401. The terminal device generates a first file operation request.
上述第一文件操作请求用于请求对第一路径的文件执行第一操作。上述第一文件操作请求携带有第一令牌,上述第一令牌包括第二路径、第一操作集合。上述第一操作集合包括至少一项操作。上述第一路径和上述第二路径均为上述服务器运行的文件管理系统中的路径。上述第一令牌用于上述服务器校验上述终端设备是否具备对上述第一路径的文件执行上述第一操作的权限。The above-mentioned first file operation request is used to request to perform the first operation on the file of the first path. The first file operation request carries a first token, and the first token includes a second path and a first operation set. The above-mentioned first set of operations includes at least one operation. The above-mentioned first path and the above-mentioned second path are both paths in the file management system running on the above-mentioned server. The above-mentioned first token is used by the above-mentioned server to verify whether the above-mentioned terminal device has the authority to perform the above-mentioned first operation on the file of the above-mentioned first path.
步骤401的实现方式可以是:终端设备获取浏览器或客户端应用缓存的第一令牌;基于上述第一令牌,生成上述第一文件操作请求。The implementation of step 401 may be as follows: the terminal device obtains the first token cached by the browser or the client application; and based on the above-mentioned first token, the above-mentioned first file operation request is generated.
402、终端设备向服务器发送第一文件操作请求。402. The terminal device sends a first file operation request to the server.
本申请实施例中,终端设备向服务器发送携带第一令牌第一文件操作请求,以便于该服务器利用该第一令牌快速、准确地校验该终端设备(对应于用户)是否具备对第一路径的文件执行第一操作的权限。In this embodiment of the present application, the terminal device sends a first file operation request carrying the first token to the server, so that the server can use the first token to quickly and accurately verify whether the terminal device (corresponding to the user) is capable of Permission to perform the first operation on a file with a path.
图5为本申请实施例提供的另一种在线文件的权限控制方法流程图。图5中的方法流程是对图4中的方法流程的细化和完善。如图5所示,本申请实施例提供的方法步骤可以通过终端设备等硬件设备执行,或者通过处理器运行计算机可执行代码的方式执行,该方法包括:FIG. 5 is a flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application. The method flow in FIG. 5 is a refinement and improvement of the method flow in FIG. 4 . As shown in FIG. 5 , the steps of the method provided by this embodiment of the present application may be executed by hardware devices such as terminal devices, or executed by a processor running computer-executable codes, and the method includes:
501、终端设备使用目标账号登录服务器运行的文件管理系统。501. The terminal device uses the target account to log in to the file management system run by the server.
502、响应于用户针对文件管理系统中的第一路径的文件的访问操作,终端设备向服务器发送令牌获取请求。502. In response to the user's access operation to the file of the first path in the file management system, the terminal device sends a token acquisition request to the server.
在一个实施例中,终端设备使用目标账号登录服务器运行的文件管理系统之后,该终端设备可显示该文件管理系统的页面,该页面可包括一个或多个文件夹,每个文件夹中包括至少一个文件;用户打开(例如点击)第一路径的文件的操作即为该用户针对文件管理系统中的第一路径的文件的访问操作。In one embodiment, after the terminal device uses the target account to log in to the file management system run by the server, the terminal device may display a page of the file management system, and the page may include one or more folders, each folder including at least A file; the user's operation of opening (eg, clicking) the file of the first path is the user's access operation to the file of the first path in the file management system.
步骤502可以是:响应于用户针对文件管理系统中的第一路径的文件的访问操作,终端设备在未缓存第一路径的文件对应的令牌的情况下,向服务器发送令牌获取请求。一个路径的文件对应的令牌可以是包括该路径的令牌。Step 502 may be: in response to the user's access operation to the file of the first path in the file management system, the terminal device sends a token acquisition request to the server without caching the token corresponding to the file of the first path. A token corresponding to a file of a path may be a token that includes the path.
503、终端设备接收来自服务器的第一令牌,并缓存第一令牌。503. The terminal device receives the first token from the server, and caches the first token.
终端设备缓存第一令牌可以是:终端设备上的浏览器或者客户端应用缓存第一令牌。The terminal device caching the first token may be: a browser on the terminal device or a client application caches the first token.
504、终端设备基于第一令牌,生成第一文件操作请求。504. The terminal device generates a first file operation request based on the first token.
步骤504一种可能的实现方式如下:响应于用户针对文件管理系统中的第一路径的文件的访问操作,终端设备在缓存有第一路径的文件对应的第一令牌的情况下,基于第一令牌,生成第一文件操作请求。在一些实施例中,终端设备可缓存有一个或多个令牌,不同令牌对应的路径不同;终端设备在生成任意文件操作请求之前可先获取缓存中与该文件操作请求相对应的令牌。例如,终端设备待生成对第一路径的文件进行操作的文件操作请求,该终端设备可获取包括的路径为该第一路径的令牌(例如第一令牌)。A possible implementation of step 504 is as follows: in response to the user's access operation to the file of the first path in the file management system, the terminal device caches the first token corresponding to the file of the first path, based on the first token. A token that generates the first file operation request. In some embodiments, the terminal device may cache one or more tokens, and the paths corresponding to different tokens are different; before generating any file operation request, the terminal device may first obtain the token corresponding to the file operation request in the cache . For example, if the terminal device is to generate a file operation request for operating a file of the first path, the terminal device may obtain a token (eg, a first token) whose path is the first path.
505、终端设备向服务器发送第一文件操作请求。505. The terminal device sends a first file operation request to the server.
本申请实施例中,终端设备可快速地获取第一令牌,从而快速生成第一文件操作请求,以便于服务器利用该第一令牌快速、准确地校验该终端设备(对应于用户)是否具备对第一路径的文件执行第一操作的权限。In this embodiment of the present application, the terminal device can quickly obtain the first token, thereby quickly generating the first file operation request, so that the server can use the first token to quickly and accurately verify whether the terminal device (corresponding to the user) is Has the permission to perform the first operation on the file in the first path.
图6为本申请实施例提供的一种在线文件的权限控制方法交互流程图。图6中的方法交 互流程包括服务器执行的方法流程和终端设备执行的方法流程。如图6所示,本申请实施例提供的方法步骤可以通过终端设备等硬件设备执行,或者通过处理器运行计算机可执行代码的方式执行,该方法交互流程包括:FIG. 6 is an interactive flowchart of an online file permission control method provided by an embodiment of the present application. The method interaction flow in Fig. 6 includes the method flow executed by the server and the method flow executed by the terminal device. As shown in FIG. 6 , the steps of the method provided by this embodiment of the present application may be executed by hardware devices such as terminal devices, or executed by a processor running computer-executable codes, and the interaction process of the method includes:
601、终端设备检测到用户针对文件管理系统中的第一路径的文件的访问操作。601. The terminal device detects an access operation by the user to the file of the first path in the file management system.
文件管理系统运行于服务器。The file management system runs on the server.
602、终端设备获取浏览器或客户端应用缓存的第一令牌。602. The terminal device acquires the first token cached by the browser or the client application.
上述第一令牌包括第二路径、第一操作集合,上述第一操作集合包括至少一项操作。上述第二路径包括上述第一路径。步骤602一种可能的实现方式如下:终端设备从浏览器或者客户端应用缓存的多个令牌中获取包括的路径为第一路径的令牌,得到第一令牌。The first token includes a second path and a first operation set, and the first operation set includes at least one operation. The above-mentioned second path includes the above-mentioned first path. A possible implementation manner of step 602 is as follows: the terminal device obtains the token whose path is the first path from the multiple tokens cached by the browser or the client application, and obtains the first token.
603、终端设备基于第一令牌,生成第一文件操作请求。603. The terminal device generates a first file operation request based on the first token.
上述第一文件操作请求用于请求对第一路径的文件执行第一操作。上述第一文件操作请求携带有第一令牌。The above-mentioned first file operation request is used to request to perform the first operation on the file of the first path. The above-mentioned first file operation request carries the first token.
604、终端设备向服务器发送第一文件操作请求。604. The terminal device sends a first file operation request to the server.
605、在第一文件操作请求满足第一条件的情况下,服务器对文件执行第一操作。605. In the case that the first file operation request satisfies the first condition, the server performs the first operation on the file.
本申请实施例中,服务器在第一文件操作请求满足第一条件的情况下,对文件执行第一操作;不需要校验用户(对应于终端设备)的权限,可以更快地验证用户的权限,进而更快地响应该第一文件操作请求。In the embodiment of the present application, the server performs the first operation on the file when the first file operation request satisfies the first condition; it does not need to verify the authority of the user (corresponding to the terminal device), and the authority of the user can be verified more quickly , so as to respond to the first file operation request faster.
应理解,终端设备可执行图6中的方法流程的前提是终端设备已缓存第一令牌。下面结合附图介绍终端设备在未缓存相应令牌情况下实现的权限控制方法交互流程。It should be understood that the premise that the terminal device can execute the method flow in FIG. 6 is that the terminal device has cached the first token. The following describes the interaction flow of the authority control method implemented by the terminal device without caching the corresponding token with reference to the accompanying drawings.
图7为本申请实施例提供的另一种在线文件的权限控制方法交互流程图。图7中的方法交互流程包括终端设备获得并缓存第一令牌的步骤。如图7所示,该方法交互流程包括:FIG. 7 is an interactive flowchart of another method for controlling the authority of an online file provided by an embodiment of the present application. The method interaction flow in FIG. 7 includes the step of obtaining and buffering the first token by the terminal device. As shown in Figure 7, the interaction flow of the method includes:
701、终端设备检测到用户针对文件管理系统中的第一路径的文件的访问操作。701. The terminal device detects an access operation of the user to the file of the first path in the file management system.
终端设备在步骤701之前,可使用目标账号登录服务器运行的文件管理系统。Before step 701, the terminal device can use the target account to log in to the file management system run by the server.
702、终端设备在未缓存包括第一路径的令牌的情况下,向服务器发送令牌获取请求。702. The terminal device sends a token acquisition request to the server in the case that the token including the first path is not cached.
上述令牌获取请求用于获取对上述第一路径的文件进行上述第一操作所需的令牌。上述令牌获取请求可携带指示上述第一路径的信息或者上述第一路径。The above token acquisition request is used to acquire the token required to perform the above first operation on the file in the above first path. The token acquisition request may carry information indicating the first path or the first path.
终端设备未缓存包括第一路径的令牌的情况可以是:终端设备未从浏览器或者客户端应用缓存的多个令牌中查询到包括的路径为第一路径的令牌。The case where the terminal device does not cache the token including the first path may be that the terminal device does not query the token including the first path from the plurality of tokens cached by the browser or the client application.
703、服务器根据令牌获取请求,获取终端设备登录的目标账号的角色权限信息。703. The server obtains, according to the token obtaining request, the role permission information of the target account logged in by the terminal device.
上述目标账号为上述终端设备登录服务器运行的文件管理系统使用的账号。The above-mentioned target account is an account used by the above-mentioned terminal device to log in to the file management system running on the server.
704、服务器根据角色权限信息,生成第一令牌。704. The server generates a first token according to the role permission information.
角色权限信息可称为访问权限信息(对应于第一操作集合)。在一些实施例中,用户A可采用如下方式为用户B配置角色权限信息:1)、用户A登录服务器运行的文件管理系统;2)、用户A在文件管理系统中创建文件。3)、用户A在文件管理系统中为用户B配置角色权限信息(对应于用户B可对该文件执行的操作)。The role permission information may be referred to as access permission information (corresponding to the first set of operations). In some embodiments, user A can configure role permission information for user B in the following ways: 1) User A logs in to the file management system run by the server; 2) User A creates a file in the file management system. 3) User A configures role permission information for user B in the file management system (corresponding to the operations that user B can perform on the file).
705、服务器向终端设备发送第一令牌。705. The server sends the first token to the terminal device.
706、终端设备缓存第一令牌,并基于第一令牌,生成第一文件操作请求。706. The terminal device caches the first token, and generates a first file operation request based on the first token.
应理解,终端设备缓存第一令牌之后,终端设备向服务器请求对第一路径的文件执行任意操作时,可将该第一令牌以请求头或者请求参数的方式带入文件操作请求。也就是说,终端设备后续请求对第一路径的文件执行任意操作时,可从缓存中获取第一令牌,并生成相应的文件操作请求,而不用再次从服务器获得第一令牌。只有当第一令牌失效之后,终端设备才需要再次从服务器获得第一令牌,并缓存。It should be understood that after the terminal device caches the first token, when the terminal device requests the server to perform any operation on the file of the first path, the first token can be brought into the file operation request in the form of a request header or request parameter. That is, when the terminal device subsequently requests to perform any operation on the file of the first path, it can obtain the first token from the cache and generate a corresponding file operation request without obtaining the first token from the server again. Only after the first token becomes invalid, the terminal device needs to obtain the first token from the server again and cache it.
707、终端设备向服务器发送第一文件操作请求。707. The terminal device sends a first file operation request to the server.
708、在第一文件操作请求满足第一条件的情况下,服务器对第一路径的文件执行第一操作。708. In the case that the first file operation request satisfies the first condition, the server performs the first operation on the file of the first path.
本申请实施例中,终端设备在未缓存有所需的令牌的情况下,可先获得并缓存所需的令牌,以便于后续更快地验证用户的权限。In the embodiment of the present application, in the case where the required token is not cached, the terminal device may first obtain and cache the required token, so as to verify the user's authority more quickly in the future.
图8为本申请实施例提供的一种服务器的结构示意图。如图8所示,服务器包括:FIG. 8 is a schematic structural diagram of a server according to an embodiment of the present application. As shown in Figure 8, the server includes:
收发单元801,配置为接收来自终端设备的第一文件操作请求;上述第一文件操作请求用于请求对第一路径的文件执行第一操作,上述第一文件操作请求携带有第一令牌,上述第一令牌包括第二路径、第一操作集合,上述第一操作集合包括至少一项操作,上述第一路径和上述第二路径均为上述服务器运行的文件管理系统中的路径;The transceiver unit 801 is configured to receive a first file operation request from a terminal device; the above-mentioned first file operation request is used to request to perform a first operation on a file of a first path, and the above-mentioned first file operation request carries a first token, The first token includes a second path and a first operation set, the first operation set includes at least one operation, and the first path and the second path are both paths in the file management system running on the server;
处理单元802,配置为在上述第一文件操作请求满足第一条件的情况下,对上述文件执行上述第一操作;上述第一条件包括:上述第一令牌通过上述服务器的合法性校验、上述第一操作包含于上述第一操作集合以及上述第二路径包括上述第一路径。The processing unit 802 is configured to perform the above-mentioned first operation on the above-mentioned file when the above-mentioned first file operation request satisfies a first condition; the above-mentioned first condition includes: the above-mentioned first token passes the validity check of the above-mentioned server, The first operation is included in the first operation set and the second path includes the first path.
在一个可能的实现方式中,上述第一令牌还包括上述第一令牌的有效期;上述第一条件还包括:上述服务器接收到上述第一文件操作请求的时间在上述有效期内。In a possible implementation manner, the first token further includes a validity period of the first token; the first condition further includes: the time when the server receives the first file operation request is within the validity period.
在一个可能的实现方式中,处理单元802,还配置为对上述第一令牌进行合法性校验和有效性校验;上述有效性校验为校验上述服务器接收到上述第一文件操作请求的时间是否在上述有效期内;在上述第一令牌通过合法性校验和有效性校验的情况下,验证上述第一操作是否包含于上述第一操作集合以及上述第二路径是否包括上述第一路径。In a possible implementation manner, the processing unit 802 is further configured to perform validity check and validity check on the above-mentioned first token; the above-mentioned validity check is to verify that the above-mentioned server receives the above-mentioned first file operation request Whether the above-mentioned time is within the above-mentioned validity period; if the above-mentioned first token passes the validity check and validity check, verify whether the above-mentioned first operation is included in the above-mentioned first operation set and whether the above-mentioned second path includes the above-mentioned first operation. a path.
在一个可能的实现方式中,处理单元802,还配置为生成上述第一令牌;上述收发单元,还配置为向上述终端设备发送上述第一令牌。In a possible implementation manner, the processing unit 802 is further configured to generate the above-mentioned first token; the above-mentioned transceiver unit is further configured to send the above-mentioned first token to the above-mentioned terminal device.
在一个可能的实现方式中,处理单元802,配置为基于HMACSHA256算法加密上述初始令牌,得到上述第一令牌。处理单元802,配置为采用JSON Web Token生成上述初始令牌。In a possible implementation manner, the processing unit 802 is configured to encrypt the above-mentioned initial token based on the HMACSHA256 algorithm to obtain the above-mentioned first token. The processing unit 802 is configured to use JSON Web Token to generate the above-mentioned initial token.
在一个可能的实现方式中,收发单元801,还配置为接收来自上述终端设备的令牌获取请求,上述令牌获取请求用于获取对上述第一路径的文件进行上述第一操作所需的令牌;处理单元802,还配置为根据上述令牌获取请求,获取上述终端设备登录的目标账号的角色权限信息;上述目标账号为上述终端设备登录上述文件管理系统使用的账号;处理单元802,配置为根据上述角色权限信息,生成上述第一令牌。In a possible implementation manner, the transceiver unit 801 is further configured to receive a token acquisition request from the above-mentioned terminal device, where the above-mentioned token acquisition request is used to acquire a token required to perform the above-mentioned first operation on the file of the above-mentioned first path The processing unit 802 is further configured to obtain the role permission information of the target account logged in by the terminal device according to the token acquisition request; the target account is the account used by the terminal device to log in to the file management system; the processing unit 802 is configured to configure To generate the above-mentioned first token according to the above-mentioned role permission information.
在一个可能的实现方式中,处理单元802,还配置为通过上述终端设备使用上述目标账号登录上述文件管理系统的登录认证;收发单元801,配置为接收上述终端设备针对上述文件管理系统中的上述第一路径的文件的访问操作。In a possible implementation manner, the processing unit 802 is further configured to use the above-mentioned target account to log in to the above-mentioned file management system through the above-mentioned terminal device for login authentication; The access operation of the file of the first path.
在一个可能的实现方式中,收发单元801,还配置为接收来自上述终端设备的第二文件操作请求;上述第二文件操作请求用于请求对第三路径的文件执行第二操作,上述第二文件操作请求携带有第二令牌,上述第二令牌包括第四路径、第二操作集合,上述第二操作集合包括至少一项操作;处理单元802,还配置为在上述第二文件操作请求未满足第二条件的情况下,拒绝上述第二文件操作请求;上述第二条件包括:上述第二令牌通过上述服务器的合法性校验、上述第二操作包含于上述第二操作集合以及上述第四路径包括上述第三路径。In a possible implementation manner, the transceiver unit 801 is further configured to receive a second file operation request from the above-mentioned terminal device; the above-mentioned second file operation request is used to request to perform a second operation on the file of the third path, and the above-mentioned second file operation request The file operation request carries a second token, and the second token includes a fourth path and a second operation set, and the second operation set includes at least one operation; the processing unit 802 is further configured to perform the operation in the second file operation request. If the second condition is not met, the second file operation request is rejected; the second condition includes: the second token passes the validity check of the server, the second operation is included in the second operation set, and the above The fourth path includes the third path described above.
图9为本申请实施例提供的一种终端设备的结构示意图。如图9所示,终端设备包括:FIG. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in Figure 9, the terminal equipment includes:
处理单元901,配置为生成第一文件操作请求;上述第一文件操作请求用于请求对第一路径的文件执行第一操作,上述第一文件操作请求携带有第一令牌,上述第一令牌包括第二路径、第一操作集合,上述第一操作集合包括至少一项操作,上述第一路径和上述第二路径均为上述服务器运行的文件管理系统中的路径,上述第一令牌用于上述服务器校验上述终端设备是否具备对上述第一路径的文件执行上述第一操作的权限;The processing unit 901 is configured to generate a first file operation request; the above-mentioned first file operation request is used to request to perform a first operation on a file of a first path, and the above-mentioned first file operation request carries a first token, and the above-mentioned first command The card includes a second path and a first operation set, the first operation set includes at least one operation, the first path and the second path are both paths in the file management system run by the server, and the first token is used for Verifying on the server whether the terminal device has the authority to perform the first operation on the file in the first path;
收发单元902,配置为向上述服务器发送上述第一文件操作请求。The transceiver unit 902 is configured to send the above-mentioned first file operation request to the above-mentioned server.
在一个可能的实现方式中,上述第一令牌还包括上述第一令牌的有效期,上述有效期用于校验上述第一令牌的有效性。In a possible implementation manner, the above-mentioned first token further includes a validity period of the above-mentioned first token, and the above-mentioned validity period is used to verify the validity of the above-mentioned first token.
在一个可能的实现方式中,处理单元901,还配置为获取浏览器或客户端应用缓存的上述第一令牌;处理单元901,配置为基于上述第一令牌,生成上述第一文件操作请求。In a possible implementation manner, the processing unit 901 is further configured to obtain the above-mentioned first token cached by the browser or the client application; the processing unit 901 is configured to generate the above-mentioned first file operation request based on the above-mentioned first token .
在一个可能的实现方式中,收发单元902,还配置为向上述服务器发送令牌获取请求,上述令牌获取请求用于获取对上述第一路径的文件进行上述第一操作所需的令牌;接收来自上述服务器的上述第一令牌,并缓存上述第一令牌。In a possible implementation manner, the transceiver unit 902 is further configured to send a token acquisition request to the above-mentioned server, where the above-mentioned token acquisition request is used to acquire the token required to perform the above-mentioned first operation on the file of the above-mentioned first path; The above-mentioned first token from the above-mentioned server is received, and the above-mentioned first token is cached.
在一个可能的实现方式中,处理单元901,还配置为使用目标账号登录上述文件管理系统;收发单元902,还配置为响应于用户针对上述文件管理系统中的上述第一路径的文件的访问操作,向上述服务器发送上述令牌获取请求。In a possible implementation manner, the processing unit 901 is further configured to log in to the above-mentioned file management system using the target account; the transceiver unit 902 is further configured to respond to a user's access operation to the file of the above-mentioned first path in the above-mentioned file management system , and send the above token acquisition request to the above server.
在一个可能的实现方式中,上述第一路径的文件为同一目录下的部分文件,上述第一操作包括:新建、修改、锁定、删除、移动、隐藏中的至少一项。In a possible implementation manner, the files in the first path are partial files in the same directory, and the first operation includes at least one of creating, modifying, locking, deleting, moving, and hiding.
应理解以上服务器和终端设备的各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。例如,以上各个单元可以为单独设立的处理元件,也可以集成同一个芯片中实现,此外,也可以以程序代码的形式存储于控制器的存储元件中,由处理器的某一个处理元件调用并执行以上各个单元的功能。此外各个单元可以集成在一起,也可以独立实现。这里的处理元件可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。该处理元件可以是通用处理器,例如中央处理器(Central Processing Unit,CPU),还可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个微处理器(Digital Signal Processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。It should be understood that the above division of each unit of the server and the terminal device is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated. For example, each of the above units can be separately established processing elements, or can be integrated into the same chip for implementation. In addition, they can also be stored in the storage element of the controller in the form of program codes, which are called and executed by a certain processing element of the processor. Perform the functions of each of the above units. In addition, each unit can be integrated together, or can be implemented independently. The processing element here may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method or each of the above-mentioned units may be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software. The processing element can be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU), or can be one or more integrated circuits configured to implement the above method, such as one or more specific integrated circuits (Application Specific Integrated Circuits) Integrated Circuit, ASIC), or, one or more microprocessors (Digital Signal Processor, DSP), or, or, one or more Field Programmable Gate Array (Field Programmable Gate Array, FPGA), etc.
图10是本申请实施例提供的一种服务器的结构示意图,该服务器1000可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器1022(例如,一个或一个以上处理器)和存储器1032,一个或一个以上存储应用程序1042或数据1044的存储介质1030(例如一个或一个以上海量存储设备)。其中,存储器1032和存储介质1030可以是短暂存储或持久存储。存储在存储介质1030的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。在一些实施例中,中央处理器1022可以设置为与存储介质1030通信,在服务器1000上执行存储介质1030中的一系列指令操作。10 is a schematic structural diagram of a server provided by an embodiment of the present application. The server 1000 may vary greatly due to different configurations or performance, and may include one or more central processing units 1022 (for example, one or more processing device) and memory 1032, one or more storage media 1030 (eg, one or more mass storage devices) that store applications 1042 or data 1044. Among them, the memory 1032 and the storage medium 1030 may be short-term storage or persistent storage. The program stored in the storage medium 1030 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. In some embodiments, the central processing unit 1022 may be configured to communicate with the storage medium 1030 to execute a series of instruction operations in the storage medium 1030 on the server 1000 .
服务器1000还可以包括一个或一个以上电源1026,一个或一个以上有线或无线网络接口1050,一个或一个以上输入输出接口1058,和/或,一个或一个以上操作系统1041,例如Windows ServerTM、Mac OS XTM、UnixTM、LinuxTM和FreeBSDTM等等。 Server 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058, and/or, one or more operating systems 1041, such as Windows Server™, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
上述实施例中由服务器所执行的步骤可以基于该图10所示的服务器结构。例如,中央处理器1022可实现图8中处理单元802的功能,输入输出接口1058可实现收发单元801的功能。The steps performed by the server in the above embodiment may be based on the server structure shown in FIG. 10 . For example, the central processing unit 1022 may implement the function of the processing unit 802 in FIG. 8 , and the input/output interface 1058 may implement the function of the transceiver unit 801 .
图11为本申请实施例提供的另一种终端设备110的结构示意图。如图11所示,图11所示的终端设备包括逻辑电路1101和接口1102。逻辑电路1101可实现图9中的处理单元901的功能。接口1102可实现图9中的收发单元902的功能。其中,该逻辑电路1101可以为芯片、处理电路、集成电路或片上系统(System on Chip,SoC)芯片等,接口1102可以为通信接口、输入输出接口等。本申请实施例中,逻辑电路和接口还可以相互耦合。对于逻辑电路和接口的连接方式,本申请实施例不作限定。FIG. 11 is a schematic structural diagram of another terminal device 110 provided by an embodiment of the present application. As shown in FIG. 11 , the terminal device shown in FIG. 11 includes a logic circuit 1101 and an interface 1102 . The logic circuit 1101 may implement the functions of the processing unit 901 in FIG. 9 . The interface 1102 can implement the functions of the transceiver unit 902 in FIG. 9 . Wherein, the logic circuit 1101 may be a chip, a processing circuit, an integrated circuit, or a System on Chip (SoC) chip, etc., and the interface 1102 may be a communication interface, an input/output interface, and the like. In this embodiment of the present application, the logic circuit and the interface may also be coupled to each other. The connection manner of the logic circuit and the interface is not limited in this embodiment of the present application.
图12是本申请实施例提供的一种终端设备的部分结构的框图。如图12所示,终端设备1200可以包括处理器1201、存储器1202、输入设备1203、输出设备1204以及总线1205。其中,处理器1201、存储器1202、输入设备1203、输出设备1204可通过总线1205实现彼此之间的通信连接。该总线1205可以分为地址总线、数据总线、控制总线等。为便于表示,图12中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。FIG. 12 is a block diagram of a partial structure of a terminal device provided by an embodiment of the present application. As shown in FIG. 12 , the terminal device 1200 may include a processor 1201 , a memory 1202 , an input device 1203 , an output device 1204 and a bus 1205 . Wherein, the processor 1201 , the memory 1202 , the input device 1203 , and the output device 1204 can implement communication connection with each other through the bus 1205 . The bus 1205 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 12, but it does not mean that there is only one bus or one type of bus.
处理器1201可以采用通用的中央处理器,微处理器,图形处理器(Graphics Processing Unit,GPU),应用专用集成电路,或者一个或多个集成电路,用于执行相关程序,以实现本申请实施例所提供的技术方案。处理器1201可实现图9中的处理单元901的功能。The processor 1201 can use a general-purpose central processing unit, a microprocessor, a graphics processing unit (Graphics Processing Unit, GPU), an application-specific integrated circuit, or one or more integrated circuits, for executing relevant programs to implement the implementation of the present application Examples of technical solutions provided. The processor 1201 may implement the functions of the processing unit 901 in FIG. 9 .
存储器1202可以是只读存储器(Read Only Memory,ROM),静态存储设备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存储器1202可以存储操作系统、以及其他应用程序。用于通过软件或者固件来实现本申请实施例提供的终端设备包括的模块以及部件所需执行的功能,或者用于实现本申请方法实施例提供的上述方法的程序代码 存储在存储器1202中,并由处理器1201读取存储器1202中的代码来执行终端设备包括的模块以及部件所需执行的操作,或者执行本申请实施例提供的上述方法。The memory 1202 may be a read only memory (Read Only Memory, ROM), a static storage device, a dynamic storage device, or a random access memory (Random Access Memory, RAM). Memory 1202 may store operating systems, as well as other application programs. The modules and functions required to be performed by the components included in the terminal device provided by the embodiments of the present application are implemented through software or firmware, or the program codes used to implement the above-mentioned methods provided by the method embodiments of the present application are stored in the memory 1202, and are stored in the memory 1202. The processor 1201 reads the code in the memory 1202 to execute the operations required to be executed by the modules and components included in the terminal device, or execute the above-mentioned methods provided in the embodiments of the present application.
输入设备1203,用于输入数据和用户指令。例如,输入设备可接收来自服务器的令牌。例如,输入设备可输入用户针对第一路径的文件的访问操作。Input device 1203 for inputting data and user instructions. For example, the input device may receive a token from the server. For example, the input device may input the user's access operation for the file of the first path.
输出设备1204,用于输出数据和图像。例如,输出设备输出文件操作请求。又例如,输出设备1204显示文件管理系统的页面。输出设备1204可以实现图9中的收发单元902的功能。Output device 1204 for outputting data and images. For example, the output device outputs file operation requests. As another example, the output device 1204 displays a page of the file management system. The output device 1204 may implement the functions of the transceiving unit 902 in FIG. 9 .
总线1205可包括在终端设备各个部件(例如处理器1201、存储器1202、输入设备1203、输出设备1204)之间传送信息的通路。The bus 1205 may include a pathway for transferring information between various components of the terminal device (eg, the processor 1201, the memory 1202, the input device 1203, the output device 1204).
应注意,尽管图12所示的终端设备1200仅仅示出了处理器1201、存储器1202、输入设备1203、输出设备1204以及总线1205,但是在实际实现过程中,本领域的技术人员应当明白,终端设备1200还包括实现正常运行所必须的其他器件。同时,根据实际需要,本领域的技术人员应当明白,终端设备1200还可包括实现其他附加功能的硬件器件。此外,本领域的技术人员应当明白,终端设备1200也可仅仅包括实现本申请实施例所必须的器件,而不必包括图12中所示的全部器件。It should be noted that although the terminal device 1200 shown in FIG. 12 only shows the processor 1201, the memory 1202, the input device 1203, the output device 1204 and the bus 1205, in the actual implementation process, those skilled in the art should understand that the terminal Device 1200 also includes other components necessary for proper operation. Meanwhile, according to actual needs, those skilled in the art should understand that the terminal device 1200 may further include hardware devices that implement other additional functions. In addition, those skilled in the art should understand that the terminal device 1200 may also only include the necessary devices for implementing the embodiments of the present application, and does not necessarily include all the devices shown in FIG. 12 .
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机代码,当计算机代码在计算机上运行时,使得计算机执行上述实施例的方法。Embodiments of the present application further provide a computer-readable storage medium, where computer codes are stored in the computer-readable storage medium, and when the computer codes are executed on the computer, the computer is made to execute the methods of the foregoing embodiments.
本申请实施例还提供一种计算机程序,该计算机程序包括计算机可读代码,当该计算机可读代码在计算机上运行时,使得上述实施例中的方法被执行。The embodiments of the present application also provide a computer program, the computer program includes computer-readable codes, when the computer-readable codes are executed on a computer, the methods in the above embodiments are executed.
以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以上述权利要求的保护范围为准。The above is only the embodiment of the present application, but the protection scope of the present application is not limited to this. Covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the above claims.
工业实用性Industrial Applicability
本申请实施例提供了一种权限控制方法及服务器、终端、存储介质和计算机程序,该方法包括:服务器接收来自终端设备的第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径;在所述第一文件操作请求满足第一条件的情况下,所述服务器对所述文件执行所述第一操作;所述第一条件包括:所述第一令牌通过所述服务器的合法性校验、所述第一操作包含于所述第一操作集合以及所述第二路径包括所述第一路径。根据本申请实施例提供的权限控制方法,不需要查询用户(对应于终端设备)的权限信息,可以更快地验证用户的权限,进而更快地响应该第一文件操作请求。Embodiments of the present application provide an authority control method, a server, a terminal, a storage medium, and a computer program. The method includes: the server receives a first file operation request from a terminal device; the first file operation request is used to request A file of a path executes a first operation, the first file operation request carries a first token, the first token includes a second path and a first operation set, and the first operation set includes at least one operation , the first path and the second path are both paths in the file management system run by the server; when the first file operation request satisfies the first condition, the server executes the file operation on the file The first operation; the first condition includes: the first token passes the validity check of the server, the first operation is included in the first operation set, and the second path includes all Describe the first path. According to the permission control method provided by the embodiment of the present application, there is no need to query the permission information of the user (corresponding to the terminal device), the permission of the user can be verified faster, and the first file operation request can be responded faster.

Claims (26)

  1. 一种在线文件的权限控制方法,其中,包括:An online file access control method, comprising:
    服务器接收来自终端设备的第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径;The server receives a first file operation request from a terminal device; the first file operation request is used to request to perform a first operation on a file in the first path, the first file operation request carries a first token, and the first file operation request carries a first token. A token includes a second path and a first operation set, the first operation set includes at least one operation, and both the first path and the second path are paths in the file management system running on the server;
    在所述第一文件操作请求满足第一条件的情况下,所述服务器对所述文件执行所述第一操作;所述第一条件包括:所述第一令牌通过所述服务器的合法性校验、所述第一操作包含于所述第一操作集合以及所述第二路径包括所述第一路径。In the case that the first file operation request satisfies a first condition, the server performs the first operation on the file; the first condition includes: the validity of the first token passing through the server verifying that the first operation is included in the first set of operations and the second path includes the first path.
  2. 根据权利要求1所述的方法,其中,所述第一令牌还包括所述第一令牌的有效期;所述第一条件还包括:所述服务器接收到所述第一文件操作请求的时间在所述有效期内。The method according to claim 1, wherein the first token further comprises a validity period of the first token; the first condition further comprises: the time when the server receives the first file operation request within the stated validity period.
  3. 根据权利要求2所述的方法,其中,在所述服务器对所述文件执行所述第一操作之前,所述方法还包括:The method of claim 2, wherein before the server performs the first operation on the file, the method further comprises:
    所述服务器对所述第一令牌进行合法性校验和有效性校验;所述有效性校验为校验所述服务器接收到所述第一文件操作请求的时间是否在所述有效期内;The server performs validity check and validity check on the first token; the validity check is to check whether the time when the server receives the first file operation request is within the validity period ;
    在所述第一令牌通过合法性校验和有效性校验的情况下,所述服务器验证所述第一操作是否包含于所述第一操作集合以及所述第二路径是否包括所述第一路径。In the case that the first token passes the validity check and validity check, the server verifies whether the first operation is included in the first operation set and whether the second path includes the first operation a path.
  4. 根据权利要求1至3任一项所述的方法,其中,在服务器接收来自终端设备的第一文件操作请求之前,所述方法还包括:The method according to any one of claims 1 to 3, wherein before the server receives the first file operation request from the terminal device, the method further comprises:
    所述服务器生成所述第一令牌;the server generates the first token;
    所述服务器向所述终端设备发送所述第一令牌。The server sends the first token to the terminal device.
  5. 根据权利要求4所述的方法,其中,The method of claim 4, wherein,
    在所述服务器生成所述第一令牌之前,所述方法还包括:Before the server generates the first token, the method further includes:
    所述服务器接收来自所述终端设备的令牌获取请求,所述令牌获取请求用于获取对所述第一路径的文件进行所述第一操作所需的令牌;receiving, by the server, a token acquisition request from the terminal device, where the token acquisition request is used to acquire a token required for performing the first operation on the file of the first path;
    所述服务器根据所述令牌获取请求,获取所述终端设备登录的目标账号的角色权限信息;所述目标账号为所述终端设备登录所述文件管理系统使用的账号;The server acquires, according to the token acquisition request, the role permission information of the target account logged in by the terminal device; the target account is the account used by the terminal device to log in to the file management system;
    所述服务器生成所述第一令牌包括:The server generating the first token includes:
    所述服务器根据所述角色权限信息,生成所述第一令牌。The server generates the first token according to the role permission information.
  6. 根据权利要求5所述的方法,其中,The method of claim 5, wherein,
    在所述服务器接收来自所述终端设备的令牌获取请求之前,所述方法还包括:Before the server receives the token acquisition request from the terminal device, the method further includes:
    所述服务器通过所述终端设备使用所述目标账号登录所述文件管理系统的登录认证;The server uses the terminal device to log in the log-in authentication of the file management system using the target account;
    所述服务器接收来自所述终端设备的令牌获取请求包括:The server receiving the token acquisition request from the terminal device includes:
    所述服务器接收到所述终端设备针对所述文件管理系统中的所述第一路径的文件的访问操作。The server receives an access operation by the terminal device for the file of the first path in the file management system.
  7. 一种在线文件的权限控制方法,其中,包括:An online file access control method, comprising:
    终端设备生成第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径,所述第一令牌用于所述服务器校验所述终 端设备是否具备对所述第一路径的文件执行所述第一操作的权限;The terminal device generates a first file operation request; the first file operation request is used to request to perform a first operation on the file of the first path, the first file operation request carries a first token, and the first token It includes a second path and a first operation set, where the first operation set includes at least one operation, the first path and the second path are both paths in the file management system running on the server, and the first operation set includes at least one operation. A token is used by the server to verify whether the terminal device has the authority to perform the first operation on the file of the first path;
    所述终端设备向所述服务器发送所述第一文件操作请求。The terminal device sends the first file operation request to the server.
  8. 根据权利要求7所述的方法,其中,所述第一令牌还包括所述第一令牌的有效期,所述有效期用于校验所述第一令牌的有效性。The method of claim 7, wherein the first token further comprises a validity period of the first token, the validity period being used to verify the validity of the first token.
  9. 根据权利要求7或8所述的方法,其中,The method according to claim 7 or 8, wherein,
    在终端设备生成第一文件操作请求之前,所述方法还包括:Before the terminal device generates the first file operation request, the method further includes:
    所述终端设备获取浏览器或客户端应用缓存的所述第一令牌;obtaining, by the terminal device, the first token cached by the browser or the client application;
    所述终端设备生成第一文件操作请求包括:The generation of the first file operation request by the terminal device includes:
    所述终端设备基于所述第一令牌,生成所述第一文件操作请求。The terminal device generates the first file operation request based on the first token.
  10. 根据权利要求7至9任一项所述的方法,其中,在终端设备生成第一文件操作请求之前,所述方法还包括:The method according to any one of claims 7 to 9, wherein, before the terminal device generates the first file operation request, the method further comprises:
    所述终端设备向所述服务器发送令牌获取请求,所述令牌获取请求用于获取对所述第一路径的文件进行所述第一操作所需的令牌;The terminal device sends a token acquisition request to the server, where the token acquisition request is used to acquire a token required for performing the first operation on the file of the first path;
    所述终端设备接收来自所述服务器的所述第一令牌,并缓存所述第一令牌。The terminal device receives the first token from the server and caches the first token.
  11. 根据权利要求10所述的方法,其中,The method of claim 10, wherein,
    在所述终端设备向所述服务器发送令牌获取请求之前,所述方法还包括:Before the terminal device sends a token acquisition request to the server, the method further includes:
    所述终端设备使用目标账号登录所述文件管理系统;The terminal device uses the target account to log in to the file management system;
    所述终端设备向所述服务器发送令牌获取请求包括:Sending a token acquisition request by the terminal device to the server includes:
    响应于用户针对所述文件管理系统中的所述第一路径的文件的访问操作,向所述服务器发送所述令牌获取请求。The token acquisition request is sent to the server in response to a user's access operation to the file of the first path in the file management system.
  12. 一种服务器,其中,包括:A server, which includes:
    收发单元,配置为接收来自终端设备的第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径;A transceiver unit, configured to receive a first file operation request from a terminal device; the first file operation request is used to request to perform a first operation on a file of a first path, and the first file operation request carries a first token , the first token includes a second path and a first operation set, the first operation set includes at least one operation, and both the first path and the second path are the file management system run by the server path in;
    处理单元,配置为在所述第一文件操作请求满足第一条件的情况下,对所述文件执行所述第一操作;所述第一条件包括:所述第一令牌通过所述服务器的合法性校验、所述第一操作包含于所述第一操作集合以及所述第二路径包括所述第一路径。a processing unit, configured to perform the first operation on the file when the first file operation request satisfies a first condition; the first condition includes: the first token passes through the server's The validity check, the first operation is included in the first operation set, and the second path includes the first path.
  13. 根据权利要求12所述的服务器,其中,所述第一令牌还包括所述第一令牌的有效期;所述第一条件还包括:所述服务器接收到所述第一文件操作请求的时间在所述有效期内。The server according to claim 12, wherein the first token further comprises a validity period of the first token; the first condition further comprises: the time when the server receives the first file operation request within the stated validity period.
  14. 根据权利要求13所述的服务器,其中,所述处理单元,还配置为对所述第一令牌进行合法性校验和有效性校验;所述有效性校验为校验所述服务器接收到所述第一文件操作请求的时间是否在所述有效期内;在所述第一令牌通过合法性校验和有效性校验的情况下,验证所述第一操作是否包含于所述第一操作集合以及所述第二路径是否包括所述第一路径。The server according to claim 13, wherein the processing unit is further configured to perform a validity check and a validity check on the first token; the validity check is to check that the server receives Whether the time to the first file operation request is within the validity period; if the first token passes the validity check and validity check, verify whether the first operation is included in the first token. A set of operations and whether the second path includes the first path.
  15. 根据权利要求12至14任一项所述的服务器,其中,The server according to any one of claims 12 to 14, wherein,
    所述处理单元,还配置为生成所述第一令牌;the processing unit, further configured to generate the first token;
    所述收发单元,还配置为向所述终端设备发送所述第一令牌。The transceiver unit is further configured to send the first token to the terminal device.
  16. 根据权利要求15所述的服务器,其中,The server of claim 15, wherein,
    所述收发单元,还配置为接收来自所述终端设备的令牌获取请求,所述令牌获取请求用于获取对所述第一路径的文件进行所述第一操作所需的令牌;The transceiver unit is further configured to receive a token acquisition request from the terminal device, where the token acquisition request is used to acquire a token required for performing the first operation on the file of the first path;
    所述处理单元,还配置为根据所述令牌获取请求,获取所述终端设备登录的目标账号的角色权限信息;所述目标账号为所述终端设备登录所述文件管理系统使用的账号;The processing unit is further configured to acquire, according to the token acquisition request, the role permission information of the target account logged in by the terminal device; the target account is the account used by the terminal device to log in to the file management system;
    所述处理单元,配置为根据所述角色权限信息,生成所述第一令牌。The processing unit is configured to generate the first token according to the role permission information.
  17. 根据权利要求16所述的服务器,其中,The server of claim 16, wherein,
    所述处理单元,还配置为通过所述终端设备使用所述目标账号登录所述文件管理系统的登录认证;The processing unit is further configured to log in to the file management system through the terminal device using the target account for login authentication;
    所述收发单元,配置为接收所述终端设备针对所述文件管理系统中的所述第一路径的文件的访问操作。The transceiver unit is configured to receive an access operation by the terminal device for the file of the first path in the file management system.
  18. 一种终端设备,其中,包括:A terminal device, including:
    处理单元,配置为生成第一文件操作请求;所述第一文件操作请求用于请求对第一路径的文件执行第一操作,所述第一文件操作请求携带有第一令牌,所述第一令牌包括第二路径、第一操作集合,所述第一操作集合包括至少一项操作,所述第一路径和所述第二路径均为所述服务器运行的文件管理系统中的路径,所述第一令牌用于所述服务器校验所述终端设备是否具备对所述第一路径的文件执行所述第一操作的权限;a processing unit, configured to generate a first file operation request; the first file operation request is used to request to perform a first operation on a file of a first path, the first file operation request carries a first token, the first file operation request a token includes a second path and a first operation set, the first operation set includes at least one operation, the first path and the second path are both paths in the file management system running on the server, The first token is used by the server to verify whether the terminal device has the authority to perform the first operation on the file of the first path;
    收发单元,配置为向所述服务器发送所述第一文件操作请求。A transceiver unit, configured to send the first file operation request to the server.
  19. 根据权利要求18所述的终端设备,其中,所述第一令牌还包括所述第一令牌的有效期,所述有效期用于校验所述第一令牌的有效性。The terminal device according to claim 18, wherein the first token further comprises a validity period of the first token, and the validity period is used to verify the validity of the first token.
  20. 根据权利要求18或19所述的终端设备,其中,The terminal device according to claim 18 or 19, wherein,
    所述处理单元,还配置为获取浏览器或客户端应用缓存的所述第一令牌;The processing unit is further configured to obtain the first token cached by the browser or the client application;
    所述处理单元,配置为基于所述第一令牌,生成所述第一文件操作请求。The processing unit is configured to generate the first file operation request based on the first token.
  21. 根据权利要求18至20任一项所述的终端设备,其中,所述收发单元,还配置为向所述服务器发送令牌获取请求,所述令牌获取请求用于获取对所述第一路径的文件进行所述第一操作所需的令牌;接收来自所述服务器的所述第一令牌,并缓存所述第一令牌。The terminal device according to any one of claims 18 to 20, wherein the transceiver unit is further configured to send a token acquisition request to the server, where the token acquisition request is used to acquire information about the first path The token required to perform the first operation on the file is received; the first token is received from the server, and the first token is cached.
  22. 根据权利要求21所述的终端设备,其中,The terminal device of claim 21, wherein,
    所述处理单元,还配置为使用目标账号登录所述文件管理系统;The processing unit is further configured to log in to the file management system using the target account;
    所述收发单元,还配置为响应于用户针对所述文件管理系统中的所述第一路径的文件的访问操作,向所述服务器发送所述令牌获取请求。The transceiver unit is further configured to send the token acquisition request to the server in response to a user's access operation to the file of the first path in the file management system.
  23. 一种服务器,其中,包括:存储器,用于存储程序;处理器,用于执行所述存储器存储的所述程序,当所述程序被执行时,所述处理器用于执行如权利要求1至6中任一项所述的方法。A server, comprising: a memory for storing a program; a processor for executing the program stored in the memory, and when the program is executed, the processor for executing the program as claimed in claims 1 to 6 The method of any of the above.
  24. 一种终端设备,其中,包括:存储器,用于存储程序;处理器,用于执行所述存储器存储的所述程序,当所述程序被执行时,所述处理器用于执行如权利要求7至11中任一项所述的方法。A terminal device, comprising: a memory for storing a program; a processor for executing the program stored in the memory, when the program is executed, the processor is used for executing the program according to claim 7 to The method of any one of 11.
  25. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,使所述处理器执行权利要求1至11任意一项所述的方法。A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions that, when executed by a processor, cause the processor to execute the claims The method of any one of 1 to 11.
  26. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在服务器中运行时,所述服务器中的处理器执行用于实现权利要求1至11任一项所述的方法。A computer program comprising computer readable code, when the computer readable code is run in a server, a processor in the server executes a method for implementing the method of any one of claims 1 to 11.
PCT/CN2021/105569 2021-03-15 2021-07-09 Permission control method, server, terminal, storage medium, and computer program WO2022193494A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020227014600A KR20220130088A (en) 2021-03-15 2021-07-09 Authority control method and server, terminal, storage medium and computer program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110274535.8A CN113051611B (en) 2021-03-15 2021-03-15 Authority control method of online file and related product
CN202110274535.8 2021-03-15

Publications (1)

Publication Number Publication Date
WO2022193494A1 true WO2022193494A1 (en) 2022-09-22

Family

ID=76512268

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/105569 WO2022193494A1 (en) 2021-03-15 2021-07-09 Permission control method, server, terminal, storage medium, and computer program

Country Status (3)

Country Link
KR (1) KR20220130088A (en)
CN (1) CN113051611B (en)
WO (1) WO2022193494A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051611B (en) * 2021-03-15 2022-04-29 上海商汤智能科技有限公司 Authority control method of online file and related product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110601832A (en) * 2019-09-27 2019-12-20 中煤航测遥感集团有限公司 Data access method and device
CN111093197A (en) * 2019-12-31 2020-05-01 北大方正集团有限公司 Authority authentication method, authority authentication system and computer readable storage medium
CN111756753A (en) * 2020-06-28 2020-10-09 中国平安财产保险股份有限公司 Authority verification method and system
US20200336310A1 (en) * 2017-05-19 2020-10-22 Intuit Inc. Coordinating access authorization across multiple systems at different mutual trust levels
CN113051611A (en) * 2021-03-15 2021-06-29 上海商汤智能科技有限公司 Authority control method of online file and related product

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488791B (en) * 2013-09-30 2018-03-27 华为技术有限公司 Data access method, system and data warehouse
JP2019508763A (en) * 2016-01-29 2019-03-28 グーグル エルエルシー Local device authentication
CN107613005B (en) * 2017-09-20 2021-04-13 携程旅游信息技术(上海)有限公司 Reverse proxy method and device, electronic device and storage medium
CN109657481B (en) * 2017-10-12 2020-12-22 北京京东尚科信息技术有限公司 Data management method and device
CN110909373B (en) * 2018-09-18 2023-06-20 阿里巴巴集团控股有限公司 Access control method, equipment, system and storage medium
CN110363026B (en) * 2019-07-19 2021-06-25 深圳前海微众银行股份有限公司 File operation method, device, equipment, system and computer readable storage medium
CN110855672A (en) * 2019-11-15 2020-02-28 无锡家校邦网络科技有限公司 JWT-based authorization method capable of being manually cancelled
CN112487450A (en) * 2020-11-30 2021-03-12 银盛支付服务股份有限公司 File server access grading method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200336310A1 (en) * 2017-05-19 2020-10-22 Intuit Inc. Coordinating access authorization across multiple systems at different mutual trust levels
CN110601832A (en) * 2019-09-27 2019-12-20 中煤航测遥感集团有限公司 Data access method and device
CN111093197A (en) * 2019-12-31 2020-05-01 北大方正集团有限公司 Authority authentication method, authority authentication system and computer readable storage medium
CN111756753A (en) * 2020-06-28 2020-10-09 中国平安财产保险股份有限公司 Authority verification method and system
CN113051611A (en) * 2021-03-15 2021-06-29 上海商汤智能科技有限公司 Authority control method of online file and related product

Also Published As

Publication number Publication date
CN113051611A (en) 2021-06-29
KR20220130088A (en) 2022-09-26
CN113051611B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN111488598B (en) Access control method, device, computer equipment and storage medium
WO2022262078A1 (en) Access control method based on zero-trust security, and device and storage medium
US20200204530A1 (en) Self-encrypting key management system
US20220078017A1 (en) Authorized Data Sharing Using Smart Contracts
US11829502B2 (en) Data sharing via distributed ledgers
WO2021184755A1 (en) Application access method and apparatus, and electronic device and storage medium
US20200067694A1 (en) Techniques for key provisioning in a trusted execution environment
US11757640B2 (en) Non-fungible token authentication
CN113347206A (en) Network access method and device
US10516653B2 (en) Public key pinning for private networks
JP2019220238A (en) Computer readable storage media for legacy integration and method and system for utilizing the same
US11757877B1 (en) Decentralized application authentication
US11663318B2 (en) Decentralized password vault
EP3794485B1 (en) Method and network node for managing access to a blockchain
JP2022534677A (en) Protecting online applications and web pages that use blockchain
WO2022193494A1 (en) Permission control method, server, terminal, storage medium, and computer program
JP2023539168A (en) Self-authentication identifier and its applications
US20230362018A1 (en) System and Method for Secure Internet Communications
US20190065725A1 (en) Distributed profile and key management
TWI778319B (en) Method for cross-platform authorizing access to resources and authorization system thereof
US20230231724A1 (en) Blockchain based certificate pinning
CN107276965B (en) Authority control method and device of service discovery component
GB2610072A (en) Data sharing via distributed ledgers
CN115150831A (en) Processing method, device, server and medium for network access request
Bhausaheb et al. Security for Cloud Data Using Combined Technique Identity Authentication and Encryption

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022523588

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 21931076

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21931076

Country of ref document: EP

Kind code of ref document: A1