ClickhouseGrant
Usage examples¶
Prerequisites
Apply the resource with:
Verify the newly created ClickhouseGrant
:
The output is similar to the following:
ClickhouseGrant¶
ClickhouseGrant is the Schema for the ClickhouseGrants API
Warning
Due to the way ClickHouse operates, updating this resource first revokes the existing privileges.
Required
apiVersion
(string). Valueaiven.io/v1alpha1
.kind
(string). ValueClickhouseGrant
.metadata
(object). Data that identifies the object, including aname
string and optionalnamespace
.spec
(object). ClickhouseGrantSpec defines the desired state of ClickhouseGrant. See below for nested schema.
spec¶
Appears on ClickhouseGrant
.
ClickhouseGrantSpec defines the desired state of ClickhouseGrant.
Required
project
(string, Immutable, Pattern:^[a-zA-Z0-9_-]+$
, MaxLength: 63). Identifies the project this resource belongs to.serviceName
(string, Immutable, Pattern:^[a-z][-a-z0-9]+$
, MaxLength: 63). Specifies the name of the service that this resource belongs to.
Optional
authSecretRef
(object). Authentication reference to Aiven token in a secret. See below for nested schema.privilegeGrants
(array of objects). Configuration to grant a privilege. Privileges not in the manifest are revoked. Existing privileges are retained; new ones are granted. See below for nested schema.roleGrants
(array of objects). Configuration to grant a role. Role grants not in the manifest are revoked. Existing role grants are retained; new ones are granted. See below for nested schema.
authSecretRef¶
Appears on spec
.
Authentication reference to Aiven token in a secret.
Required
privilegeGrants¶
Appears on spec
.
PrivilegeGrant represents the privileges to be granted to users or roles. See.
Required
database
(string). The database that the grant refers to.grantees
(array of objects, MinItems: 1). List of grantees (users or roles) to grant the privilege to. See below for nested schema.privileges
(array of strings). The privileges to grant, i.e.INSERT
,SELECT
. See.
Optional
columns
(array of strings). The column that the grant refers to.table
(string). The tables that the grant refers to. To grant a privilege on all tables in a database, omit this field instead of writingtable: "*"
.withGrantOption
(boolean). If true, then the grantee (user or role) get the permission to execute theGRANT
query. Users can grant privileges of the same scope they have and less. See.
grantees¶
Appears on spec.privilegeGrants
.
Grantee represents a user or a role to which privileges or roles are granted.
Ambiguity in the GRANT
syntax
Due to an ambiguity in the GRANT syntax in ClickHouse, users and roles should not share the same name. It is unclear whether a grant applies to the user or the role.
Optional
roleGrants¶
Appears on spec
.
RoleGrant represents the roles to be assigned to users or roles. See.
Required
grantees
(array of objects, MinItems: 1). List of grantees (users or roles) to grant the privilege to. See below for nested schema.roles
(array of strings, MinItems: 1). List of roles to grant to the grantees.
Optional
withAdminOption
(boolean). If true, the grant is executed withADMIN OPTION
privilege. See.
grantees¶
Appears on spec.roleGrants
.
Grantee represents a user or a role to which privileges or roles are granted.
Ambiguity in the GRANT
syntax
Due to an ambiguity in the GRANT syntax in ClickHouse, users and roles should not share the same name. It is unclear whether a grant applies to the user or the role.
Optional