Module org.elasticsearch.xcore
Class ConfigurableClusterPrivileges.DatasourcePrivileges
java.lang.Object
org.elasticsearch.xpack.core.security.authz.privilege.ConfigurableClusterPrivileges.DatasourcePrivileges
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment,ClusterPrivilege,ConfigurableClusterPrivilege
- Enclosing class:
ConfigurableClusterPrivileges
public static class ConfigurableClusterPrivileges.DatasourcePrivileges
extends Object
implements ConfigurableClusterPrivilege
Configurable cluster privileges for ES|QL datasource operations under
global.data_source in role definitions.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordNested classes/interfaces inherited from interface org.elasticsearch.xpack.core.security.authz.privilege.ConfigurableClusterPrivilege
ConfigurableClusterPrivilege.CategoryNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TransportVersionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionDatasourcePrivileges(List<ConfigurableClusterPrivileges.DatasourcePrivileges.DatasourcePermissionGroup> groups) -
Method Summary
Modifier and TypeMethodDescriptionbuildPermission(ClusterPermission.Builder builder) UsesClusterPermission.Builderto add predicate that later can be used to build aClusterPermission.booleanThe category under which this privilege should be rendered when output as XContent.inthashCode()parseArray(XContentParser parser) toString()toXContent(XContentBuilder builder, ToXContent.Params params) AConfigurableClusterPrivilegeshould generate a fragment ofXContent, which consists of a single field name, followed by its value (which may be an object, an array, or a simple value).voidtoXContentArrayElements(XContentBuilder builder, ToXContent.Params params) Writes permission group objects forConfigurableClusterPrivileges.toXContent(org.elasticsearch.xcontent.XContentBuilder, org.elasticsearch.xcontent.ToXContent.Params, java.util.Collection<org.elasticsearch.xpack.core.security.authz.privilege.ConfigurableClusterPrivilege>); the caller opens theglobal.data_sourcearray.voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
ESQL_DATASOURCE_PRIVILEGE
-
WRITEABLE_NAME
- See Also:
-
PRIVILEGE_CREATE
- See Also:
-
PRIVILEGE_DELETE
- See Also:
-
PRIVILEGE_READ_METADATA
- See Also:
-
PRIVILEGE_READ
- See Also:
-
PRIVILEGE_MANAGE
- See Also:
-
-
Constructor Details
-
DatasourcePrivileges
public DatasourcePrivileges(List<ConfigurableClusterPrivileges.DatasourcePrivileges.DatasourcePermissionGroup> groups)
-
-
Method Details
-
parseArray
@Nullable public static ConfigurableClusterPrivileges.DatasourcePrivileges parseArray(XContentParser parser) throws IOException - Throws:
IOException
-
toXContentArrayElements
public void toXContentArrayElements(XContentBuilder builder, ToXContent.Params params) throws IOException Writes permission group objects forConfigurableClusterPrivileges.toXContent(org.elasticsearch.xcontent.XContentBuilder, org.elasticsearch.xcontent.ToXContent.Params, java.util.Collection<org.elasticsearch.xpack.core.security.authz.privilege.ConfigurableClusterPrivilege>); the caller opens theglobal.data_sourcearray.- Throws:
IOException
-
getCategory
Description copied from interface:ConfigurableClusterPrivilegeThe category under which this privilege should be rendered when output as XContent.- Specified by:
getCategoryin interfaceConfigurableClusterPrivilege
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
createFrom
public static ConfigurableClusterPrivileges.DatasourcePrivileges createFrom(StreamInput in) throws IOException - Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException Description copied from interface:ConfigurableClusterPrivilegeAConfigurableClusterPrivilegeshould generate a fragment ofXContent, which consists of a single field name, followed by its value (which may be an object, an array, or a simple value).- Specified by:
toXContentin interfaceConfigurableClusterPrivilege- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
buildPermission
Description copied from interface:ClusterPrivilegeUsesClusterPermission.Builderto add predicate that later can be used to build aClusterPermission.- Specified by:
buildPermissionin interfaceClusterPrivilege- Parameters:
builder-ClusterPermission.Builder- Returns:
- an instance of
ClusterPermission.Builder
-
equals
-
hashCode
public int hashCode() -
toString
-