This command creates a view policy. Every view has a policy. The view policy specifies part of the view's configuration. One view policy can be applied to any number of views.
viewpolicy create --name NAME --flavor NFS|SMB|MIXED_LAST_WINS|S3_NATIVE --auth-source PROVIDERS|RPC_AND_PROVIDERS [--access-flavor NFS4|SMB|ALL] [--path-length LCD|NPL] [--allowed-characters LCD|NPL] [--gid-inheritance linux|bsd] [--atime-frequency ATIME_FREQUENCY] [--nfs-read-write [HOSTS]] [--nfs-read-only [HOSTS]] [--nfs-no-squash [HOSTS]] [--nfs-root-squash [HOSTS]] [--nfs-all-squash [HOSTS]] [--enable-nfs-return-open-permissions|--disable-nfs-return-open-permissions] [--enable-nfs-posix-acl|--disable-nfs-posix-acl] [--enable-32bit-fileid|--disable-32bit-fileid] [--enable-expose-id-in-fsid|--disable-expose-id-in-fsid] [--nfs-trash-access [HOSTS]] [--smb-file-mode SMB_FILE_MODE] [--smb-directory-mode SMB_DIRECTORY_MODE] [--vip-pool-ids POOL_IDs] [--nfs-minimal-protection-level NONE|SYSTEM|KRB_AUTH_ONLY|KRB_INTEGRITY|KRB_PRIVACY] [--s3-visibility USERS] [--s3-visibility-groups GROUPS] [--s3-read-write [HOSTS]] [--s3-read-only [HOSTS]] [--smb-read-write [HOSTS]] [--smb-read-only [HOSTS]] [--enable-apple-sid|--disable-apple-sid] [--audit-protocols PROTOCOLS] [--audit-operations OPERATIONS] [--audit-options OPTIONS] [--enable-audit-settings|--disable-audit-settings] [--enable-snapshot-lookup|--disable-snapshot-lookup] [--enable-listing-of-snapshot-dir|--disable-listing-of-snapshot-dir] [--tenant-id ID]|[--serve-all-tenants]
|
Sets a unique name for the view policy. |
|
Sets a security flavor for the view policy:
To learn more about security modes, see: Controlling File and Directory Permissions Across Protocols. |
|
Specifies which source is trusted for the user's group memberships, when users' access to the view is authorized. Possible values:
|
|
Dedicates VIP pools to the view policy. Specify POOL_IDs as a comma separated list of VIP pool IDs. |
|
Associates the view policy with a specific tenant. |
|
Sets the view policy to serve all tenants (default setting). |
Note
Any audit settings that are enabled globally for the cluster are enabled for all views. Auditing settings in a view policy can only add more protocols, operations and/or options to the audit performed on views that use this view policy.
|
Lists access protocols for which you are enabling or disabling protocol auditing on views that use this view policy. Use this parameter together with When specifying Specify
|
|
Lists categories of protocol operations for which you are enabling or disabling protocol auditing on views that use this view policy. Use this parameter together with Specify
TipFor a complete list of operations, see Configuring Global Auditing Settings. |
|
Lists audit options to enable or disable on views that use this view policy. Use this parameter together with Specify
|
|
Enables audit settings specified in the same command line by the Any auditing protocols, operations options that are already enabled in the policy remain enabled. Any audit settings (protocols, operations or options) that are already enabled in the view policy remain enabled. |
|
Disables audit settings specified in the same command line by the Any audit settings (protocols, operations or options) that are already enabled in the view policy and that are not specified in the same command line remain enabled. |
|
Specify users to enables those users to list buckets that are created using this policy even if they do not have permission to access those buckets. When an S3 user sends a bucket listing request, the command returns a list of all buckets the user owns and all buckets that they have this listing permission for, even if they do not have permission to access those buckets. Specify Example: |
|
Specify groups to enable members of those groups to list buckets that are created using this policy even if they do not have permission to access those buckets. |
These options set which S3 client hosts can access the view with which access types.
For each option, HOSTS
can be specified as a comma separated series of any of the following:
-
A single IP.
-
A subnet indicated by CIDR notation. For example: 1.1.1.1/24.
-
A range of IPs indicated by an IP address with '*' as a wildcard in place of any of the 8-bit fields in the address. For example, 3.3.3.*, or 3.3.*.*.
The access types comprise read/write and read-only access.
If a host is specified with multiple entries in mutually exclusive access types, the conflict is resolved as follows:
-
An IP overrides a CIDR, and a CIDR overrides a wildcard expression.
-
If a conflict remains after the previous rule is applied, the read-only setting overrides the read/write setting.
By default, all hosts have read/write access.
|
Controls which S3 client hosts have read/write access to the view. By default, all hosts have read/write access. To remove all hosts from read/write access, include this option without any values. To restrict read/write access to specific hosts, specify For example: |
|
Specifies which S3 client hosts have read-only access to the view. Specify |
|
For use when connecting from Mac clients to SMB shares, this option enables Security IDs (SIDs) to be returned in Apple compatible representation. |
|
Disables |
These options set which SMB client hosts can access the view with which access types.
For each option, HOSTS
can be specified as a comma separated series of any of the following:
-
A single IP.
-
A subnet indicated by CIDR notation. For example: 1.1.1.1/24.
-
A range of IPs indicated by an IP address with '*' as a wildcard in place of any of the 8-bit fields in the address. For example, 3.3.3.*, or 3.3.*.*.
The access types comprise read/write and read-only access.
If a host is specified with multiple entries in mutually exclusive access types, the conflict is resolved as follows:
-
An IP overrides a CIDR, and a CIDR overrides a wildcard expression.
-
If a conflict remains after the previous rule is applied, the read-only setting overrides the read/write setting.
By default, all hosts have read/write access.
|
Controls which SMB client hosts have read/write access to the view. By default, all hosts have read/write access. To remove all hosts from read/write access, include this option without any values. To restrict read/write access to specific hosts, specify For example: |
|
Specifies which SMB client hosts have read-only access to the view. Specify |
|
CautionChanging this setting when already in effect on a view that is being used by clients could lead to unexpected behavior and is not advised. If NoteNFSv3 is unaffected by this setting. NFSv3 users can set permission mode bits in Mixed Last Wins security flavor regardless of this setting. Attempts by the blocked protocol are either silently ignored or fail with permission errors, depending on the specific operation. See Controlling File and Directory Permissions Across Protocols for details.
|
|
Specifies the policy for limiting file path component name length. Possible values:
|
|
Specifies the policy for which characters are allowed in file names. |
|
Specifies how files receive their owning group when they are created. Possible values:
|
These options set which NFS client hosts can access the view with which access types. In each access type option, HOSTS
can be specified as a comma separated series of any of the following:
-
A single IP.
-
A netgroup key, which starts with '@'. This is supported for NIS netgroups if NIS is configured. For information about how to use netgroups, see Using NIS Netgroups to Authorize Host Access to NFS Exports.
Note
Netgroups are supported for NFSv3 only and not supported for multiprotocol views.
-
A subnet indicated by CIDR notation. For example: 1.1.1.1/24.
-
A range of IPs indicated by an IP address with '*' as a wildcard in place of any of the 8-bit fields in the address. For example, 3.3.3.*, or 3.3.*.*.
The access types comprise these categories:
-
Controlling read and write operations:
-
Read / Write. Read/write access.
-
Read Only. Read-only access.
-
-
Controlling squash policy:
-
No Squash. All operations are supported. Use this option if you trust the root user not to perform operations that will corrupt data.
-
Root Squash. The root user is mapped to nobody for all file and folder management operations on the export. This enables you to prevent the strongest super user from corrupting all user data on the VAST Cluster.
-
All Squash. All client users are mapped to nobody for all file and folder management operations on the export.
-
-
Controlling access to the trash folder:
-
Trash Access. This option does not appear here by default. It appears only if Enable trash folder access is enabled on the Settings page. Granting this permission gives hosts the ability to delete files by moving them into a trash folder, from which they are automatically deleted. Requires also No Squash. For more information, see Trash Folder (for Rapid Parallel File Deletion).
-
You can add hosts to any and all of the types, but within each category no more than one type will be applied to any given host. If a host is specified with multiple entries in mutually exclusive types, the conflict is resolved as follows:
-
An IP overrides a netgroup, a netgroup overrides a CIDR, and a CIDR overrides a wildcard expression.
-
If a conflict remains after the previous rule is applied, then:
-
Read Only overrides Read / Write.
-
All Squash overrides Root Squash.
-
Root Squash overrides No Squash.
-
By default, all hosts have read/write and root squash access.
|
Controls which NFS client hosts have read/write access to the view. By default, all hosts have read/write access. To remove all hosts from read/write access, include this option without any values. To restrict read/write access to specific hosts, specify For example: |
|
Specifies which NFS client hosts have read-only access to the view. Specify HOSTS according to the format description above this table. |
|
Specifies which hosts have no squash access. With no squash, all operations are supported. Use this option if you trust the root user not to perform operations that will corrupt data. Specify HOSTS according to the format description above this table. |
|
Controls which hosts have root squash access. With root squash, the root user is mapped to nobody for all file and folder management operations on the export. This enables you to prevent the strongest super user from corrupting all user data on the VAST Cluster. By default, all hosts have root squash access. To remove all hosts from root squash access, include this option without values. To restrict root squash to specific hosts, specify |
|
Specifies which hosts have all squash access. With all squash, all client users are mapped to nobody for all file and folder management operations on the export. Specify HOSTS according to the format description above this table. |
|
Specifies which hosts have access to the trash folder, if the trash folder is enabled. Specify HOSTS according to the format description above this table. |
|
atime is a metadata attribute of NFS files that represents the last time the file was updated. atime is updated on read operations if the difference between the current time and the file's atime value is greater than the configured atime frequency. Consider that a very low value might have a performance impact if high numbers of files are being read. Specify ATIME_FREQUENCY as an integer followed by a unit of time (s = seconds, m= minutes, h=hours, d=days). Example: 1h |
|
Sets the NFS server to unilaterally return open (777) permission for all files and directories when responding to client side access checks. This setting works around a permissions issue that occurs with Windows clients. Windows clients perform NFSv3 access checks before executing read/write requests. This client side check uses the UID and the primary GID of the user without taking into account secondary GIDs. If the check fails, requests are not executed. This means that some permissions may not be honored as they should be, such as those based on secondary groups. When return open permissions is enabled, VAST Cluster returns open permissions for client side access checks, so that the Windows client allows access rights and executes read/write requests. VAST Cluster does a proper permission check when the request is executed. CautionUse this feature with caution if Windows client systems are shared by more than one user, since the following security breach could occur: While a user is accessing a file with correct permissions and the file is cached in memory on the Windows system, if another user tries to access the same file, access is incorrectly allowed. No proper access check is done for the second user. |
|
Disables the NFS return open permissions setting. See |
|
Enables full support of extended POSIX Access Control Lists (ACL). By default, VAST Cluster supports the traditional POSIX file system object permission mode bits, (minimal ACL mode) in which each file has three ACL entries defining the permissions for the owner, owning group, and others, respectively. To learn more about POSIX ACL, see https://linux.die.net/man/5/acl. NoteThe Note
|
|
Disables support for extended POSIX ACLs, restoring default minimal ACL mode. |
Sets the VAST Cluster's NFS server to use 32-bit file IDs. This setting supports legacy 32-bit applications running over NFSv3. |
|
|
Set the Minimal Protection Level to accept from NFSv4.1 client RPCs:
|
|
Enables accessible .snapshot directories under all directories in the view. In subdirectories of protected paths, these .snapshot directories will provide links to any existing snapshots of parent directories even if there is no protected path on the subdirectory itself. This provides easier access from each directory to snapshots of parent directories. This setting is enabled by default. |
|
Disables |
|
If |
|
Disables |
In this example, we create a policy called multipro1 to attach to multiprotocol views.
In this policy, we choose to set security flavor to NFS. That enables NFS clients to set permissions on files and directories, while SMB clients will not be able to set permissions.
We will set a non-default set of permission mode bits for files and directories to inherit whenever created by SMB clients.
vcli: admin> viewpolicy create --name multipro1 --flavor nfs --auth-source PROVIDERS --nfs-read-write 10.0.0.* --nfs-read-only 10.0.0.1 --nfs-all-squash 10.0.0.3 --nfs-trash-access 10.0.0.1,10.0.0.4 --smb-file-mode 664 --smb-directory-mode 775
Client 10.0.0.1 has read-only access, will be root squashed and can use the trash folder.
Client 10.0.0.2 has read/write access, will be root squashed and can not use the trash folder.
Client 10.0.0.3 has read/write access, will be all squashed and cannot use the trash folder.
Client 10.0.0.4 has read/write access, will not be squashed and can use the trash folder.
Client 10.0.0.5 has read/write access, will not be squashed and cannot use the trash folder.
This example simply names a policy for SMB usage and enables auth provider, as required for SMB. No other view policy parameters are relevant for a policy used for views that are only exposed as SMB shares.
vcli: admin> viewpolicy create --name smbpolicy --auth-source PROVIDERS
In this example, a view policy intended for NFS-only views is named nfspolicy1 and gives read/write and trash folder access to one specific host while enabling read-only access for all hosts. The host given trash folder access is also not squashed, which is a necessary configuration for trash folder access to work. Remaining hosts are root squashed by default.
vcli: admin> viewpolicy create --name nfspolicy1 --auth-source RPC_AND_PROVIDERS --read-write 192.0.2.0 --nfs-read-only * --nfs-no-squash 192.0.2.0 --nfs-trash-access 192.0.2.0
Comments
0 comments
Article is closed for comments.