WO2015103794A1 - 一种文件访问权限控制方法及装置 - Google Patents

一种文件访问权限控制方法及装置 Download PDF

Info

Publication number
WO2015103794A1
WO2015103794A1 PCT/CN2014/070549 CN2014070549W WO2015103794A1 WO 2015103794 A1 WO2015103794 A1 WO 2015103794A1 CN 2014070549 W CN2014070549 W CN 2014070549W WO 2015103794 A1 WO2015103794 A1 WO 2015103794A1
Authority
WO
WIPO (PCT)
Prior art keywords
acl
flag
ace
aces
contain
Prior art date
Application number
PCT/CN2014/070549
Other languages
English (en)
French (fr)
Inventor
崔炳华
毛小丽
罗成友
何益
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201480000306.5A priority Critical patent/CN104145468B/zh
Priority to PCT/CN2014/070549 priority patent/WO2015103794A1/zh
Publication of WO2015103794A1 publication Critical patent/WO2015103794A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/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

Definitions

  • the present invention relates to the field of communications, and in particular, to a file access authority control method and apparatus.
  • an access control list is used to control the access rights of users or group members to folders or files, that is, the file system's server controls the user or group member to the file according to the ACL. Access to folders or files.
  • each directory or file has an ACL. In the operations of creating, deleting, reading and writing data, and setting attributes, the ACL restricts the user's operation rights. This also improves the file. System security.
  • the file system server reads the required ACL from the extended attribute, and then traverses all the access control items in the ACL (ACE, Access Control Entry), find all ACEs associated with the current user, and compare the ACEs one by one.
  • ACE Access Control Entry
  • ACLs in the file system may contain thousands of ACEs, traversing all ACEs and determining whether users or groups have access to files or folders is cumbersome, time consuming, and inefficient.
  • the embodiment of the present invention provides a file access authority control method and apparatus, which solves the problem of time waste and low efficiency caused by traversing all access control items ACE when the server of the file system performs ACL authentication on the file. It can improve the efficiency of ACL authentication and reduce the overall cost of the system.
  • an embodiment of the present invention provides a file access authority control method, where the method includes: Reading an access control item ACE in an initial access control list ACL, where the ACE includes at least a user identifier and a member variable corresponding to the user identifier;
  • the ACLs that contain the same user identifier and do not contain the 10 flag bits are combined to obtain an improved ACL, and the improved ACL is used for ACL authentication on the file.
  • the user identifier includes a user identifier or a group identifier; the member variable corresponding to each user identifier includes at least a type Type, a permission Perm ission, and an identifier Flag; The flag includes at least one of a 10 flag bit, a sub-folder inheritance CI flag bit, and a sub-file inheritance 01 flag bit.
  • the improved ACL is stored in a specific extended attribute of the system, where the specific extended attribute is a file system internal Set according to the preset keyword convention.
  • the method further includes:
  • a fourth possible implementation manner of the first aspect if the number of the ACEs including the 10 flag bits is greater than a preset threshold, performing the Save the ACE that does not contain 10 flags to the cache ACL.
  • an embodiment of the present invention provides a server, including:
  • An obtaining unit configured to read an access control item ACE in an initial access control list ACL, where the ACE includes at least a user identifier, and a member variable corresponding to the user identifier;
  • a determining unit configured to determine whether the ACE obtained by the acquiring unit includes only inheriting 10 flag bits
  • a pre-storage unit configured to determine that the determining unit does not include 10 flag bits
  • the ACE is saved to the cache ACL
  • the processing unit is configured to combine the ACEs of the cache ACL that are stored in the pre-stored unit with the same user identifier that do not include the 10 flag bits to obtain an improved ACL, where the improved ACL is used to perform ACL authentication on the file.
  • the user identifier includes a user identifier or a group identifier; the member variable corresponding to each user identifier includes at least a type Type, a permission Perm ission, and a flag Flag; The flag includes at least one of a 10 flag bit, a sub-folder inheritance CI flag bit, and a sub-file inheritance 01 flag bit.
  • the server further includes a storage unit
  • the storage unit is configured to, after the processing unit merges the ACEs that have the same user identifier in the cache ACL and do not include the 10 flag bits, and obtain the improved ACL, store the improved ACL in the file of the system.
  • the specific extended attributes are set internally by the system according to the preset keyword conventions.
  • the server further includes a statistical unit
  • the statistic unit is configured to: after the determining unit determines whether the ACE includes only inheriting 10 flag bits, the pre-storage unit saves an ACE that does not include 10 flag bits into a cache ACL, and the statistic office The number of ACEs with 10 flags in the initial ACL.
  • a fourth possible implementation manner of the second aspect if the number of ACEs that include 10 flag bits is greater than a preset threshold, performing the Save the ACE that does not contain 10 flags to the cache ACL.
  • the embodiment of the present invention further provides a server, including:
  • a processor configured to read an access control item ACE in an initial access control list ACL, where the ACE includes at least a user identifier, and a member variable corresponding to the user identifier, and is configured to determine whether the ACE includes only Inherit 10 flags, and used to
  • the cache ACL includes an ACE merge that does not contain the 10 flag bits of the same user identifier, and the improved ACL is used to perform ACL authentication on the file.
  • the memory is used to save the ACE that does not contain 10 flag bits into the cache ACL.
  • the user identifier includes a user identifier or a group identifier; the member variable corresponding to each user identifier includes at least a type Type, a permission Perm ission, and a flag Flag; The flag includes at least one of a 10 flag bit, a sub-folder inheritance CI flag bit, and a sub-file inheritance 01 flag bit.
  • the memory is further configured to: when the processor has the same user identifier in the cache ACL After the ACE merges without the 10 flag bits, and the improved ACL is obtained, the improved ACL is stored in the file of the system, and the specific extended attribute is set internally according to the preset keyword convention.
  • the server further includes a counter.
  • the counter is configured to: after the processor determines whether the ACE includes only inheriting 10 flag bits, and the ACL saves the ACE that does not include 10 flag bits into the cache ACL, and the initial ACL is counted. Contains the number of ACEs with 10 flags.
  • the memory is specifically used to: if the counter statistics, the number of ACEs that include 10 flag bits If the threshold is greater than the preset threshold, the ACE that does not include the 10 flag is saved to the cache ACL.
  • the embodiment of the invention provides a file access authority control method and device.
  • the server reads the access control item ACE in the initial access control list ACL, and determines whether the ACL of the initial ACL contains only 10 flag bits, and does not include An ACE that inherits only 10 flags is saved to the cache ACL, and the cache ACL contains the same user ID.
  • An ACE merge that does not contain 10 flag bits, and an improved ACL is obtained, so that when the ACL authentication is performed on the file, the improved ACL is directly obtained for authentication.
  • the present invention only improves the internal file system on the server side, so the improved ACL generation does not affect the existing process of the client.
  • the ACE in the improved ACL only contains the flag that affects the ACL authentication of the file by the server that affects the file system.
  • the server can obtain the improved ACL for authentication without traversing all the initial ACLs. All ACEs improve the efficiency of ACL authentication for access control lists and reduce the overall cost of the system.
  • Figure 1 is a schematic diagram of a system framework of a typical NAS file system
  • FIG. 2 is a schematic flowchart 1 of a file access authority control method according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of an ACE merge with a same user identifier in a cache ACL according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart 2 of a method for controlling file access authority according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram 1 of a server according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram 2 of a server according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram 3 of a server according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram 4 of a server according to an embodiment of the present invention.
  • each folder or file in the server of the file system corresponds to an access control list (ACL, Access Control List), and the ACL is stored in the server of the file system.
  • ACL is used to store access to files and folders in the file system's server. It is a list of many ACE (Access Control Entry), each access control item defines a user or group and its corresponding access rights, that is, user creation, reading, writing, attribute setting, etc. Whether the operation is allowed.
  • ACL has the characteristics of inheritance and superposition.
  • inheritance means that the permissions granted to the parent folder by default will be inherited by the subfolders or files under the parent folder, or the file or folder inherits the permissions of the partition or parent folder by default, and Inherited permissions cannot be directly modified.
  • NAS Network Attached Storage
  • NFS Network File System
  • CIFS Common Internet File System
  • DAS Direct Attached Storage
  • I/O Input/Output
  • Storage relies on the server's operating system for data I/O (Input/Output) read and write and storage maintenance management.
  • Data backup and recovery requires server host resources.
  • data flow needs Return the host to the database connected to the server.
  • the DAS itself is a stack of hardware without any storage operating system.
  • the storage device is directly connected to the server through a cable, and the I/O (input/output) request is sent directly to the storage device.
  • the SAS (Serial Attached Small Computer System Interface) storage system uses serial technology to achieve higher transmission speeds, and improves internal space by shortening the connection lines.
  • SAS's interface technology is backward compatible with SATA (Serial Advanced Technology Attachment).
  • SATA Serial Advanced Technology Attachment
  • the backplane of the SAS system can be connected to a dual-port, high-performance SAS drive or to a high-capacity, low-cost SATA drive. Due to the compatibility of the SAS system, IT personnel can use hard disks with different interfaces to meet the capacity or performance requirements of various applications. Therefore, when the storage system is expanded, it has more flexibility, so that the storage device can maximize the investment.
  • FIG. 1 it is a typical NAS file system architecture diagram. Three clients supporting different ACL mechanisms are respectively connected to the file system server. The clients are: Support NT ACL (New Technology Access Control) List, new technology access control ⁇ 'J table) Windows client, NT ACL-enabled MAC (Macintosh, Macintosh) system client and NFSv4 (Network File System VS 4) ACL LINUX/UNIX client.
  • the NT ACL contains the user's permission to read, write, execute, and set attributes of the file.
  • the NFSv4 ACL contains the user's permission to read, write, and execute the file.
  • NT ACL or NFSv4 ACLs are directly saved to the extended attributes of the file system metadata.
  • the server of the file system needs to perform access authority authentication, that is, the server of the file system needs to perform ACL authentication on the file.
  • the file system server reads the ACL from the extended attribute, then iterates through all the ACEs, finds the ACE associated with the currently accessed user, and compares the ACEs one by one, so that the file system's server performs ACL authentication. Time It is expensive and inefficient.
  • the embodiment of the invention provides a file access authority control method and device, which solves the problem of time waste and low efficiency caused by traversing all access control items ACE in the access control list ACL when the server of the file system performs ACL authentication. Improve the efficiency of ACL authentication and reduce the overall cost of the system.
  • Embodiment 1 The implementation method described in the embodiment of the present invention is suitable for a file system such as a network attached storage NAS system, a direct connection storage DAS system, a serial connection small computer system interface SAS storage system, and the like.
  • a file system such as a network attached storage NAS system, a direct connection storage DAS system, a serial connection small computer system interface SAS storage system, and the like.
  • the embodiment of the invention provides a file access authority control method. As shown in FIG. 2, the method includes:
  • the S10K server reads the ACE in the initial ACL.
  • the file system's server needs to perform ACL authentication on the file.
  • the server reads the ACL from the extended attributes of the server metadata. Then iterate through all the ACEs in the ACL to find the ACE associated with the currently accessed user.
  • the ACL stores access rights to folders and files in the file system.
  • the ACL contains a number of access control ACEs. Each access control entry records a user or group and its corresponding access rights.
  • the ACE includes at least a user ID (for example: user identifier or group identifier), and a member variable corresponding to the user ID (for example: type Type, Permi s s i on and ID F 1 ag).
  • the flag of the member variable in each ACE is used to record the successor flag of the ACE, and the successor flag of the ACE includes 10 (Inherit Only) flag, CI (Container Inherit, sub-folder inheritance). At least one of the flag bit and the 0I (Object Inherit) flag.
  • the 10 flag indicates that the ACE where the 10 flag is located does not apply to the current folder or the current file, that is, when the ACL of the user's accessed ACL contains 10 flags in the ACL of the user, the access rights in the ACE are The user's access has no effect, that is, the user is not accessing the article. Folders are restricted by permissions.
  • the CI flag indicates that the ACE where the CI flag is located is inherited by the subfolder of the current folder, and the 01 flag indicates that the ACE where the 01 flag is located is inherited by the subfile of the current folder.
  • each ACE includes a user ID, a type Type of the file that the user can access, a permission Permission, and a flag Flag, NT ACL.
  • Table 1 The structure is shown in Table 1.
  • NT ACL contains NT ACE 0 and NT ACE 1
  • NT ACE 0 contains user ID: UserA (User A)
  • User A can access the file type type: allow (allow), user A to the file Permission permission for list-directory
  • NT ACE 1 contains the user ID: UserA (User A), the type of user A can access the file type: allow
  • the initial access control list ACL described in this embodiment of the present invention may be an NT ACL or an NFS v4 ACL.
  • the type of the ACL has no effect on the implementation of the method described in the embodiment of the present invention.
  • the initial ACL can be an ACL that is generated by the server of the file system, or an ACL generated after the ACL inherits the parent folder in the file system, or the ACL generated by the client manually.
  • the NAS system server first reads all the NT ACLs when the ACL authentication is performed on the file. ACE.
  • the server determines whether the ACE of the initial ACL includes 10 flag bits.
  • An ACL is a list of access control ACEs.
  • Each access control ACE records a user or group and its corresponding access rights.
  • the ACE includes at least the user ID and the member variable corresponding to the user ID.
  • the ACE member variable has a member variable identifier Flag record having at least one of a 10 flag bit, a C I flag bit, and a 01 flag bit.
  • the 10 flag indicates that the ACE where the 10 flag is located does not affect the authentication of the current folder itself, that is, the ACE containing the 10 flag does not affect the authentication of the parent folder, and it depends on the CI flag and/or The presence of the 01 mark cannot exist alone.
  • the CI flag and / or 01 flag affect the authentication of subfolders and/or subfiles. When creating a new subfolder or subfile, you can know how to propagate the ACE corresponding to the parent folder to the ACE corresponding to the subfolder and/or subfile according to the flags in the ACE corresponding to the parent folder.
  • the 10 flag bit does not affect the authentication of the corresponding parent folder itself, when the server of the file system performs ACL authentication on the folder or file, it is necessary to determine whether the corresponding ACE in the ACL contains 10 flag bits. If the 10 flag is included, it indicates that the ACE does not affect the authentication of the current folder or file. If the 10 flag is not included, the ACE affects the authentication of the current folder or file.
  • the NFSv4 ACL consists of zero or more ACEs.
  • the NAS system performs ACL authentication on the file, the NAS system The system server reads all the ACEs in the NFSv4 ACL, and uses the ACE information to determine whether the ACE contains 10 flag bits, thereby determining which ACE will affect the ACL authentication of the file.
  • the server saves the ACE that does not contain the 10 flag to the cache ACL. Specifically, after the server reads the ACE in the initial ACL, the server determines that the ACE of the 10 flag is not included, and saves the ACE that does not contain the 10 flag to the cache ACL.
  • the 10 flag indicates that the ACE containing 10 flags does not affect the authentication of the parent folder itself, and the cache ACL is composed of ACEs that do not contain 10 flags, all ACEs in the cache ACL affect the parent file. Authentication of the folder.
  • the server merges the ACEs in the cache ACL that contain the same user identifier and does not contain the 10 flag bits, and obtains an improved ACL.
  • Each ACE contains the user ID and the member corresponding to the user ID.
  • the file system's server reads the ACE in the cache ACL, it obtains the user ID of each ACE, and then merges the ACEs containing the same user ID to get the improved ACL.
  • the server of the file system merges ACEs of the type that have the same user identifier and can carry the same user, and the type that contains the same user identifier and carries the same user can access the file.
  • the rights bits in the ACE are unioned.
  • the server merges the ACEs that contain the same user ID in the cache ACL that do not contain the 10 flag bits.
  • the flag in the flag Flag for the ACE inheritance flag bit is only affected by the subfolder and / Or sub-file authentication, does not affect subfolders and / or the inheritance of the subfile, that is, the existence of the flag Flag in the ACE of the improved ACL has no meaning, that is, the flag Flag in the ACE of the improved ACL does not exist.
  • the file system server can directly obtain the improved ACL when the ACL is authenticated by the server.
  • the ACL is improved by reading the ACE in the improved ACL.
  • the server of the file system updates the improved ACL by using the method provided by the embodiment of the present invention, that is, the file system server reads each ACE in the updated initial ACL, and the ACL is affected according to the inheritance flag in the ACE.
  • the ACE of the right is extracted and then merged for the same user or group of ACEs to get the updated improved ACL.
  • the file system's server discards the stored old improved ACL and replaces it with the newly generated improved ACL.
  • the improved ACL can be an improved NT ACL or an improved NFSv4 ACL.
  • the Temp ACL is a cache ACL. If the number of ACEs in the cache ACL is 200, the user information in ACE 0 and ACE 1 is user A, and ACE 0 and ACE 1 are in Whether the user can access the file type is a 11 ow (allow), the permission in ACE 0 is 1 is t_di rectory, the permission in ACE 1 is add.fi le, and the file system server will be ACE 0 and ACE 1 Consolidation, where ACE 0 and ACE 1's entitlement bits take the union, so the server merges the ACEs that contain the same user ID and does not contain the 10 flag bits in the cache ACL, and obtains the Access ACL (Improved ACL).
  • the permissions that contain User A's ACE are: list-directory and add_file.
  • process of generating an improved ACL in the embodiment of the present invention is improved by the server in the file system, and the improved ACL generation does not affect the existing process of the client.
  • the embodiment of the present invention provides a file access authority control method, where the server reads an access control item ACE in an initial access control list ACL, where the ACE includes at least a user identifier and a member variable corresponding to the user identifier. Then, determine if the package is in the ACE Contains an ACE that inherits only 10 flags and stores no 10 flags into the cache ACL. Finally, the ACLs with the same user ID in the cache ACL that do not contain the 10 flag bits are merged to obtain an improved ACL. The improved ACL is used to perform ACL authentication on the file.
  • the improved ACL generation does not affect the existing process of the client, and the ACE in the improved ACL only contains the server that affects the file system.
  • the ACL is used to authenticate the ACL.
  • the server can obtain the improved ACL for authentication. It does not need to traverse all the ACEs in the initial ACL. This improves the efficiency of ACL authentication and reduces the overall system. Overhead.
  • the embodiment of the invention provides a file access authority control method. As shown in FIG. 4, the method includes:
  • the S20K server reads the ACE in the initial ACL.
  • the server When the file system's server authenticates the file with ACLs, the server reads the ACL from the extended attributes and then iterates through all the ACEs to find the ACE associated with the currently accessed user.
  • the access control item ACE in the initial access control list ACL is first read.
  • the ACE includes at least a user identifier and a member variable corresponding to each user identifier.
  • the user ID includes a user identifier or a group identifier.
  • the member variables corresponding to each user ID include at least the type Type, permission Permission, and identifier F 1 a g that the user can access the file.
  • the member variable identifier in each ACE records the inheritance flag of the ACE, and the success flag of the ACE includes 10 (Inherit Only), CI (Container Inherit, Subfolder Inheritance), and 01 (Object). At least one of Inherit, subfile inheritance).
  • the 10 flag indicates that the ACE where the 10 flag is located is not applied to the current folder or the current file, that is, the authentication of the ACE containing the 10 flag does not work.
  • the CI flag indicates that the subfolder will inherit the CI. Sign place
  • the ACE, 01 flag indicates that the subfile will inherit the ACE where the 01 flag is located.
  • the initial access control list ACL can be an NT ACL or an NFS v4.
  • the initial ACL may be an ACL that is provided by the server of the file system, or an ACL generated after the ACL inherits the parent folder in the server of the file system, or may be manually generated by the client.
  • the NAS system server first reads all the NT ACLs when the ACL authentication is performed on the file. ACE.
  • the server determines whether the ACE of the initial ACL includes 10 flag bits. Among them, the 10 flag is recorded in the member variable Flag in the ACE.
  • An ACL is a list of access control ACEs.
  • Each access control ACE defines a user or group and its permissions.
  • the ACE includes at least the user ID and member variables corresponding to each user ID.
  • the ACE member variable has a member variable identifier.
  • the Flag record corresponds to at least one of the user inherits the 10 flag bit, the subfolder inherits the CI flag bit, and the subfile inherits the 01 flag bit.
  • the 10 flag bit does not affect the authentication of the parent folder itself, that is, the ACE containing 10 flag bits does not affect the authentication of the parent folder, and it depends on the presence of the CI flag bit and/or the 01 flag bit, the CI flag.
  • the bit and / or 01 flags affect the authentication of subfolders and/or subfiles. When creating a new subfolder or subfile, you can know how to propagate the ACE to the ACE of the subfolder and/or subfile based on these flags in the parent folder ACE.
  • the target folder represents the parent folder itself.
  • the 10 flag bit does not affect the authentication of the parent folder itself
  • the server of the file system performs ACL authentication on the folder or the file, it is determined whether the ACE includes 10 flag bits, and if the flag flag is 10, Explain that the ACE does not affect the authentication. If it does not, it indicates that the ACE affects the authentication.
  • the NFSv4 ACL consists of zero or more ACEs.
  • the server of the NAS system performs ACL authentication on the file, all ACEs in the NFSv4 ACL are read first. The information, to determine whether the ACE contains 10 flags, to determine which ACE will affect the ACL authentication of the file.
  • the server counts the number of ACEs with 10 flag bits in the initial ACL.
  • the file system's server reads the ACE in the initial ACL, it automatically gets the number of ACEs in the initial ACL.
  • the server After determining whether the ACL of the initial ACL contains 10 flag bits, the server counts the number of ACEs in the initial ACL that do not affect the authentication, that is, the number of ACEs that contain the I 0 flag in the initial ACL, and then determines the initial ACL. Whether the number of ACEs containing 10 flag bits is greater than a preset threshold value, in order to determine whether it is necessary to filter out an ACE that affects authentication.
  • the NT ACL consists of three thousand.
  • the ACE consists of two hundred ACEs containing 10 flags. After reading all the ACE information in the NT ACL, the NAS system counts the number of ACEs that contain 10 flags in the NT ACL.
  • the server saves the ACE that does not include the 10 flag bits into the cache ACL.
  • the server of the file system After the server of the file system reads the ACE in the initial ACL, and counts the number of ACEs that include 10 flag bits in the initial ACL, the server of the file system determines, according to the preset threshold, that the initial ACL is included. Whether the number of ACEs with 10 flags is greater than a preset threshold.
  • the file system server saves the ACEs that do not contain the 10 flag bits into the cache ACL, since the 10 flag bits do not affect the parent folder itself. Authentication, and the cache ACL only contains flags other than the 10 flag, so all ACEs in the cache ACL will affect the file authentication.
  • NAS NAS
  • the system's server saves 1,700 ACEs that do not contain 10 flags to the cache ACL.
  • the server merges the ACEs in the cache ACL that contain the same user identifier and does not include the 10 flag bit, and obtains an improved ACL.
  • each ACE contains its own user identification information. After the file system server reads all the ACEs in the cache ACL, it obtains each ACE in the cache ACL. User identification information, the same user identifier exists in the user identification information, and the file system server merges the ACEs with the same user identifier in the cache ACL.
  • the file system's server caches the entitlement bits in the ACE that contain the same user ID and carries the same type of user access to the file. Furthermore, an improved ACL is obtained, so that for the same user identifier, the improved ACL only contains one ACE, and when the file system server performs ACL authentication on the file, the time is eliminated. Less consumption.
  • the server merges the ACEs that contain the same user ID in the cache ACL that do not contain the 10 flag bits.
  • the flag in the flag Flag for the ACE inheritance flag bit is only affected by the subfolder and / Or the authentication of the subfile does not affect the inheritance of the subfolders and/or subfiles, that is, the existence of the flag Flag in the ACE of the improved ACL has no meaning, that is, the flag Flag in the ACE of the improved ACL does not exist. .
  • the improved ACL is also updated when the initial ACL in the server of the file system is updated.
  • the server of the file system synchronously updates the improved ACL by using the method provided by the embodiment of the present invention, that is, the file system server reads each ACE in the updated initial ACL, and the ACL is affected according to the inheritance flag bit in the ACE.
  • the authenticated ACE is extracted and then merged for the same user or group of ACEs to get the updated improved ACL.
  • the file system's server discards the stored old improved ACL and replaces it with the newly generated improved ACL.
  • the improved ACL can be an improved NT ACL or an improved NFSv4 ACL.
  • the number of ACEs in the cache ACL is 200
  • the user information in the ACE is User A, User C, and Group B
  • the user identification information is User A's ACE
  • the user ID information is User C's ACE
  • the user identification information is merged for the ACEs of the group B, and the permission bits of the individual user ACEs are combined, that is, the improved ACL is obtained.
  • the server stores the improved ACL into a specific extended attribute of the system.
  • ACLs are saved directly to the extended attributes of the file system metadata.
  • the extended attribute is an attribute that is agreed upon internally by the file system and that the file system can look up by keyword. Specifically, after the improved ACL is generated, the file system stores it in a specific extended attribute of the file system. This particular extended attribute is also set within the file system based on preset keyword conventions.
  • the specific extended attribute of the ACL is different from the extended attribute of the initial ACL.
  • the keywords are different, and the specific content of the keyword is not limited in the embodiment of the present invention.
  • An embodiment of the present invention provides a file access authority control method, where a server reads an access control item ACE in an initial access control list ACL, where the ACE includes at least a user identifier and a member variable corresponding to each user identifier, and then determines an ACE. Whether it contains only 10 flag bits, and saves the ACE that does not contain 10 flag bits to the cache ACL. Finally, the ACEs with the same user ID in the cache ACL that do not contain 10 flag bits are merged to obtain an improved ACL. Among them, the improved ACL is used for ACL authentication of files. With this solution, since the present invention is improved by the server within the file system, the improved ACL generation does not affect the existing process of the client.
  • the ACE in the improved ACL only contains the flag for the ACL authentication of the file by the server that affects the file system.
  • the server can obtain the improved ACL for authentication without traversing all the initial ACLs. All ACEs improve the efficiency of ACL authentication for access control lists and reduce the overall cost of the system.
  • the embodiment of the present invention provides a server 1, as shown in FIG. 5, including:
  • the obtaining unit 10 is configured to read an access control item in the initial access control list ACL
  • the ACE includes at least a user identifier, and a member variable corresponding to the user identifier;
  • the determining unit 11 is configured to determine whether the ACE acquired by the obtaining unit 10 includes only inheriting 10 flag bits;
  • a pre-storage unit 12 configured to save an ACE determined by the determining unit 11 that does not include 10 flag bits into a cache ACL;
  • a processing unit 13 configured to store the cache ACL in the pre-storage unit 12
  • the ACEs that contain the same user ID and do not contain the 10 flag bits are merged to obtain an improved ACL, which is used for ACL authentication of the file.
  • the user identifier includes a user identifier or a group identifier; the member variable corresponding to each user identifier includes at least a type Type, a permission Permi s s i on and an identifier F 1 ag;
  • the flag includes at least one of a 10 flag bit, a subfolder inheritance CI flag bit, and a subfile inheritance 01 flag bit.
  • the server further includes a storage unit 15, and the storage unit 15 is configured to: in the processing unit 13, the ACE having the same user identifier and not including 10 flag bits in the cache ACL.
  • the improved ACL is stored in a file of the system, and the specific extended attribute is set in the system according to a preset keyword convention.
  • the server further includes a statistic unit 14, configured to: after the determining unit 11 determines whether the ACE includes only 10 flag bits, the pre- Before the storage unit 12 saves the ACE that does not contain the 10 flag bits into the cache ACL, the number of ACEs containing the 10 flag bits in the initial ACL is counted.
  • the pre-storage unit 12 is specifically configured to: if the statistics unit 14 counts that the number of ACEs including 10 flag bits is greater than a preset threshold, save the ACE that does not include 10 flag bits to Cache in the ACL.
  • the embodiment of the invention provides a server, which mainly comprises an obtaining unit, a determining unit, a pre-storing unit and a processing unit.
  • the obtaining unit reads the access control item ACE in the initial access control list ACL, where the ACE includes at least a user identifier and a member variable corresponding to the user identifier, and then the determining unit determines whether the ACE includes only inheriting 10 flag bits,
  • the storage unit saves the ACE that does not contain the 10 flag bits into the cache ACL.
  • the processing unit merges the ACEs that contain the same user identifier in the cache ACL that do not contain the 10 flag bits to obtain an improved ACL, where the improved ACL is used.
  • ACL authentication of files mainly comprises an obtaining unit, a determining unit, a pre-storing unit and a processing unit.
  • the improved ACL generation does not affect the existing process of the client.
  • improve ACL The ACE in the ACL only contains the flag for ACL authentication on the file system.
  • the server can directly obtain the improved ACL for authentication. It does not need to traverse all the ACEs in all the initial ACLs. Improve the efficiency of ACL authentication for access control lists and reduce the overall cost of the system.
  • the embodiment of the present invention provides a server 2, as shown in FIG. 7, including:
  • the processor 20 is configured to read an access control item ACE in the initial access control list ACL, where the ACE includes at least a user identifier, and a member variable corresponding to the user identifier, and is used to determine whether the ACE includes Only the 10 flag bits are inherited, and the ACEs that do not include the 10 flag bits are included in the cache ACL, and the improved ACL is used to perform ACL authentication on the file.
  • the user identifier includes a user identifier or a group identifier; the member variable corresponding to each user identifier includes at least a type Type, a permission
  • the flag includes at least one of a 10 flag bit, a subfolder inheritance CI flag bit, and a subfile inheritance 01 flag bit.
  • the memory 21 is specifically configured to: if the counter 11 counts that the number of ACEs including the 10 flag bits is greater than a preset threshold, the memory 21 is not included
  • the 10 flag ACE is saved to the cache ACL.
  • the server further includes a counter
  • the counter 22 is configured to: after the processor 20 determines whether the ACE includes only 10 flag bits, the memory 21 will not include 10 flag bits.
  • the number of ACEs with 10 flags in the initial ACL is counted.
  • the memory 21 is further configured to, after the processor 20, merge the ACEs that have the same user identifier in the cache ACL and do not include 10 flag bits, and are improved.
  • the improved ACL is stored in a file of the system, and the specific extended attribute is set internally by the system according to a preset keyword convention.
  • the embodiment of the invention provides a server, which mainly comprises a processor and a memory.
  • the processor reads the access control item ACE in the initial access control list ACL, where the ACE includes at least the user identifier and the member variable corresponding to the user identifier, and then determines whether the ACE contains only 10 flag bits, and the memory will not
  • the ACE containing the 10 flag bits is saved to the cache ACL.
  • the processor merges the ACEs containing the same user ID that do not contain the 10 flag bits in the cache ACL to obtain an improved ACL.
  • the improved ACL is used to ACL the file. Authentication.
  • the ACE in the improved ACL only contains the flag for the ACL authentication of the file by the server that affects the file system.
  • the server can obtain the improved ACL for authentication without traversing all the initial ACLs. All ACEs improve the efficiency of ACL authentication for access control lists and reduce the overall cost of the system.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combined or can be integrated into another system, or some features can be ignored, or not executed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供一种文件访问权限控制方法及装置,涉及通信领域,能够提升访问控制列表ACL鉴权的效率,降低系统的整体开销。该方法包括:读取初始访问控制列表ACL中的访问控制项ACE,所述ACE至少包括用户标识、以及与所述用户标识对应的成员变量;判断所述ACE中是否包含有只继承IO标志位;将不包含有IO标志位的ACE保存至缓存ACL中;将所述缓存ACL中包含有相同用户标识的不包含IO标志位的ACE合并,得到改进ACL,所述改进ACL用于对文件进行ACL鉴权。

