Class JwtRequirement
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- io.envoyproxy.envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,JwtRequirementOrBuilder,Serializable
public final class JwtRequirement extends com.google.protobuf.GeneratedMessageV3 implements JwtRequirementOrBuilder
This message specifies a Jwt requirement. An empty message means JWT verification is not required. Here are some config examples: .. code-block:: yaml # Example 1: not required with an empty message # Example 2: require A provider_name: provider-A # Example 3: require A or B requires_any: requirements: - provider_name: provider-A - provider_name: provider-B # Example 4: require A and B requires_all: requirements: - provider_name: provider-A - provider_name: provider-B # Example 5: require A and (B or C) requires_all: requirements: - provider_name: provider-A - requires_any: requirements: - provider_name: provider-B - provider_name: provider-C # Example 6: require A or (B and C) requires_any: requirements: - provider_name: provider-A - requires_all: requirements: - provider_name: provider-B - provider_name: provider-C # Example 7: A is optional (if token from A is provided, it must be valid, but also allows missing token.) requires_any: requirements: - provider_name: provider-A - allow_missing: {} # Example 8: A is optional and B is required. requires_all: requirements: - requires_any: requirements: - provider_name: provider-A - allow_missing: {} - provider_name: provider-B [#next-free-field: 7]Protobuf typeenvoy.extensions.filters.http.jwt_authn.v3.JwtRequirement- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJwtRequirement.BuilderThis message specifies a Jwt requirement.static classJwtRequirement.RequiresTypeCase-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
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
-
-
Field Summary
Fields Modifier and Type Field Description static intALLOW_MISSING_FIELD_NUMBERstatic intALLOW_MISSING_OR_FAILED_FIELD_NUMBERstatic intPROVIDER_AND_AUDIENCES_FIELD_NUMBERstatic intPROVIDER_NAME_FIELD_NUMBERstatic intREQUIRES_ALL_FIELD_NUMBERstatic intREQUIRES_ANY_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)com.google.protobuf.EmptygetAllowMissing()The requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid.com.google.protobuf.EmptyOrBuildergetAllowMissingOrBuilder()The requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid.com.google.protobuf.EmptygetAllowMissingOrFailed()The requirement is always satisfied even if JWT is missing or the JWT verification fails.com.google.protobuf.EmptyOrBuildergetAllowMissingOrFailedOrBuilder()The requirement is always satisfied even if JWT is missing or the JWT verification fails.static JwtRequirementgetDefaultInstance()JwtRequirementgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Parser<JwtRequirement>getParserForType()ProviderWithAudiencesgetProviderAndAudiences()Specify a required provider with audiences.ProviderWithAudiencesOrBuildergetProviderAndAudiencesOrBuilder()Specify a required provider with audiences.StringgetProviderName()Specify a required provider name.com.google.protobuf.ByteStringgetProviderNameBytes()Specify a required provider name.JwtRequirementAndListgetRequiresAll()Specify list of JwtRequirement.JwtRequirementAndListOrBuildergetRequiresAllOrBuilder()Specify list of JwtRequirement.JwtRequirementOrListgetRequiresAny()Specify list of JwtRequirement.JwtRequirementOrListOrBuildergetRequiresAnyOrBuilder()Specify list of JwtRequirement.JwtRequirement.RequiresTypeCasegetRequiresTypeCase()intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()booleanhasAllowMissing()The requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid.booleanhasAllowMissingOrFailed()The requirement is always satisfied even if JWT is missing or the JWT verification fails.inthashCode()booleanhasProviderAndAudiences()Specify a required provider with audiences.booleanhasProviderName()Specify a required provider name.booleanhasRequiresAll()Specify list of JwtRequirement.booleanhasRequiresAny()Specify list of JwtRequirement.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static JwtRequirement.BuildernewBuilder()static JwtRequirement.BuildernewBuilder(JwtRequirement prototype)JwtRequirement.BuildernewBuilderForType()protected JwtRequirement.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static JwtRequirementparseDelimitedFrom(InputStream input)static JwtRequirementparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static JwtRequirementparseFrom(byte[] data)static JwtRequirementparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static JwtRequirementparseFrom(com.google.protobuf.ByteString data)static JwtRequirementparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static JwtRequirementparseFrom(com.google.protobuf.CodedInputStream input)static JwtRequirementparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static JwtRequirementparseFrom(InputStream input)static JwtRequirementparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static JwtRequirementparseFrom(ByteBuffer data)static JwtRequirementparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<JwtRequirement>parser()JwtRequirement.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, 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
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
PROVIDER_NAME_FIELD_NUMBER
public static final int PROVIDER_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PROVIDER_AND_AUDIENCES_FIELD_NUMBER
public static final int PROVIDER_AND_AUDIENCES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REQUIRES_ANY_FIELD_NUMBER
public static final int REQUIRES_ANY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REQUIRES_ALL_FIELD_NUMBER
public static final int REQUIRES_ALL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALLOW_MISSING_OR_FAILED_FIELD_NUMBER
public static final int ALLOW_MISSING_OR_FAILED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALLOW_MISSING_FIELD_NUMBER
public static final int ALLOW_MISSING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getRequiresTypeCase
public JwtRequirement.RequiresTypeCase getRequiresTypeCase()
- Specified by:
getRequiresTypeCasein interfaceJwtRequirementOrBuilder
-
hasProviderName
public boolean hasProviderName()
Specify a required provider name.
string provider_name = 1;- Specified by:
hasProviderNamein interfaceJwtRequirementOrBuilder- Returns:
- Whether the providerName field is set.
-
getProviderName
public String getProviderName()
Specify a required provider name.
string provider_name = 1;- Specified by:
getProviderNamein interfaceJwtRequirementOrBuilder- Returns:
- The providerName.
-
getProviderNameBytes
public com.google.protobuf.ByteString getProviderNameBytes()
Specify a required provider name.
string provider_name = 1;- Specified by:
getProviderNameBytesin interfaceJwtRequirementOrBuilder- Returns:
- The bytes for providerName.
-
hasProviderAndAudiences
public boolean hasProviderAndAudiences()
Specify a required provider with audiences.
.envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences provider_and_audiences = 2;- Specified by:
hasProviderAndAudiencesin interfaceJwtRequirementOrBuilder- Returns:
- Whether the providerAndAudiences field is set.
-
getProviderAndAudiences
public ProviderWithAudiences getProviderAndAudiences()
Specify a required provider with audiences.
.envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences provider_and_audiences = 2;- Specified by:
getProviderAndAudiencesin interfaceJwtRequirementOrBuilder- Returns:
- The providerAndAudiences.
-
getProviderAndAudiencesOrBuilder
public ProviderWithAudiencesOrBuilder getProviderAndAudiencesOrBuilder()
Specify a required provider with audiences.
.envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences provider_and_audiences = 2;- Specified by:
getProviderAndAudiencesOrBuilderin interfaceJwtRequirementOrBuilder
-
hasRequiresAny
public boolean hasRequiresAny()
Specify list of JwtRequirement. Their results are OR-ed. If any one of them passes, the result is passed.
.envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList requires_any = 3;- Specified by:
hasRequiresAnyin interfaceJwtRequirementOrBuilder- Returns:
- Whether the requiresAny field is set.
-
getRequiresAny
public JwtRequirementOrList getRequiresAny()
Specify list of JwtRequirement. Their results are OR-ed. If any one of them passes, the result is passed.
.envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList requires_any = 3;- Specified by:
getRequiresAnyin interfaceJwtRequirementOrBuilder- Returns:
- The requiresAny.
-
getRequiresAnyOrBuilder
public JwtRequirementOrListOrBuilder getRequiresAnyOrBuilder()
Specify list of JwtRequirement. Their results are OR-ed. If any one of them passes, the result is passed.
.envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList requires_any = 3;- Specified by:
getRequiresAnyOrBuilderin interfaceJwtRequirementOrBuilder
-
hasRequiresAll
public boolean hasRequiresAll()
Specify list of JwtRequirement. Their results are AND-ed. All of them must pass, if one of them fails or missing, it fails.
.envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList requires_all = 4;- Specified by:
hasRequiresAllin interfaceJwtRequirementOrBuilder- Returns:
- Whether the requiresAll field is set.
-
getRequiresAll
public JwtRequirementAndList getRequiresAll()
Specify list of JwtRequirement. Their results are AND-ed. All of them must pass, if one of them fails or missing, it fails.
.envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList requires_all = 4;- Specified by:
getRequiresAllin interfaceJwtRequirementOrBuilder- Returns:
- The requiresAll.
-
getRequiresAllOrBuilder
public JwtRequirementAndListOrBuilder getRequiresAllOrBuilder()
Specify list of JwtRequirement. Their results are AND-ed. All of them must pass, if one of them fails or missing, it fails.
.envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList requires_all = 4;- Specified by:
getRequiresAllOrBuilderin interfaceJwtRequirementOrBuilder
-
hasAllowMissingOrFailed
public boolean hasAllowMissingOrFailed()
The requirement is always satisfied even if JWT is missing or the JWT verification fails. A typical usage is: this filter is used to only verify JWTs and pass the verified JWT payloads to another filter, the other filter will make decision. In this mode, all JWT tokens will be verified.
.google.protobuf.Empty allow_missing_or_failed = 5;- Specified by:
hasAllowMissingOrFailedin interfaceJwtRequirementOrBuilder- Returns:
- Whether the allowMissingOrFailed field is set.
-
getAllowMissingOrFailed
public com.google.protobuf.Empty getAllowMissingOrFailed()
The requirement is always satisfied even if JWT is missing or the JWT verification fails. A typical usage is: this filter is used to only verify JWTs and pass the verified JWT payloads to another filter, the other filter will make decision. In this mode, all JWT tokens will be verified.
.google.protobuf.Empty allow_missing_or_failed = 5;- Specified by:
getAllowMissingOrFailedin interfaceJwtRequirementOrBuilder- Returns:
- The allowMissingOrFailed.
-
getAllowMissingOrFailedOrBuilder
public com.google.protobuf.EmptyOrBuilder getAllowMissingOrFailedOrBuilder()
The requirement is always satisfied even if JWT is missing or the JWT verification fails. A typical usage is: this filter is used to only verify JWTs and pass the verified JWT payloads to another filter, the other filter will make decision. In this mode, all JWT tokens will be verified.
.google.protobuf.Empty allow_missing_or_failed = 5;- Specified by:
getAllowMissingOrFailedOrBuilderin interfaceJwtRequirementOrBuilder
-
hasAllowMissing
public boolean hasAllowMissing()
The requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid. Similar to allow_missing_or_failed, this is used to only verify JWTs and pass the verified payload to another filter. The different is this mode will reject requests with invalid tokens.
.google.protobuf.Empty allow_missing = 6;- Specified by:
hasAllowMissingin interfaceJwtRequirementOrBuilder- Returns:
- Whether the allowMissing field is set.
-
getAllowMissing
public com.google.protobuf.Empty getAllowMissing()
The requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid. Similar to allow_missing_or_failed, this is used to only verify JWTs and pass the verified payload to another filter. The different is this mode will reject requests with invalid tokens.
.google.protobuf.Empty allow_missing = 6;- Specified by:
getAllowMissingin interfaceJwtRequirementOrBuilder- Returns:
- The allowMissing.
-
getAllowMissingOrBuilder
public com.google.protobuf.EmptyOrBuilder getAllowMissingOrBuilder()
The requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid. Similar to allow_missing_or_failed, this is used to only verify JWTs and pass the verified payload to another filter. The different is this mode will reject requests with invalid tokens.
.google.protobuf.Empty allow_missing = 6;- Specified by:
getAllowMissingOrBuilderin interfaceJwtRequirementOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static JwtRequirement parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtRequirement parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtRequirement parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtRequirement parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtRequirement parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtRequirement parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtRequirement parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static JwtRequirement parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static JwtRequirement parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static JwtRequirement parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static JwtRequirement parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static JwtRequirement parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public JwtRequirement.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static JwtRequirement.Builder newBuilder()
-
newBuilder
public static JwtRequirement.Builder newBuilder(JwtRequirement prototype)
-
toBuilder
public JwtRequirement.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected JwtRequirement.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static JwtRequirement getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<JwtRequirement> parser()
-
getParserForType
public com.google.protobuf.Parser<JwtRequirement> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public JwtRequirement getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-