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: 8]
Protobuf type envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThis message specifies a Jwt requirement.static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.google.protobuf.EmptyThe requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid.com.google.protobuf.EmptyOrBuilderThe requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid.com.google.protobuf.EmptyThe requirement is always satisfied even if JWT is missing or the JWT verification fails.com.google.protobuf.EmptyOrBuilderThe requirement is always satisfied even if JWT is missing or the JWT verification fails.static JwtRequirementstatic final com.google.protobuf.Descriptors.DescriptorExtract JWT claims without performing signature validation.Extract JWT claims without performing signature validation.com.google.protobuf.Parser<JwtRequirement>Specify a required provider with audiences.Specify a required provider with audiences.Specify a required provider name.com.google.protobuf.ByteStringSpecify a required provider name.Specify list of JwtRequirement.Specify list of JwtRequirement.Specify list of JwtRequirement.Specify list of JwtRequirement.intbooleanThe requirement is satisfied if JWT is missing, but failed if JWT is presented but invalid.booleanThe requirement is always satisfied even if JWT is missing or the JWT verification fails.booleanExtract JWT claims without performing signature validation.inthashCode()booleanSpecify a required provider with audiences.booleanSpecify a required provider name.booleanSpecify list of JwtRequirement.booleanSpecify list of JwtRequirement.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic JwtRequirement.Builderstatic JwtRequirement.BuildernewBuilder(JwtRequirement prototype) 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()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
PROVIDER_NAME_FIELD_NUMBER
public static final int PROVIDER_NAME_FIELD_NUMBER- See Also:
-
PROVIDER_AND_AUDIENCES_FIELD_NUMBER
public static final int PROVIDER_AND_AUDIENCES_FIELD_NUMBER- See Also:
-
REQUIRES_ANY_FIELD_NUMBER
public static final int REQUIRES_ANY_FIELD_NUMBER- See Also:
-
REQUIRES_ALL_FIELD_NUMBER
public static final int REQUIRES_ALL_FIELD_NUMBER- See Also:
-
ALLOW_MISSING_OR_FAILED_FIELD_NUMBER
public static final int ALLOW_MISSING_OR_FAILED_FIELD_NUMBER- See Also:
-
ALLOW_MISSING_FIELD_NUMBER
public static final int ALLOW_MISSING_FIELD_NUMBER- See Also:
-
EXTRACT_ONLY_WITHOUT_VALIDATION_FIELD_NUMBER
public static final int EXTRACT_ONLY_WITHOUT_VALIDATION_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein 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
- 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
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
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
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
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
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
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
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 JWTs 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 JWTs 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 JWTs 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
-
hasExtractOnlyWithoutValidation
public boolean hasExtractOnlyWithoutValidation()Extract JWT claims without performing signature validation. This mode will decode the JWT, extract claims, and forward them as configured (via claim_to_headers, forward_payload_header, etc.) but will NOT verify the JWT signature against JWKS. .. warning:: This mode does not verify JWT authenticity. Use only in scenarios where: - JWTs come from a trusted source (e.g., internal service mesh) - Signature verification is performed elsewhere in the request path - You are in a testing period and the token issuer doesn't support JWKS yet This mode will: * Decode the JWT header and payload * Extract claims and forward them as headers * Always return success (Status::Ok) regardless of JWT validity * Log when extraction occurs This mode will NOT: * Verify the JWT signature * Validate the (issuer) claim * Validate the (audience) claim * Check not-before time (nbf claim).envoy.extensions.filters.http.jwt_authn.v3.ExtractOnlyWithoutValidation extract_only_without_validation = 7;- Specified by:
hasExtractOnlyWithoutValidationin interfaceJwtRequirementOrBuilder- Returns:
- Whether the extractOnlyWithoutValidation field is set.
-
getExtractOnlyWithoutValidation
Extract JWT claims without performing signature validation. This mode will decode the JWT, extract claims, and forward them as configured (via claim_to_headers, forward_payload_header, etc.) but will NOT verify the JWT signature against JWKS. .. warning:: This mode does not verify JWT authenticity. Use only in scenarios where: - JWTs come from a trusted source (e.g., internal service mesh) - Signature verification is performed elsewhere in the request path - You are in a testing period and the token issuer doesn't support JWKS yet This mode will: * Decode the JWT header and payload * Extract claims and forward them as headers * Always return success (Status::Ok) regardless of JWT validity * Log when extraction occurs This mode will NOT: * Verify the JWT signature * Validate the (issuer) claim * Validate the (audience) claim * Check not-before time (nbf claim).envoy.extensions.filters.http.jwt_authn.v3.ExtractOnlyWithoutValidation extract_only_without_validation = 7;- Specified by:
getExtractOnlyWithoutValidationin interfaceJwtRequirementOrBuilder- Returns:
- The extractOnlyWithoutValidation.
-
getExtractOnlyWithoutValidationOrBuilder
Extract JWT claims without performing signature validation. This mode will decode the JWT, extract claims, and forward them as configured (via claim_to_headers, forward_payload_header, etc.) but will NOT verify the JWT signature against JWKS. .. warning:: This mode does not verify JWT authenticity. Use only in scenarios where: - JWTs come from a trusted source (e.g., internal service mesh) - Signature verification is performed elsewhere in the request path - You are in a testing period and the token issuer doesn't support JWKS yet This mode will: * Decode the JWT header and payload * Extract claims and forward them as headers * Always return success (Status::Ok) regardless of JWT validity * Log when extraction occurs This mode will NOT: * Verify the JWT signature * Validate the (issuer) claim * Validate the (audience) claim * Check not-before time (nbf claim).envoy.extensions.filters.http.jwt_authn.v3.ExtractOnlyWithoutValidation extract_only_without_validation = 7;- Specified by:
getExtractOnlyWithoutValidationOrBuilderin interfaceJwtRequirementOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- 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
- 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
- Throws:
IOException
-
parseFrom
public static JwtRequirement parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
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
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-