Description

一种文件访问权限控制方法及装置 技术领域
本发明涉及通信领域, 尤其涉及一种文件访问权限控制方法及 装置。
背景技术
在文件系统的服务器中, 访问控制列表 ( ACL, Access Control List ) 用于控制用户或群组成员对文件夹或文件的访问权限, 即文 件系统的服务器根据 ACL 来控制用户或群组成员对文件夹或文件的 访问权限。 在文件系统中, 每一个目录或文件都会对应有一个 ACL, 在文件的创建、 删除、 读写数据以及设置属性等多个操作中都会根 据 ACL 对用户的操作权限进行限制, 这样也提高了文件系统的安全 性。
在现有技术中,对文件进行访问权限鉴权时, 即对文件进行 ACL 鉴权时, 文件系统的服务器将需要的 ACL 从扩展属性中读取出来, 然后遍历 ACL 中所有的访问控制项(ACE, Access Control Entry) , 找出和当前用户相关联的所有 ACE, 并对该 ACE逐一进行比较判断。
然而, 由于文件系统中的 ACL 有可能包含上千条 ACE, 遍历所 有的 ACE 并判断用户或群组是否有权限访问文件或者文件夹, 过程 繁瑣, 时间消耗大, 效率低。
发明内容
本发明的实施例提供一种文件访问权限控制方法及装置, 解决 了文件系统的服务器对文件进行访问控制列表 ACL 鉴权时, 遍历所 有访问控制项 ACE 而导致的时间浪费、 低效率问题, 本发明能够提 升 ACL鉴权的效率, 降低系统的整体开销。
为达到上述目的, 本发明的实施例釆用如下技术方案:
第一方面, 本发明实施例提供一种文件访问权限控制方法, 该 方法包括: 读取初始访问控制列表 ACL 中的访问控制项 ACE , 所述 ACE 至 少包括用户标识、 以及与所述用户标识对应的成员变量;
判断所述初始 ACE 中是否包含有只继承 10标志位;
将不包含有 10标志位的 ACE保存至緩存 ACL 中;
将所述緩存 ACL 中包含有相同用户标识的不包含 10 标志位的 ACE合并, 得到改进 ACL, 所述改进 ACL用于对文件进行 ACL鉴权。
在第一方面的第一种可能的实现方式中, 所述用户标识包括用 户标示符或群组标示符; 所述与各个用户标识对应的成员变量至少 包括类型 Type, 权限 Perm ission和标识 Flag;其中 , 所述 Flag 中 包括 10标志位、 子文件夹继承 C I标志位和子文件继承 01标志位中 的至少一个。
结合第一方面的第一种可能的实现方式, 在第一方面的第二种 可能的实现方式中, 将所述改进 ACL存储至系统的特定扩展属性中 , 所述特定扩展属性为文件系统内部根据预设关键字约定设置的。
结合前述的第一方面或第一方面的第一种可能的实现方式至第 二种可能的实现方式, 在第三种可能的实现方式中, 所述判断所述 ACE 中是否包含有只继承 10 标志位之后, 所述将不包含有 10 标志 位的 ACE保存至緩存 ACL 中之前, 所述方法还包括:
统计所述初始 ACL 中包含有 10标志位的 ACE的数量。
结合第一方面的第三种可能的实现方式, 在第一方面的第四种 可能的实现方式中, 若所述包含有 10标志位的 ACE的数量大于预设 门限值,则执行所述将不包含有 10标志位的 ACE保存至緩存 ACL中。
第二方面, 本发明实施例提供一种服务器, 包括:
获取单元, 用于读取初始访问控制列表 ACL 中的访问控制项 ACE , 所述 ACE至少包括用户标识、 以及与所述用户标识对应的成员 变量;
判断单元, 用于判断所述获取单元获取到的所述 ACE 中是否包 含有只继承 10标志位;
预存储单元,用于将所述判断单元确定的不包含有 10标志位的 ACE保存至緩存 ACL 中;
处理单元, 用于将预存储单元存储的所述緩存 ACL 中包含有相 同用户标识的不包含 10标志位的 ACE合并, 得到改进 ACL, 所述改 进 ACL用于对文件进行 ACL鉴权。
在第二方面的第一种可能的实现方式中, 所述用户标识包括用 户标示符或群组标示符; 所述与各个用户标识对应的成员变量至少 包括类型 Type, 权限 Perm ission和标识 Flag; 其中 , 所述 Flag 中 包括 10标志位、 子文件夹继承 C I标志位和子文件继承 01标志位中 的至少一个。
结合第二方面的第一种可能的实现方式, 在第二方面的第二种 可能的实现方式中, 所述服务器还包括存储单元,
所述存储单元, 用于在所述处理单元将所述緩存 ACL 中有相同 用户标识的不包含 10标志位的 ACE合并, 得到改进 ACL之后, 将所 述改进 ACL 存储至系统的文件中, 所述特定扩展属性为系统内部根 据预设关键字约定设置的。
结合前述的第二方面或第二方面的第一种可能的实现方式至第 二种可能的实现方式, 在第三种可能的实现方式中, 所述服务器还 包括统计单元,
所述统计单元, 用于在所述判断单元判断所述 ACE 中是否包含 有只继承 10标志位之后, 所述预存储单元将不包含有 10标志位的 ACE保存至緩存 ACL 中之前, 统计所述初始 ACL 中包含有 10标志位 的 ACE的数量。
结合第二方面的第三种可能的实现方式, 在第二方面的第四种 可能的实现方式中, 若所述包含有 10标志位的 ACE的数量大于预设 门限值,则执行所述将不包含有 10标志位的 ACE保存至緩存 ACL中。
第三方面, 本发明实施例还提供一种服务器, 包括:
处理器, 用于读取初始访问控制列表 ACL 中的访问控制项 ACE , 所述 ACE至少包括用户标识、 以及与所述用户标识对应的成员变量, 以及用于判断所述 ACE 中是否包含有只继承 10标志位, 以及用于将 所述緩存 ACL 中包含有相同用户标识的不包含 10 标志位的 ACE 合 并, 得到改进 ACL, 所述改进 ACL用于对文件进行 ACL鉴权;
存储器, 用于将所述不包含有 10标志位的 ACE保存至緩存 ACL 中。
在第三方面的第一种可能的实现方式中, 所述用户标识包括用 户标示符或群组标示符; 所述与各个用户标识对应的成员变量至少 包括类型 Type, 权限 Perm ission和标识 Flag; 其中 , 所述 Flag 中 包括 10标志位、 子文件夹继承 C I标志位和子文件继承 01标志位中 的至少一个。
结合第三方面的第一种可能的实现方式, 在第三方面的第二种 可能的实现方式中, 所述存储器, 还用于在所述处理器将所述緩存 ACL中有相同用户标识的不包含 10标志位的 ACE合并,得到改进 ACL 之后, 将所述改进 ACL 存储至系统的文件中, 所述特定扩展属性为 系统内部根据预设关键字约定设置的。
结合前述的第三方面或第三方面的第一种可能的实现方式至第 二种可能的实现方式, 在第三种可能的实现方式中, 所述服务器还 包括计数器,
所述计数器, 用于在所述处理器判断所述 ACE 中是否包含有只 继承 10标志位之后, 所述存储器将不包含有 10标志位的 ACE保存 至緩存 ACL 中之前, 统计所述初始 ACL 中包含有 10标志位的 ACE的 数量。
结合第三方面的第三种可能的实现方式, 在第三方面的第四种 可能的实现方式中, 所述存储器, 具体用于若所述计数器统计所述 包含有 10标志位的 ACE的数量大于预设门限值, 则执行所述将不包 含有 10标志位的 ACE保存至緩存 ACL 中。
本发明实施例提供一种文件访问权限控制方法及装置, 服务器 读取初始访问控制列表 ACL 中的访问控制项 ACE, 判断初始 ACL 的 ACE 中是否包含有只继承 10 标志位, 并将不包含有只继承 10 标志 位的 ACE保存至緩存 ACL 中, 将緩存 ACL 中包含有相同用户标识的 不包含 10标志位的 ACE合并,得到改进 ACL,以便于对文件进行 ACL 鉴权时, 直接获取改进 ACL 进行鉴权。 通过该方案, 本发明只在服 务器端对文件系统内部进行改进, 因此改进 ACL 的生成不会影响到 客户端的既有流程。 而且, 改进 ACL 中的 ACE只包含有影响文件系 统的服务器对文件进行 ACL鉴权的标志位, 从而对文件进行 ACL鉴 权时, 服务器可以直接获取改进 ACL 进行鉴权, 不需要遍历所有初 始 ACL 中所有的 ACE, 提升访问控制列表 ACL 鉴权的效率, 降低系 统的整体开销。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下 面将对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于 本领域普通技术人员来讲, 还可以根据这些附图获得其他的附图。
图 1为一种典型的 NAS文件系统的系统框架示意图;
图 2为本发明实施例的文件访问权限控制方法流程示意图一; 图 3为本发明实施例的緩存 ACL 中有相同用户标识的 ACE合并 的流程示意图;
图 4为本发明实施例的文件访问权限控制方法流程示意图二; 图 5为本发明实施例的服务器结构示意图一;
图 6为本发明实施例的服务器结构示意图二;
图 7为本发明实施例的服务器结构示意图三;
图 8为本发明实施例的服务器结构示意图四。
具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术 方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明 一部分实施例, 而不是全部的实施例。
在文件系统的服务器中, 由于多用户共享文件系统中的文件, 为了保证文件的安全性, 通常需要针对不同的用户或用户群组的读、 写或修改等操作进行权限控制。 为了便于控制权限, 文件系统的服务器中的每一个文件夹或文 件啫 对应一个访问控制歹 'J表 ( ACL, Access Control List ), 且该 ACL存储在文件系统的服务器中。 ACL用来存储文件系统的服务器中 文件和文件夹的访问权限。 它是由许多 ACE( Access Control Entry, 访问控制项)组成的列表, 每个访问控制项定义一个用户或群组及其 对应的访问权限, 即用户对文件的创建、 读、 写、 属性设置等操作 是否被允许。 ACL具有继承性和叠加性等特点。
其中, 继承性是指在默认情况下授予父文件夹的权限将被该父 文件夹下的子文件夹或文件所继承, 也可以说文件或文件夹默认继 承分区或父文件夹的权限, 并且继承来的权限不能被直接修改。 叠 力口' 1"生是指 ^口一个组 Groupl 中有两个用户 Userl、 User2,用户 Userl、 User2 同时对某文件或文件夹的访问权限分别为 "读取" 和 "写入", 那么组 G r oup 1对该文件或文件夹的访问权限就为 User 1和 User2的 访问权限之和, 即 "读取" + "写入" = "写入"。 又如一个用户 Userl 同属于组 Groupl 和 Group2, Groupl 对某一文件或目录的访问权限 为 "只读" 型的, 而 Group2对这一文件或文件夹的访问权限为 "完 全控制" 型的, 则用户 Userl 对该文件或文件夹的访问权限为两个 组权限累加所得, 即: "只读" + "完全控制" = "完全控制"。
NAS ( Network Attached Storage, 网络附力口存储) 是一种釆用 直接与网络介质相连的特殊设备实现数据存储的机制。 由于这些设 备都分配有 IP地址, 所以客户端通过充当数据网关的服务器可以对 其进行访问。 NAS 设备在数据必须长距离传送的环境中可以很好地 发挥作用。 NAS应用于高效的文件共享任务中, 例如 UNIX操作系统 中的 NFS ( Network File System, 网络文件系统) 和 Windows NT ( Windows New Technology , 微软新技术 ) 中 的 CIFS ( Common Internet File System, 通用互联网文件系统)。
DAS ( Direct Attached Storage,直连式存储 ) 依赖月良务器主机 操作系统进行数据的 I/O ( Input/Output, 输入 /输出 ) 读写和存储 维护管理, 数据备份和恢复要求占用服务器主机资源, 数据流需要 回流主机再到服务器连接着的数据库。 DAS 本身是硬件的堆叠, 不 带有任何存储操作系统。 其中, 存储设备是通过电缆直接到服务器 的, I/O (输入 /输出 ) 请求直接发送到存储设备。
SAS ( Serial Attached Small Computer System Interface, 串行连接小型计算机系统接口 ) 存储系统釆用 串行技术以获得更高 的传输速度, 并通过缩短连接线改善内部空间等。 SAS 的接口技术 可以向下兼容 SATA ( Serial Advanced Techno logy Attachment, 串行高级技术附件)。 SAS 系统的背板既可以连接具有双端口、 高性 能的 SAS驱动器, 也可以连接高容量、 低成本的 SATA驱动器。 由于 SAS 系统的兼容性, IT人员能够运用不同接口的硬盘来满足各类应 用在容量上或效能上的需求, 因此在扩充存储系统时拥有更多的弹 性, 让存储设备发挥最大的投资效益。
目前大部分文件系统都支持通过 ACL 来实现对文件的权限控 制, 文件系统中不同的客户端可以使用不同的 ACL 机制。 例如, 如 图 1 所示, 是一个典型的 NAS文件系统的系统架构图, 三个支持不 同 ACL机制的客户端分别连接至文件系统的服务器, 客户端分别为: 支持 NT ACL ( New Technology Access Control List, 新技术访问 控制歹 'J表)的 Windows客户端、 支持 NT ACL的 MAC ( Macintosh, 麦 金塔) 系统客户端和支持 NFSv4 ( Network File System vers ion 4, 网络文件系统版本 4 ) ACL的 LINUX/UNIX客户端。 其中, NT ACL 中 包含用户对文件的读、 写、 可执行、 设置属性等访问操作的权限, NFSv4 ACL 中包含用户对文件的读、 写和可执行三种访问操作的权 限。
现有技术中, NT ACL或 NFSv4 ACL会被直接保存到文件系统元 数据的扩展属性中。 每当用户发起对文件的操作, 文件系统的服务 器就需要进行访问权限鉴权, 即文件系统的服务器就需要对文件进 行 ACL鉴权。 文件系统的服务器会将 ACL从扩展属性中读取出来, 然后遍历所有的 ACE, 找出和当前访问用户相关联的 ACE, 并对该 ACE 逐一进行比较判断, 这样文件系统的服务器进行 ACL 鉴权的时 间消耗大, 效率低。
本发明实施例提供一种文件访问权限控制方法及装置, 解决了 文件系统的服务器进行 ACL鉴权时, 遍历访问控制列表 ACL 中所有 访问控制项 ACE 而导致的时间浪费、 低效率问题, 本发明能够提升 ACL鉴权的效率, 降低系统的整体开销。
本发明实施例中描述的实现方法适合于网络附加存储 NAS 系 统、 直连式存储 DAS 系统、 串行连接小型计算机系统接口 SAS存储 系统等文件系统中。 实施例一
本发明实施例提供一种文件访问权限控制方法, 如图 2 所示, 该方法包括:
S10K 服务器读取初始 ACL 中的 ACE。
每当用户发起对文件的操作请求, 文件系统的服务器就需要对 文件进行 ACL鉴权。 服务器将 ACL从服务器元数据的扩展属性中读 取出来。 然后遍历 ACL 中的所有 ACE, 找出和当前访问用户相关联 的 ACE。
其中, ACL 存储有文件系统中文件夹和文件的访问权限, ACL 中包含有许多访问控制项 ACE, 每个访问控制项记录一个用户或群 组及其对应的访问权限。 ACE 至少包括用户标识 (例如: 用户标示 符或群组标示符)、 以及与用户标识对应的成员变量(例如: 能否访 问的类型 Type , 权限 Permi s s i on和标识 F 1 ag)。
具体的, 每条 ACE 中的成员变量的标识 Flag 用于记录该 ACE 的继 标志位, ACE的继 标志位包括 10 ( Inherit Only,只继氷 ) 标志位、 CI( Container Inherit,子文件夹继承)标志位和 0I( Object Inherit, 子文件继承) 标志位中的至少一个。 10 标志位表示该 10 标志位所在的 ACE 不应用于当前文件夹或当前文件, 即当用户访问 的文件夹的 ACL 中该用户对应的 ACE 中包含有 10标志位, ACE 中的 访问权限对所述用户的访问没有影响, 也就是说不对用户访问该文 件夹进行权限限制。 CI 标志位表示该 CI 标志位所在的 ACE 由当前 文件夹的子文件夹继承, 01 标志位表示该 01 标志位所在的 ACE 由 当前文件夹的子文件继承。
示例性的, 若 ACL为 NT ACL, 且该 NT ACL 中包含 1条访问控 制项 ACE, 每条 ACE 包含用户标识 ID、 该用户能否访问文件的类型 Type, 权限 Permission和标识 Flag, NT ACL的结构如表 1 所示。
表 1
Figure imgf000011_0001
其中, it NT ACL 中包含 NT ACE 0和 NT ACE 1 , NT ACE 0 中包 含用户 ID: UserA (用户 A), 用户 A能否访问文件的类型 type为: allow (允许 ), 用户 A对文件的权限 permission为 list-directory
(列出文件夹), 这条 ACE携带的标识 Flag有标志位 01 和 CI, 其 中, 列出文件夹代表用户 A可以读取文件夹。 NT ACE 1 中包含用户 ID: UserA (用户 A), 用户 A 能否访问文件的类型 type 为: allow
(允许), 用户 A对文件的权限 per mi ss ion为 add_f i le (创建文件 夹), 这条 ACE携带的标识 Flag有标志位 01和 10。 可选的, 本发明实施例中描述的初始访问控制列表 ACL可以是 NT ACL, 也可以是 NFS v4 ACL, ACL的类型对于本发明实施例中描述 的方法的实现没有影响。
需要说明的是, 该初始 ACL 可以是文件系统的服务器自带的 ACL, 也可以是文件系统中 ACL继承父文件夹后生成的 ACL, 还可以 是客户端手动设置生成的 ACL。
例如, 若初始 ACL为 NAS 系统中的 NT ACL, NT ACL 由零条或多 条 ACE 构成, 则 NAS 系统的服务器在对文件进行 ACL 鉴权时, NAS 系统的服务器先读取该 NT ACL 中的所有 ACE。
S102、 服务器判断初始 ACL的 ACE 中是否包含有 10标志位。
ACL是由许多访问控制项 ACE组成的列表,每个访问控制项 ACE 记录一个用户或群组及其对应的访问权限, ACE 中至少包括用户标 识、 以及与用户标识对应的成员变量。
其中, ACE成员变量中有一成员变量标识 Flag记录有 10标志 位、 C I标志位和 01标志位中的至少一个。
具体的, 10标志位表示该 10标志位所在的 ACE 不影响当前文 件夹本身的鉴权,即包含有 10标志位的 ACE不影响父文件夹的鉴权, 它依赖于 CI 标志位和 /或 01 标志位的存在, 不能单独存在。 CI 标 志位和 /或 01标志位会影响子文件夹和 /或子文件的鉴权。 在新建子 文件夹或者子文件时, 可以根据父文件夹对应的 ACE 中的这些标志 位获知如何将父文件夹对应的 ACE 传播到子文件夹和 /或子文件对 应的 ACE 中。
由于, 10标志位不影响对应的父文件夹本身的鉴权, 所以, 在 文件系统的服务器对文件夹或文件进行 ACL鉴权时, 需判断 ACL 中 的对应的 ACE 中是否包含有 10标志位, 如果包含 10标志位, 则说 明该条 ACE不影响当前文件夹或文件的鉴权, 若不包含 10标志位, 则说明该条 ACE影响当前文件夹或文件的鉴权。
例如, 若初始 ACL 为 NAS 系统中的 NFSv4 ACL, 该 NFSv4 ACL 由零条或多条 ACE构成, NAS 系统在对文件进行 ACL鉴权时, NAS 系 统的服务器读取该 NFSv4 ACL 中的所有 ACE, 通过 ACE 的信息, 判 断 ACE 中是否包含有 10标志位, 从而判断哪条 ACE会影响对文件进 行 ACL鉴权。
5103、 服务器将不包含有 10标志位的 ACE保存至緩存 ACL 中。 具体的, 在服务器读取初始 ACL 中的 ACE后, 服务器确定不包 含 10标志位的 ACE, 并将该不包含 10标志位的 ACE保存至緩存 ACL 中。
进一步地, 由于 10标志位表示包含 10标志位的 ACE不影响父 文件夹本身的鉴权,而緩存 ACL是由不包含 10标志位的 ACE构成的, 因此緩存 ACL 中的所有 ACE都会影响父文件夹的鉴权。
5104、 服务器将緩存 ACL 中包含有相同用户标识的不包含 10 标志位的 ACE合并, 得到改进 ACL。
緩存 ACL 中只有不包含 10标志位的 ACE, 每条 ACE 中包含用户 标识以及与用户标识对应的成员。文件系统的服务器读取该緩存 ACL 中的 ACE后, 获得每条 ACE 的用户标识, 然后将包含有相同用户标 识的 ACE合并, 进而得到改进 ACL。
具体的, 文件系统的服务器将包含有相同用户标识且携带有相 同的用户能否访问文件的类型的 ACE 进行合并, 其中, 包含有相同 用户标识且携带有相同的用户能否访问文件的类型的 ACE 中的权利 位取并集。
需要说明的是,由于 ACE 中的成员变量的标识 Flag用于记录该 ACE的继承标志位, 且包含有 10标志位的 ACE不影响父文件夹的鉴 权, 只影响父文件夹的继承, CI标志位和 /或 01标志位会影响子文 件夹和 /或子文件的鉴权,而緩存 ACL中只有不包含 10标志位的 ACE, 即緩存 ACL 中的继承标志位中的标志位只会影响子文件夹和 /或子 文件的鉴权, 不会影响子文件夹和 /或子文件的的继承。 因此, 服务 器将緩存 ACL 中包含有相同用户标识的不包含 10 标志位的 ACE 合 并, 得到改进 ACL后, 用于记录 ACE的继承标志位的标识 Flag 中的 标志位只会影响子文件夹和 /或子文件的鉴权, 不会影响子文件夹和 /或子文件的的继承, 即改进 ACL 的 ACE 中的标识 Flag 的存在没有 意义, 也就是说, 改进 ACL的 ACE 中的标识 Flag不存在。
由于, 改进 ACL 中不存在 10标志位, 因此, 文件系统的服务器 对文件进行 ACL鉴权时, 可直接获取该改进 ACL, 通过读取改进 ACL 中的 ACE来进行 ACL鉴权。
进一步地, 若文件系统的服务器中已经存在改进 ACL, 则当文 件系统的服务器中的初始 ACL更新时, 改进 ACL也进行相应的更新。 文件系统的服务器釆用本发明实施例提供的方法对改进 ACL 进行更 新, 即文件系统的服务器读取更新后的初始 ACL 中的每条 ACE, 根 据 ACE 中的继承标志位, 将会影响 ACL鉴权的 ACE提取出来, 然后 针对相同用户或组的 ACE进行合并, 得到更新后的改进 ACL。 此时, 文件系统的服务器会将存储的旧的改进 ACL 舍弃, 用新生成的改进 ACL代替。
可选的,改进 ACL可以是改进 NT ACL,也可以是改进 NFSv4 ACL。 示例性的, 如图 3所示, Temp ACL为緩存 ACL, 若緩存 ACL 中 的 ACE数量为二百条, 其中 ACE 0和 ACE 1 中的用户信息都为用户 A , 且 ACE 0和 ACE 1 中的用户能否访问文件的类型均为 a 11 ow (允 许), ACE 0中的权限为 1 is t_di rectory, ACE 1 中的权限为 add.fi le, 文件系统的服务器则将 ACE 0 和 ACE 1 进行合并, 其中, ACE 0 和 ACE 1 的权利位 permission取并集, 因此服务器将緩存 ACL 中包含 有相同用户标识的不包含 10 标志位的 ACE合并, 得到 Access ACL ( 改进 ACL ) , 改进 ACL 中 包含用 户 A 的 ACE 的权限为 : list-directory和 add_file。
需要说明的是, 在本发明实施例生成改进 ACL 的过程由服务器 在文件系统内部进行改进, 改进 ACL 的生成不会影响到客户端的既 有流程。
本发明实施例提供一种文件访问权限控制方法, 服务器读取初 始访问控制列表 ACL 中的访问控制项 ACE, 其中, ACE至少包括用户 标识、 以及与用户标识对应的成员变量。 然后, 判断 ACE 中是否包 含有只继承 10标志位, 并将不包含有 10标志位的 ACE保存至緩存 ACL 中。 最后, 将緩存 ACL 中有相同用户标识的不包含 10标志位的 ACE合并, 得到改进 ACL; 其中, 改进 ACL用于对文件进行 ACL鉴权。 通过该方案, 由于本发明只由服务器在文件系统内部进行改进, 因 此改进 ACL 的生成不会影响到客户端的既有流程, 而且, 改进 ACL 中的 ACE只包含有影响文件系统的服务器对文件进行 ACL鉴权的标 志位, 从而对文件进行 ACL 鉴权时, 服务器可以直接获取改进 ACL 进行鉴权, 不需要遍历所有初始 ACL 中所有的 ACE, 提升访问控制 列表 ACL鉴权的效率, 降低系统的整体开销。 实施例二
本发明实施例提供一种文件访问权限控制方法, 如图 4 所示, 该方法包括:
S20K 服务器读取初始 ACL 中的 ACE。
当文件系统的服务器对文件进行 ACL鉴权时, 服务器将 ACL从 扩展属性中读取出来, 然后遍历所有 ACE, 找出和当前访问用户相 关联的 ACE。
具体的, 文件系统的服务器对文件进行 ACL鉴权时, 首先读取 初始访问控制列表 ACL 中的访问控制项 ACE。
其中, ACE 至少包括用户标识、 以及与各个用户标识对应的成 员变量。 用户标识包括用户标示符或群组标示符。 与各个用户标识 对应的成员 变量至少包括用户 能否访问文件的类型 Type、 权限 Permission和标识 F 1 a g。
具体的,每条 ACE 中的成员变量标识 Flag记录有该 ACE的继承 标志位, ACE 的继 标志位包括 10 ( Inherit Only,只继 )、 CI ( Container Inherit, 子文件夹继承) 和 01 ( Object Inherit, 子文件继承) 中的至少一个。 10标志位表示该 10标志位所在的 ACE 不应用于当前文件夹或当前文件, 即对包含有 10标志位的 ACE进行 鉴权是不起作用的, CI 标志位表示子文件夹将继承该 CI 标志位所 在的 ACE , 01标志位表示子文件将继承该 01标志位所在的 ACE。 可选的,初始访问控制列表 ACL可以是 NT ACL ,也可以是 NFS v4
ACL。
需要说明的是, 该初始 ACL 可以是文件系统的服务器自带的 ACL,也可以是文件系统的服务器中 ACL继承父文件夹后生成的 ACL, 还可以是客户端手动设置生成的 ACL。
例如, 若初始 ACL为 NAS 系统中的 NT ACL, NT ACL 由零条或多 条 ACE 构成, 则 NAS 系统的服务器在对文件进行 ACL 鉴权时, NAS 系统的服务器先读取该 NT ACL 中的所有 ACE。
S202、 服务器判断初始 ACL的 ACE 中是否包含有 10标志位。 其中, 10标志位记录在 ACE 中的成员变量 Flag 中。
ACL是由许多访问控制项 ACE组成的列表,每个访问控制项 ACE 定义一个用户或群组及其权限, ACE 中至少包括用户标识、 以及与 各个用户标识对应的成员变量。
其中, ACE成员变量中有一成员变量标识 Flag记录相对应用户 的只继承 10标志位、 子文件夹继承 CI标志位和子文件继承 01标志 位中的至少一个。
进一步地, 10标志位不影响父文件夹本身的鉴权, 即包含有 10 标志位的 ACE不影响父文件夹的鉴权, 它依赖于 CI标志位和 /或 01 标志位的存在, CI 标志位和 /或 01 标志位会影响子文件夹和 /或子 文件的鉴权。 在新建子文件夹或者子文件时, 可以根据父文件夹 ACE 中的这些标志位获知如何将 ACE传播到子文件夹和 /或子文件的 ACE 中。
示例性的, ACE 中的 10标志位和 /或 CI标志位和 /或 01标志位 的传播结果如表 2所示: 表 2
Figure imgf000017_0001
目标文件夹代表父文件夹本身。
由表 2可知, 包含有 10标志位的 ACE不影响父文件夹本身的鉴 权。
进一步地, 由于 10标志位不影响父文件夹本身的鉴权, 在文件 系统的服务器对文件夹或文件进行 ACL鉴权时, 需判断 ACE 中是否 包含有 10标志位, 如果包含 10标志位, 则说明该条 ACE不影响鉴 权, 若不包含, 则说明该条 ACE影响鉴权。
例如, 若初始 ACL 为 NAS 系统中的 NFSv4 ACL, 该 NFSv4 ACL 由零条或多条 ACE 构成, NAS 系统的服务器在对文件进行 ACL 鉴权 时, 先读取该 NFSv4 ACL 中的所有 ACE, 通过 ACE的信息, 判断 ACE 中是否包含有 10标志位, 从而判断哪条 ACE会影响对文件的 ACL鉴 权。
S203、 服务器统计初始 ACL 中包含有 10标志位的 ACE的数量。 文件系统的服务器在读取初始 ACL 中的 ACE时, 会自动获取初 始 ACL 中 ACE的数量。 服务器在判断初始 ACL 的 ACE 中是否包含有 10标志位后, 统计该初始 ACL 中不影响鉴权的 ACE的数量, 即统计 初始 ACL 中包含有 I 0标志位的 ACE的数量, 进而判断初始 ACL 中包 含有 10标志位的 ACE的数量是否大于预设门限值, 以便于决定是否 需要筛选出会影响鉴权的 ACE。
例如, 若初始 ACL为 NAS 系统中的 NT ACL, 该 NT ACL 由三千 条 ACE构成, 其中有二百条 ACE 包含 10标志位, 则 NAS 系统在读取 该 NT ACL 中的所有 ACE信息后, 统计该 NT ACL 中包含 10标志位的 ACE的数量为二百条。
S204、 若包含有 10标志位的 ACE的数量大于预设门限值, 服务 器则将不包含有 10标志位的 ACE保存至緩存 ACL 中。
具体的, 在文件系统的服务器读取初始 ACL 中的 ACE, 并统计 了该初始 ACL 中包含有 10标志位的 ACE的数量后, 文件系统的服务 器根据预设门限值, 判断初始 ACL 中包含有 10标志位的 ACE的数量 是否大于预设门限值。
进一步地, 若包含有 10标志位的 ACE的数量大于预设门限值, 则文件系统的服务器将不包含有 10 标志位的 ACE 保存至緩存 ACL 中, 由于 10标志位不影响父文件夹本身的鉴权, 且緩存 ACL 中只包 含有除 10标志位以外的标志位, 因此緩存 ACL 中的所有 ACE都会影 响文件的鉴权。
例如, 若 NAS 系统中的 NT ACL 包含有两千条 ACE, 其中有三百 条 ACE 包含有 10标志位, 当包含有 10标志位的 ACE的数量大于预 设门限值二百条时, NAS 系统的服务器将一千七百条不包含有 10标 志位的 ACE保存至緩存 ACL 中。
S205、 服务器将緩存 ACL 中包含有相同用户标识的不包含 10 标志位的 ACE合并, 得到改进 ACL。
具体的, 緩存 ACL 中只有不包含 10标志位的 ACE, 每条 ACE 中 包含有自身的用户标识信息, 文件系统的服务器读取该緩存 ACL 中 的所有 ACE后, 获得緩存 ACL 中的每条 ACE 的用户标识信息, 该用 户标识信息中有相同的用户标识存在,文件系统的服务器将緩存 A C L 中包含有相同用户标识的 ACE合并。
其中, 文件系统的服务器将緩存 ACL 中包含有相同用户标识且 携带有相同的用户能否访问文件的类型的 ACE 中的权利位取并集。 进而, 得到改进 ACL, 这样, 针对同一用户标识, 改进 ACL 中只包 含有一 ACE, 在文件系统的服务器对文件进行 ACL 鉴权时, 时间消 耗较少。
需要说明的是,由于 ACE 中的成员变量的标识 Flag用于记录该 ACE的继承标志位, 且包含有 10标志位的 ACE不影响父文件夹的鉴 权, 只影响父文件夹的继承, CI标志位和 /或 01标志位会影响子文 件夹和 /或子文件的鉴权,而緩存 ACL中只有不包含 10标志位的 ACE, 即緩存 ACL 中的继承标志位中的标志位只会影响子文件夹和 /或子 文件的鉴权, 不会影响子文件夹和 /或子文件的的继承。 因此, 服务 器将緩存 ACL 中包含有相同用户标识的不包含 10 标志位的 ACE 合 并, 得到改进 ACL后, 用于记录 ACE的继承标志位的标识 Flag 中的 标志位只会影响子文件夹和 /或子文件的鉴权, 不会影响子文件夹和 /或子文件的的继承, 即改进 ACL 的 ACE 中的标识 Flag 的存在没有 意义, 也就是说, 改进 ACL的 ACE 中的标识 Flag不存在。
进一步地, 若文件系统的服务器中已经存在改进 ACL, 则当文 件系统的服务器中的初始 ACL 更新时, 改进 ACL也进行更新。 文件 系统的服务器釆用本发明实施例提供的方法对改进 ACL 进行同步更 新, 即文件系统的服务器读取更新后的初始 ACL 中的每条 ACE, 根 据 ACE 中的继承标志位, 将会影响 ACL鉴权的 ACE提取出来, 然后 针对相同用户或组的 ACE进行合并, 得到更新后的改进 ACL。 此时, 文件系统的服务器会将存储的旧的改进 ACL 舍弃, 用新生成的改进 ACL代替。
可选的,改进 ACL可以是改进 NT ACL,也可以是改进 NFSv4 ACL。 例如, 緩存 ACL 中的 ACE数量为二百条, 该 ACE 中的用户信息 有用户 A、 用户 C和群组 B, 则将用户标识信息为用户 A的 ACE、 用 户标识信息为用户 C 的 ACE和用户标识信息为群组 B的 ACE分别合 并, 各个用户 ACE的权限位取并集, 即得到改进 ACL。
S206、 服务器将改进 ACL存储至系统的特定扩展属性中。
一般情况下, ACL 会被直接保存到文件系统元数据的扩展属性 中。 该扩展属性是文件系统内部约定好的, 文件系统通过关键字可 查找的属性。 具体的, 在生成改进 ACL后, 文件系统将其存储至文件系统的 特定扩展属性中。 该特定扩展属性也是文件系统内部根据预设关键 字约定设置的。
需要注意的是, 改进 ACL存储的特定扩展属性与初始 ACL存储 的扩展属性是不同的, 二者关键字不同, 关键字的具体内容, 本发 明实施例不做限定。
本发明实施例提供一种文件访问权限控制方法, 服务器读取初 始访问控制列表 ACL 中的访问控制项 ACE, 其中, ACE至少包括用户 标识、 以及与各个用户标识对应的成员变量, 然后, 判断 ACE 中是 否包含有只继承 10标志位, 并将不包含有 10标志位的 ACE保存至 緩存 ACL 中, 最后, 将緩存 ACL 中有相同用户标识的不包含 10标志 位的 ACE合并, 得到改进 ACL, 其中, 改进 ACL用于对文件进行 ACL 鉴权。 通过该方案, 由于本发明由服务器在文件系统内部进行改进, 因此改进 ACL的生成不会影响到客户端的既有流程。 而且, 改进 ACL 中的 ACE只包含有影响文件系统的服务器对文件进行 ACL鉴权的标 志位, 从而对文件进行 ACL 鉴权时, 服务器可以直接获取改进 ACL 进行鉴权, 不需要遍历所有初始 ACL 中所有的 ACE, 提升访问控制 列表 ACL鉴权的效率, 降低系统的整体开销。 实施例三
本发明实施例提供一种服务器 1 , 如图 5所示, 包括:
获取单元 10 , 用于读取初始访问控制列表 ACL 中的访问控制项
ACE , 所述 ACE至少包括用户标识、 以及与所述用户标识对应的成员 变量;
判断单元 11 , 用于判断所述获取单元 10获取到的所述 ACE 中 是否包含有只继承 10标志位;
预存储单元 12, 用于将所述判断单元 11确定的不包含有 10标 志位的 ACE保存至緩存 ACL 中;
处理单元 13, 用于将预存储单元 12 存储的所述緩存 ACL 中包 含有相同用户标识的不包含 10标志位的 ACE合并, 得到改进 ACL, 所述改进 ACL用于对文件进行 ACL鉴权。
进一步地, 所述用户标识包括用户标示符或群组标示符; 所述与各个用户标识对应的成员变量至少包括用户能否访问文 件的类型 Type , 权限 Permi s s i on和标识 F 1 ag;
其中, 所述 Flag 中包括 10标志位、 子文件夹继承 CI标志位和 子文件继承 01标志位中的至少一个。
进一步地, 如图 6所示, 所述服务器还包括存储单元 15, 所述存储单元 15, 用于在所述处理单元 13将所述緩存 ACL 中 有相同用户标识的不包含 10标志位的 ACE合并,得到改进 ACL之后, 将所述改进 ACL 存储至系统的文件中, 所述特定扩展属性为系统内 部根据预设关键字约定设置的。
进一步地, 如图 6所示, 所述服务器还包括统计单元 14, 所述统计单元 14, 用于在所述判断单元 11 判断所述 ACE 中是 否包含有只继承 10标志位之后, 所述预存储单元 12将不包含有 10 标志位的 ACE保存至緩存 ACL 中之前, 统计所述初始 ACL 中包含有 10标志位的 ACE的数量。
进一步地, 所述预存储单元 12, 具体用于若所述统计单元 14 统计所述包含有 10标志位的 ACE的数量大于预设门限值, 则将不包 含有 10标志位的 ACE保存至緩存 ACL 中。
本发明实施例提供一种服务器, 主要包括获取单元、 判断单元、 预存储单元和处理单元。 获取单元读取初始访问控制列表 ACL 中的 访问控制项 ACE, 其中, ACE至少包括用户标识、 以及与用户标识对 应的成员变量, 然后, 判断单元判断 ACE 中是否包含有只继承 10标 志位, 预存储单元将不包含有 10标志位的 ACE保存至緩存 ACL 中, 最后, 处理单元将緩存 ACL 中包含有相同用户标识的不包含 10标志 位的 ACE合并, 得到改进 ACL, 其中, 改进 ACL用于对文件进行 ACL 鉴权。 通过该方案, 由于本发明由服务器在文件系统内部进行改进, 因此改进 ACL的生成不会影响到客户端的既有流程。 而且, 改进 ACL 中的 ACE只包含有影响文件系统的服务器对文件进行 ACL鉴权的标 志位, 从而对文件进行 ACL 鉴权时, 服务器可以直接获取改进 ACL 进行鉴权, 不需要遍历所有初始 ACL 中所有的 ACE, 提升访问控制 列表 ACL鉴权的效率, 降低系统的整体开销。 实施例四
本发明实施例提供一种服务器 2, 如图 7所示, 包括:
处理器 20, 用于读取初始访问控制列表 ACL 中的访问控制项 ACE , 所述 ACE至少包括用户标识、 以及与所述用户标识对应的成员 变量, 以及用于判断所述 ACE 中是否包含有只继承 10标志位, 以及 用于将所述緩存 ACL 中包含有相同用户标识的不包含 10 标志位的 ACE合并, 得到改进 ACL, 所述改进 ACL用于对文件进行 ACL鉴权; 存储器 21, 用于将所述不包含有 10标志位的 ACE保存至緩存 ACL 中。
进一步地, 所述用户标识包括用户标示符或群组标示符; 所述与各个用户标识对应的成员变量至少包括类型 Type、 权限
Permission和标识 Flag;
其中, 所述 Flag 中包括 10标志位、 子文件夹继承 CI标志位和 子文件继承 01标志位中的至少一个。
进一步地, 所述存储器 21, 具体用于若所述计数器 11 统计所 述包含有 10 标志位的 ACE 的数量大于预设门限值, 则将不包含有
10标志位的 ACE保存至緩存 ACL 中。
进一步地, 如图 8所示, 所述服务器还包括计数器,
所述计数器 22, 用于在所述处理器 20判断所述 ACE 中是否包 含有只继承 10标志位之后, 所述存储器 21将不包含有 10标志位的
ACE保存至緩存 ACL 中之前, 统计所述初始 ACL 中包含有 10标志位 的 ACE的数量。
进一步地, 所述存储器 21, 还用于在所述处理器 20 将所述緩 存 ACL 中有相同用户标识的不包含 10标志位的 ACE合并, 得到改进 ACL 之后, 将所述改进 ACL 存储至系统的文件中, 所述特定扩展属 性为系统内部根据预设关键字约定设置的。
本发明实施例提供一种服务器, 主要包括处理器和存储器。 处 理器读取初始访问控制列表 ACL 中的访问控制项 ACE, 其中, ACE至 少包括用户标识、 以及与用户标识对应的成员变量, 然后, 判断 ACE 中是否包含有只继承 10标志位,存储器将不包含有 10标志位的 ACE 保存至緩存 ACL 中, 最后, 处理器将緩存 ACL 中包含有相同用户标 识的不包含 10标志位的 ACE合并, 得到改进 ACL, 其中, 改进 ACL 用于对文件进行 ACL 鉴权。 通过该方案, 由于本发明由服务器在文 件系统内部进行改进, 因此改进 ACL 的生成不会影响到客户端的既 有流程。 而且, 改进 ACL 中的 ACE 只包含有影响文件系统的服务器 对文件进行 ACL鉴权的标志位, 从而对文件进行 ACL鉴权时, 服务 器可以直接获取改进 ACL进行鉴权, 不需要遍历所有初始 ACL 中所 有的 ACE, 提升访问控制列表 ACL 鉴权的效率, 降低系统的整体开 销。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁, 仅以上述各功能模块的划分进行举例说明, 实际应用中, 可以根据 需要而将上述功能分配由不同的功能模块完成, 即将装置的内部结 构划分成不同的功能模块, 以完成以上描述的全部或者部分功能。 上述描述的系统, 装置和单元的具体工作过程, 可以参考前述方法 实施例中的对应过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的装置 和方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施 例仅仅是示意性的, 例如, 所述模块或单元的划分, 仅仅为一种逻 辑功能划分, 实际实现时可以有另外的划分方式, 例如多个单元或 组件可以结合或者可以集成到另一个系统, 或一些特征可以忽略, 或不执行。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围 并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技 术范围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围 之内。 因此, 本发明的保护范围应以所述权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种文件访问权限控制方法, 其特征在于, 包括:
读取初始访问控制列表 ACL 中的访问控制项 ACE , 所述 ACE至少 包括用户标识、 以及与所述用户标识对应的成员变量;
判断所述 ACE 中是否包含有只继承 10标志位;
将不包含有 10标志位的 ACE保存至緩存 ACL中;
将所述緩存 ACL 中包含有相同用户标识的不包含 10 标志位的 ACE合并, 得到改进 ACL, 所述改进 ACL用于对文件进行 ACL鉴权。
2、 根据权利要求 1所述的控制方法, 其特征在于,
所述用户标识包括用户标示符或群组标示符;
所述与所述用户标识对应的成员变量至少包括类型 Type、 权限 Permission和标识 Flag;
其中, 所述 Flag 中包括 10标志位、 子文件夹继承 CI标志位和 子文件继承 01标志位中的至少一个。
3、 根据权利要求 2 所述的控制方法, 其特征在于, 所述方法还 包括:
将所述改进 ACL存储至系统的特定扩展属性中,所述特定扩展属 性为文件系统内部根据预设关键字约定设置的。
4、 根据权利要求 1 至 3 中任意一项所述的文件访问权限控制方 法, 其特征在于, 所述判断所述 ACE 中是否包含有只继承 10标志位 之后, 所述将不包含有 10标志位的 ACE保存至緩存 ACL 中之前, 所 述方法还包括:
统计所述初始 ACL中包含有 10标志位的 ACE的数量。
5、 根据权利要求 4所述的文件访问权限控制方法, 其特征在于, 若所述包含有 10标志位的 ACE的数量大于预设门限值, 则执行 所述将不包含有 10标志位的 ACE保存至緩存 ACL 中。
6、 一种服务器, 其特征在于, 包括:
获取单元,用于读取初始访问控制列表 ACL中的访问控制项 ACE, 所述 ACE至少包括用户标识、 以及与所述用户标识对应的成员变量; 判断单元,用于判断所述获取单元获取到的所述 ACE中是否包含 有只继承 10标志位;
预存储单元, 用于将所述判断单元确定的不包含有 10标志位的 ACE保存至緩存 ACL中;
处理单元,用于将预存储单元存储的所述緩存 ACL 中包含有相同 用户标识的不包含 10标志位的 ACE合并, 得到改进 ACL, 所述改进 ACL用于对文件进行 ACL鉴权。
7、 根据权利要求 6所述的服务器, 其特征在于,
所述用户标识包括用户标示符或群组标示符;
所述与各个用户标识对应的成员变量至少包括类型 Type、 权限 Permission和标识 Flag;
其中, 所述 Flag 中包括 10标志位、 子文件夹继承 CI标志位和 子文件继承 01标志位中的至少一个。
8、 根据权利要求 7 所述的服务器, 其特征在于, 所述服务器还 包括存储单元,
所述存储单元,用于在所述处理单元将所述緩存 ACL中有相同用 户标识的不包含 10标志位的 ACE合并, 得到改进 ACL之后, 将所述 改进 ACL存储至系统的文件中, 所述特定扩展属性为系统内部根据预 设关键字约定设置的。
9、 根据权利要求 6至 8 中任意一项所述的服务器, 其特征在于, 所述服务器还包括统计单元,
所述统计单元,用于在所述判断单元判断所述 ACE 中是否包含有 只继承 10标志位之后, 所述预存储单元将不包含有 10标志位的 ACE 保存至緩存 ACL中之前,统计所述初始 ACL中包含有 10标志位的 ACE 的数量。
10、 根据权利要求 9所述的服务器, 其特征在于,
所述预存储单元, 具体用于若所述统计单元统计所述包含有 10 标志位的 ACE 的数量大于预设门限值, 则执行所述将不包含有 10标 志位的 ACE保存至緩存 ACL中。
11、 一种服务器, 其特点在于, 包括:
处理器, 用于读取初始访问控制列表 ACL 中的访问控制项 ACE, 所述 ACE至少包括用户标识、 以及与所述用户标识对应的成员变量, 以及用于判断所述 ACE 中是否包含有只继承 10标志位, 以及用于将 所述緩存 ACL中包含有相同用户标识的不包含 10标志位的 ACE合并, 得到改进 ACL, 所述改进 ACL用于对文件进行 ACL鉴权;
存储器, 用于将所述不包含有 10标志位的 ACE保存至緩存 ACL 中。
12、 根据权利要求 11所述的服务器, 其特征在于,
所述用户标识包括用户标示符或群组标示符;
所述与各个用户标识对应的成员变量至少包括类型 Type、 权限 Permission和标识 Flag;
其中, 所述 Flag 中包括 10标志位、 子文件夹继承 CI标志位和 子文件继承 01标志位中的至少一个。
13、 根据权利要求 12所述的服务器, 其特征在于,
所述存储器,还用于在所述处理器将所述緩存 ACL 中有相同用户 标识的不包含 10标志位的 ACE合并, 得到改进 ACL之后, 将所述改 进 ACL存储至系统的文件中, 所述特定扩展属性为系统内部根据预设 关键字约定设置的。
14、 根据权利要求 11至 13 中任意一项所述的服务器, 其特征在 于, 所述服务器还包括计数器,
所述计数器,用于在所述处理器判断所述 ACE中是否包含有只继 承 10标志位之后, 所述存储器将不包含有 10标志位的 ACE保存至緩 存 ACL 中之前, 统计所述初始 ACL 中包含有 10标志位的 ACE的数量。
15、 根据权利要求 14所述的服务器, 其特征在于,
所述存储器, 具体用于若所述计数器统计所述包含有 10标志位 的 ACE 的数量大于预设门限值, 则执行所述将不包含有 10标志位的 ACE保存至緩存 ACL中。
PCT/CN2014/070549 2014-01-13 2014-01-13 一种文件访问权限控制方法及装置 WO2015103794A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480000306.5A CN104145468B (zh) 2014-01-13 2014-01-13 一种文件访问权限控制方法及装置
PCT/CN2014/070549 WO2015103794A1 (zh) 2014-01-13 2014-01-13 一种文件访问权限控制方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/070549 WO2015103794A1 (zh) 2014-01-13 2014-01-13 一种文件访问权限控制方法及装置

Publications (1)

Publication Number Publication Date
WO2015103794A1 true WO2015103794A1 (zh) 2015-07-16

Family

ID=51853643

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/070549 WO2015103794A1 (zh) 2014-01-13 2014-01-13 一种文件访问权限控制方法及装置

Country Status (2)

Country Link
CN (1) CN104145468B (zh)
WO (1) WO2015103794A1 (zh)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721175A (zh) * 2016-01-21 2016-06-29 阿里巴巴集团控股有限公司 群组处理方法、群组文件处理方法及装置
CN106302530A (zh) * 2016-09-30 2017-01-04 苏州迈科网络安全技术股份有限公司 基于指令的报文过滤方法及系统
CN107301352A (zh) * 2017-06-22 2017-10-27 郑州云海信息技术有限公司 一种权限设置的方法及装置
CN107403105B (zh) 2017-06-30 2020-09-04 华为技术有限公司 一种文件系统的权限设置方法及装置
CN107480551B (zh) * 2017-07-06 2020-11-20 网易(杭州)网络有限公司 一种文件管理方法及装置
CN110413215B (zh) * 2018-04-28 2023-11-07 伊姆西Ip控股有限责任公司 用于获取访问权限的方法、设备和计算机程序产品
CN108804936A (zh) * 2018-06-06 2018-11-13 郑州云海信息技术有限公司 一种基于分布式存储系统acl的权限管理方法及系统
CN108959955B (zh) * 2018-06-06 2022-06-07 Oppo广东移动通信有限公司 文件处理方法及装置
CN110807003B (zh) * 2018-07-18 2023-03-24 成都华为技术有限公司 修改访问控制列表的引用计数的方法和装置
CN109033429A (zh) * 2018-08-10 2018-12-18 北京小米移动软件有限公司 文件的访问方法、装置及访问接口
CN109446825B (zh) * 2018-10-22 2021-08-31 郑州云海信息技术有限公司 一种访问控制权限的扩展方法及装置
CN110704868B (zh) * 2019-09-06 2021-08-10 苏州浪潮智能科技有限公司 NFSv4的访问控制列表修正方法、装置、设备及介质
CN111680318B (zh) * 2020-04-28 2024-04-16 深圳赛安特技术服务有限公司 Web文件夹权限继承方法、装置及计算机设备
CN113626835B (zh) * 2021-06-25 2022-06-17 荣耀终端有限公司 一种数据访问方法及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040193546A1 (en) * 2003-03-31 2004-09-30 Fujitsu Limited Confidential contents management method
US20070136578A1 (en) * 2005-12-13 2007-06-14 Microsoft Corporation Access control list inheritance thru object(s)
CN101506781A (zh) * 2005-08-11 2009-08-12 微软公司 双层访问控制列表
CN102129539A (zh) * 2011-03-11 2011-07-20 清华大学 基于访问控制列表的数据资源权限管理方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848022A (zh) * 2005-04-13 2006-10-18 华为技术有限公司 一种基于访问控制列表的权限控制方法
US8250628B2 (en) * 2009-08-28 2012-08-21 International Business Machines Corporation Dynamic augmentation, reduction, and/or replacement of security information by evaluating logical expressions
CN103067400B (zh) * 2013-01-10 2015-12-02 华为技术有限公司 一种权限控制方法和服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040193546A1 (en) * 2003-03-31 2004-09-30 Fujitsu Limited Confidential contents management method
CN101506781A (zh) * 2005-08-11 2009-08-12 微软公司 双层访问控制列表
US20070136578A1 (en) * 2005-12-13 2007-06-14 Microsoft Corporation Access control list inheritance thru object(s)
CN102129539A (zh) * 2011-03-11 2011-07-20 清华大学 基于访问控制列表的数据资源权限管理方法

Also Published As

Publication number Publication date
CN104145468B (zh) 2017-02-22
CN104145468A (zh) 2014-11-12

Similar Documents

Publication Publication Date Title
WO2015103794A1 (zh) 一种文件访问权限控制方法及装置
US10469501B2 (en) Multi-protocol access control lists
US8769269B2 (en) Cloud data management
US10509701B2 (en) Performing data backups using snapshots
US10210191B2 (en) Accelerated access to objects in an object store implemented utilizing a file storage system
US20230087628A1 (en) Compromise free cloud data encryption and security
US9525735B2 (en) Lock elevation in a distributed file storage system
US20180074745A1 (en) Managing Volumes with Deduplication using Volume Sketches
US8751547B2 (en) Multiple file system and/or multi-host single instance store techniques
CN109983431B (zh) 用于存储设备中的列表检索的系统和方法
US10372483B2 (en) Mapping tenat groups to identity management classes
US11023582B2 (en) Identification and control of malicious users on a data storage system
WO2021115231A1 (zh) 一种鉴权方法和相关设备
US11086995B2 (en) Malware scanning for network-attached storage systems
CN104268484A (zh) 一种基于虚拟隔离机制的云环境下数据防泄漏方法
CN108804936A (zh) 一种基于分布式存储系统acl的权限管理方法及系统
US20170318093A1 (en) Method and System for Focused Storage Access Notifications from a Network Storage System
US20170315934A1 (en) Method and System for Faster Policy Based File Access for Storage Hosted by a Network Storage System
US9116911B2 (en) Remote file sharing based on content filtering
US10678754B1 (en) Per-tenant deduplication for shared storage
US11086994B2 (en) Priority scanning of files written by malicious users in a data storage system
US10848559B2 (en) Malware scan status determination for network-attached storage systems
US20200349186A1 (en) Method, apparatus and computer program product for managing metadata of storage object
US9122690B1 (en) Systems and methods for implementing non-native file attributes on file systems
US8930462B1 (en) Techniques for enforcing data sharing policies on a collaboration platform

Legal Events

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

Ref document number: 14878337

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: 14878337

Country of ref document: EP

Kind code of ref document: A1