public final class Policy extends com.google.protobuf.GeneratedMessageV3 implements PolicyOrBuilder
Policy specifies a role and the principals that are assigned/denied the role. A policy matches if and only if at least one of its permissions match the action taking place AND at least one of its principals match the downstream AND the condition is true if specified.Protobuf type
envoy.config.rbac.v2.Policy| Modifier and Type | Class and Description |
|---|---|
static class |
Policy.Builder
Policy specifies a role and the principals that are assigned/denied the role.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
CONDITION_FIELD_NUMBER |
static int |
PERMISSIONS_FIELD_NUMBER |
static int |
PRINCIPALS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Expr |
getCondition()
An optional symbolic expression specifying an access control
:ref:`condition <arch_overview_condition>`.
|
ExprOrBuilder |
getConditionOrBuilder()
An optional symbolic expression specifying an access control
:ref:`condition <arch_overview_condition>`.
|
static Policy |
getDefaultInstance() |
Policy |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Parser<Policy> |
getParserForType() |
Permission |
getPermissions(int index)
Required.
|
int |
getPermissionsCount()
Required.
|
List<Permission> |
getPermissionsList()
Required.
|
PermissionOrBuilder |
getPermissionsOrBuilder(int index)
Required.
|
List<? extends PermissionOrBuilder> |
getPermissionsOrBuilderList()
Required.
|
Principal |
getPrincipals(int index)
Required.
|
int |
getPrincipalsCount()
Required.
|
List<Principal> |
getPrincipalsList()
Required.
|
PrincipalOrBuilder |
getPrincipalsOrBuilder(int index)
Required.
|
List<? extends PrincipalOrBuilder> |
getPrincipalsOrBuilderList()
Required.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasCondition()
An optional symbolic expression specifying an access control
:ref:`condition <arch_overview_condition>`.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Policy.Builder |
newBuilder() |
static Policy.Builder |
newBuilder(Policy prototype) |
Policy.Builder |
newBuilderForType() |
protected Policy.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Policy |
parseDelimitedFrom(InputStream input) |
static Policy |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Policy |
parseFrom(byte[] data) |
static Policy |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Policy |
parseFrom(ByteBuffer data) |
static Policy |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Policy |
parseFrom(com.google.protobuf.ByteString data) |
static Policy |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Policy |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Policy |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Policy |
parseFrom(InputStream input) |
static Policy |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Policy> |
parser() |
Policy.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int PERMISSIONS_FIELD_NUMBER
public static final int PRINCIPALS_FIELD_NUMBER
public static final int CONDITION_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public List<Permission> getPermissionsList()
Required. The set of permissions that define a role. Each permission is matched with OR semantics. To match all actions for this policy, a single Permission with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Permission permissions = 1 [(.validate.rules) = { ... }getPermissionsList in interface PolicyOrBuilderpublic List<? extends PermissionOrBuilder> getPermissionsOrBuilderList()
Required. The set of permissions that define a role. Each permission is matched with OR semantics. To match all actions for this policy, a single Permission with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Permission permissions = 1 [(.validate.rules) = { ... }getPermissionsOrBuilderList in interface PolicyOrBuilderpublic int getPermissionsCount()
Required. The set of permissions that define a role. Each permission is matched with OR semantics. To match all actions for this policy, a single Permission with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Permission permissions = 1 [(.validate.rules) = { ... }getPermissionsCount in interface PolicyOrBuilderpublic Permission getPermissions(int index)
Required. The set of permissions that define a role. Each permission is matched with OR semantics. To match all actions for this policy, a single Permission with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Permission permissions = 1 [(.validate.rules) = { ... }getPermissions in interface PolicyOrBuilderpublic PermissionOrBuilder getPermissionsOrBuilder(int index)
Required. The set of permissions that define a role. Each permission is matched with OR semantics. To match all actions for this policy, a single Permission with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Permission permissions = 1 [(.validate.rules) = { ... }getPermissionsOrBuilder in interface PolicyOrBuilderpublic List<Principal> getPrincipalsList()
Required. The set of principals that are assigned/denied the role based on “action”. Each principal is matched with OR semantics. To match all downstreams for this policy, a single Principal with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Principal principals = 2 [(.validate.rules) = { ... }getPrincipalsList in interface PolicyOrBuilderpublic List<? extends PrincipalOrBuilder> getPrincipalsOrBuilderList()
Required. The set of principals that are assigned/denied the role based on “action”. Each principal is matched with OR semantics. To match all downstreams for this policy, a single Principal with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Principal principals = 2 [(.validate.rules) = { ... }getPrincipalsOrBuilderList in interface PolicyOrBuilderpublic int getPrincipalsCount()
Required. The set of principals that are assigned/denied the role based on “action”. Each principal is matched with OR semantics. To match all downstreams for this policy, a single Principal with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Principal principals = 2 [(.validate.rules) = { ... }getPrincipalsCount in interface PolicyOrBuilderpublic Principal getPrincipals(int index)
Required. The set of principals that are assigned/denied the role based on “action”. Each principal is matched with OR semantics. To match all downstreams for this policy, a single Principal with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Principal principals = 2 [(.validate.rules) = { ... }getPrincipals in interface PolicyOrBuilderpublic PrincipalOrBuilder getPrincipalsOrBuilder(int index)
Required. The set of principals that are assigned/denied the role based on “action”. Each principal is matched with OR semantics. To match all downstreams for this policy, a single Principal with the `any` field set to true should be used.
repeated .envoy.config.rbac.v2.Principal principals = 2 [(.validate.rules) = { ... }getPrincipalsOrBuilder in interface PolicyOrBuilderpublic boolean hasCondition()
An optional symbolic expression specifying an access control :ref:`condition <arch_overview_condition>`. The condition is combined with the permissions and the principals as a clause with AND semantics.
.google.api.expr.v1alpha1.Expr condition = 3;hasCondition in interface PolicyOrBuilderpublic Expr getCondition()
An optional symbolic expression specifying an access control :ref:`condition <arch_overview_condition>`. The condition is combined with the permissions and the principals as a clause with AND semantics.
.google.api.expr.v1alpha1.Expr condition = 3;getCondition in interface PolicyOrBuilderpublic ExprOrBuilder getConditionOrBuilder()
An optional symbolic expression specifying an access control :ref:`condition <arch_overview_condition>`. The condition is combined with the permissions and the principals as a clause with AND semantics.
.google.api.expr.v1alpha1.Expr condition = 3;getConditionOrBuilder in interface PolicyOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Policy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Policy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Policy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Policy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Policy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Policy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Policy parseFrom(InputStream input) throws IOException
IOExceptionpublic static Policy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Policy parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Policy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Policy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Policy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Policy.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Policy.Builder newBuilder()
public static Policy.Builder newBuilder(Policy prototype)
public Policy.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Policy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Policy getDefaultInstance()
public static com.google.protobuf.Parser<Policy> parser()
public com.google.protobuf.Parser<Policy> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Policy getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.