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.v3.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 |
CHECKED_CONDITION_FIELD_NUMBER |
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) |
CheckedExpr |
getCheckedCondition()
[#not-implemented-hide:]
An optional symbolic expression that has been successfully type checked.
|
CheckedExprOrBuilder |
getCheckedConditionOrBuilder()
[#not-implemented-hide:]
An optional symbolic expression that has been successfully type checked.
|
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 |
hasCheckedCondition()
[#not-implemented-hide:]
An optional symbolic expression that has been successfully type checked.
|
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, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int PERMISSIONS_FIELD_NUMBER
public static final int PRINCIPALS_FIELD_NUMBER
public static final int CONDITION_FIELD_NUMBER
public static final int CHECKED_CONDITION_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class com.google.protobuf.GeneratedMessageV3
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessageV3
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3
public 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.v3.Permission permissions = 1 [(.validate.rules) = { ... }
getPermissionsList
in interface PolicyOrBuilder
public 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.v3.Permission permissions = 1 [(.validate.rules) = { ... }
getPermissionsOrBuilderList
in interface PolicyOrBuilder
public 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.v3.Permission permissions = 1 [(.validate.rules) = { ... }
getPermissionsCount
in interface PolicyOrBuilder
public 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.v3.Permission permissions = 1 [(.validate.rules) = { ... }
getPermissions
in interface PolicyOrBuilder
public 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.v3.Permission permissions = 1 [(.validate.rules) = { ... }
getPermissionsOrBuilder
in interface PolicyOrBuilder
public 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.v3.Principal principals = 2 [(.validate.rules) = { ... }
getPrincipalsList
in interface PolicyOrBuilder
public 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.v3.Principal principals = 2 [(.validate.rules) = { ... }
getPrincipalsOrBuilderList
in interface PolicyOrBuilder
public 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.v3.Principal principals = 2 [(.validate.rules) = { ... }
getPrincipalsCount
in interface PolicyOrBuilder
public 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.v3.Principal principals = 2 [(.validate.rules) = { ... }
getPrincipals
in interface PolicyOrBuilder
public 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.v3.Principal principals = 2 [(.validate.rules) = { ... }
getPrincipalsOrBuilder
in interface PolicyOrBuilder
public 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. Only be used when checked_condition is not used.
.google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
hasCondition
in interface PolicyOrBuilder
public 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. Only be used when checked_condition is not used.
.google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
getCondition
in interface PolicyOrBuilder
public 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. Only be used when checked_condition is not used.
.google.api.expr.v1alpha1.Expr condition = 3 [(.udpa.annotations.field_migrate) = { ... }
getConditionOrBuilder
in interface PolicyOrBuilder
public boolean hasCheckedCondition()
[#not-implemented-hide:] An optional symbolic expression that has been successfully type checked. Only be used when condition is not used.
.google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
hasCheckedCondition
in interface PolicyOrBuilder
public CheckedExpr getCheckedCondition()
[#not-implemented-hide:] An optional symbolic expression that has been successfully type checked. Only be used when condition is not used.
.google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
getCheckedCondition
in interface PolicyOrBuilder
public CheckedExprOrBuilder getCheckedConditionOrBuilder()
[#not-implemented-hide:] An optional symbolic expression that has been successfully type checked. Only be used when condition is not used.
.google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 [(.udpa.annotations.field_migrate) = { ... }
getCheckedConditionOrBuilder
in interface PolicyOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static Policy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Policy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Policy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Policy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Policy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Policy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Policy parseFrom(InputStream input) throws IOException
IOException
public static Policy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Policy parseDelimitedFrom(InputStream input) throws IOException
IOException
public static Policy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Policy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOException
public static Policy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public Policy.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static Policy.Builder newBuilder()
public static Policy.Builder newBuilder(Policy prototype)
public Policy.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected Policy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.GeneratedMessageV3
public static Policy getDefaultInstance()
public static com.google.protobuf.Parser<Policy> parser()
public com.google.protobuf.Parser<Policy> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessageV3
public Policy getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2018–2021 The Envoy Project. All rights reserved.