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.
Usage
viewpolicy create --name NAME
--flavor NFS|SMB|MIXED_LAST_WINS|S3_NATIVE
--auth-source RPC|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]]
[--nfs4-case-sensitive|--nfs4-case-insensitive]
[--enable-enforce-tls-cert|--disable-enforce-tls-cert]
[--enable-nfs-enforce-tls-relaxed|--disable-nfs-enforce-tls-relaxed]
[--smb-file-mode SMB_FILE_MODE]
[--smb-directory-mode SMB_DIRECTORY_MODE]
[--permission-per-vip-pool <pool ID 1>=RW|RO,<pool ID 2>=RW|RO,...]
[--nfs-minimal-protection-level NONE|SYSTEM|KRB_AUTH_ONLY|KRB_INTEGRITY|KRB_PRIVACY]
[--s3-visibility USERS]
[--s3-visibility-groups GROUPS]
[--enable-s3-default-policy|--disable-s3-default-policy]
[--s3-special-chars|--s3-special-chars-not-supported]
[--s3-read-write [HOSTS]]
[--s3-read-only [HOSTS]]
[--smb-read-write [HOSTS]]
[--smb-read-only [HOSTS]]
[--enable-apple-sid|--disable-apple-sid]
[--smb-is-ca|--smb-is-not-ca]
[--audit-protocols PROTOCOLS]
[--audit-operations OPERATIONS]
[--audit-options OPTIONS]
[--enable-audit-settings|--disable-audit-settings]
[--enable-access-to-snapshot-dir-in-subdirs|--disable-access-to-snapshot-dir-in-subdirs]
[--enable-visibility-of-snapshot-dir|--disable-visibility-of-snapshot-dir]
[--tenant-id ID]|[--serve-all-tenants]
[--disable-read-leases|--enable-read-leases]
[--disable-write-leases|--enable-write-leases]
[--disable-handle-leases|--enable-handle-leases]
[--enable-inherit-parent-mode-bits|--disable-inherit-parent-mode-bits]
Required Parameters
| Sets a unique name for the view policy. |
| Sets a security flavor for the view policy:
For more information about security flavors, 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:
|
General Options
| Grants read/write or read-only access to clients from certain virtual IP pools. Specify a comma-separated list of virtual IP pool IDs with indication of the access type (
|
| Associates the view policy with a specific tenant. |
| Sets the view policy to serve all tenants (default setting). |
Protocol Auditing Options
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
|
| 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. |
NFS Security Flavor Options
| For multiprotocol views, if the security flavor is NFS, specify default Unix permission bits for files ( Specify SMB_FILE_MODE and SMB_DIRECTORY_MODE in three digit numeric notation, in which each digit represents a component of the permissions: user, group and others (in that order). Each digit is the sum of the following component bits:
ExampleSupposing you want to set the following permissions for file mode:
The user's read bit (4) and a write bit (2) total 6, the group and others each have a read bit only so that is 4 each. Therefore, you set the permission bits to 644: DefaultsSMB file mode permission bits: 644 SMB directory mode permission bits: 755 | ||||||||||||||||
| If specified, permission mode bits for files/objects and directories/buckets created by protocols other than NFS on a view controlled with the NFS security flavor, inherit their permission mode bites from the parent directory. | ||||||||||||||||
| If specified, permission mode bits for files/objects and directories/buckets created by protocols other than NFS on a view controlled with the NFS security flavor, are taken from the view policy definition (instead of inheriting them from the parent directory). |
S3 Options
| 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. Specify Example: |
| Specify this option to use this policy as the default view policy for new buckets created via VAST S3 API, where the user is not associated with an S3 endpoint. |
| Specify this option to stop using this policy as the default view policy for new buckets created via VAST S3 API. |
| Allows S3 object names containing character combinations that are not compatible with other access protocols, such as names containing |
| Prohibits S3 object names containing character combinations that are not compatible with other access protocols. |
S3 Host Access Options
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 fully qualified domain name (FQDN).
Note
The following rules apply when specifying FQDNs:
Maximum total length of an FQDN; 255 characters.
Each domain name label is limited to 63 characters.
Allowed characters: a-z, 0-9, hyphen (-).
A label cannot start with a hyphen.
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.*.*.
A range of IPs where the starting and ending IPs are separated by a hyphen, for example: 192.0.2.3-22
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.
On new installations, if a view policy does not have any host-based access rules defined for a specific access protocol, access is denied for all hosts. On upgraded deployments, all hosts are allowed access if no host-based access rules are defined..
| 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 |
SMB Options
| For use when connecting from Mac clients to SMB shares, this option enables Security IDs (SIDs) to be returned in Apple compatible representation. |
| Disables |
| When specified, the SMB share exposed by the view is set as continuously available, which allows SMB3 clients to request use of persistent file handles and keep their connections to this share in case of a failover event.
By default, continuous availability is disabled. |
| Stops exposing the view path as a continuously available SMB3 share. |
| Disables SMB client read leases so that SMB clients cannot cache data read from the server. |
| Enables SMB client read leases to let SMB clients cache data read from the server. |
| Disables SMB client write leases so that SMB clients cannot cache data written to the server or set byte-range locks on files and directories. |
| Enables SMB client write leases to let SMB clients cache data written to the server and set byte-range locks on files and directories. |
| Disables handle leases so that SMB clients cannot delay closing handles on files or directories.
|
| Enables SMB client handle leases to let SMB clients delay closing of handles files or directories. |
SMB Host Access Options
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.*.*.
A range of IPs where the starting and ending IPs are separated by a hyphen, for example: 192.0.2.3-22
A fully qualified domain name (FQDN).
Note
The following rules apply when specifying FQDNs:
Maximum total length of an FQDN; 255 characters.
Each domain name label is limited to 63 characters.
Allowed characters: a-z, 0-9, hyphen (-).
A label cannot start with a hyphen.
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.
On new installations, if a view policy does not have any host-based access rules defined for a specific access protocol, access is denied for all hosts. On upgraded deployments, all hosts are allowed access if no host-based access rules are defined.
| 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 |
Advanced Multi-Protocol Options
|
If
Attempts by the blocked protocol fail silently. See Controlling File and Directory Permissions Across Protocols for details. Possible values:
|
| Specifies the policy for limiting file path component name length. Possible values:
|
| Specifies the policy for which characters are allowed in file names. Possible values:
|
| Specifies how files receive their owning group when they are created. Possible values:
|
NFS Host Access Options
These options determine which NFS client hosts can access the view with which access types.
The hosts (HOSTS) can be specified including any of the following items separated by commas:
A single IP.
A fully qualified domain name (FQDN).
Note
The following rules apply when specifying FQDNs:
Maximum total length of an FQDN; 255 characters.
Each domain name label is limited to 63 characters.
Allowed characters: a-z, 0-9, hyphen (-).
A label cannot start with a hyphen.
A subnet indicated by CIDR notation. For example: 1.1.1.1/24.
A subset of IPs specified as 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.*.*.
A range of IPs where the starting and ending IPs are separated by a hyphen, for example: 192.0.2.3-22
A netgroup, prefixed with an '@'. For information about using netgroups, see Using Netgroups to Authorize Hosts.
The access types include read/write or read-only access, the squash policy, and trash folder access.
If the configuration specifies that a host has mutually exclusive access types, the conflict is resolved as follows:
An IP overrides a netgroup, a netgroup overrides a netmask, and a netmask overrides a wildcard expression.
If a conflict remains after the previous rule is applied, then:
--nfs-read-onlyoverrides--nfs-read-write.--nfs-all-squashoverrides--nfs-root-squash.--nfs-root-squashoverrides--nfs-no-squash.
On new installations, if a view policy does not have any host-based access rules defined for a specific access protocol, access is denied for all hosts. On upgraded deployments, all hosts are allowed access if no host-based access rules are defined.
| Determines which NFS client hosts have read/write access to the view. By default, all hosts have read/write access. To restrict read/write access to specific hosts, specify To prohibit read/write access for all hosts, specify this option without any values. To create a reversed rule, e.g. a rule that allows read/write access from all IPs except the one specified, prepend the IP address with a tilde, for example: ~192.0.2.0 |
| Determines which NFS client hosts have read-only access to the view. Specify |
| Determines 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. This option is not relevant for NFSv4.1 users if Kerberos is used, since Active Directory does not include the 'root' user principal by default and since the handling of credentials for the user with UID 0 depends on configuration of the rpc.gssd service. Specify |
| Determines 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. This option is not relevant for NFSv4.1 users if Kerberos is used, since Active Directory does not include the 'root' user principal by default and since the handling of credentials for the user with UID 0 depends on configuration of the rpc.gssd service. By default, all hosts have root squash access. To restrict root squash to specific hosts, specify To remove root squash access for all hosts, include this option without values. |
| Determines 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 |
| Determines which hosts have access to the trash folder, if the trash folder is enabled for the cluster. Granting this permission gives hosts the ability to delete files by moving them into the trash folder, from which they are automatically deleted. Requires that the host is listed as No Squash (
Specify |
Advanced NFS Options
| 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 Default: 0, which means no atime updates. |
| 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.
Starting with VAST Cluster 5.2.2, |
| 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.
|
| 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. |
| Disables 32-bit file IDs (default). |
| Set the Kerberos Authentication Minimal protection level to accept from NFSv4.1 client RPCs:
|
| When this option is specified, VAST Cluster honors case in the names of files or directories accessed through NFSv4. This is the default behavior.
|
| When this option is specified, VAST Cluster does not honor case in the names of files or directories accessed through NFSv4.
|
| Enforces TLS encryption between the NFS client and the cluster. When this setting is enabled, the Kerberos Authentication Minimal protection level for NFSv4 must be set to System or None.
|
| Disables enforcing of TLS encryption between the NFS client and the cluster. |
|
Applicable only if |
|
Disables |
Snapshot Options
| 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 |
Multiprotocol Example
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.
SMB Example
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 PROVIDERSNFS Example
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