Class JwtAuthentication
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.config.filter.http.jwt_authn.v2alpha.JwtAuthentication
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,JwtAuthenticationOrBuilder,Serializable
public final class JwtAuthentication
extends com.google.protobuf.GeneratedMessageV3
implements JwtAuthenticationOrBuilder
This is the Envoy HTTP filter config for JWT authentication.
For example:
.. code-block:: yaml
providers:
provider1:
issuer: issuer1
audiences:
- audience1
- audience2
remote_jwks:
http_uri:
uri: https://example.com/.well-known/jwks.json
cluster: example_jwks_cluster
provider2:
issuer: issuer2
local_jwks:
inline_string: jwks_string
rules:
# Not jwt verification is required for /health path
- match:
prefix: /health
# Jwt verification for provider1 is required for path prefixed with "prefix"
- match:
prefix: /prefix
requires:
provider_name: provider1
# Jwt verification for either provider1 or provider2 is required for all other requests.
- match:
prefix: /
requires:
requires_any:
requirements:
- provider_name: provider1
- provider_name: provider2
Protobuf type envoy.config.filter.http.jwt_authn.v2alpha.JwtAuthentication- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThis is the Envoy HTTP filter config for JWT authentication.Nested 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 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 TypeMethodDescriptionbooleancontainsProviders(String key) Map of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringbooleanbooleanWhen set to true, bypass the `CORS preflight request <http://www.w3.org/TR/cors/#cross-origin-request-with-preflight>`_ regardless of JWT requirements specified in the rules.static JwtAuthenticationstatic final com.google.protobuf.Descriptors.DescriptorThis message specifies Jwt requirements based on stream_info.filterState.This message specifies Jwt requirements based on stream_info.filterState.com.google.protobuf.Parser<JwtAuthentication>Deprecated.intMap of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringMap of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringgetProvidersOrDefault(String key, JwtProvider defaultValue) Map of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringMap of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringgetRules(int index) Specifies requirements based on the route matches.intSpecifies requirements based on the route matches.Specifies requirements based on the route matches.getRulesOrBuilder(int index) Specifies requirements based on the route matches.List<? extends RequirementRuleOrBuilder>Specifies requirements based on the route matches.intbooleanThis message specifies Jwt requirements based on stream_info.filterState.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleanstatic JwtAuthentication.Builderstatic JwtAuthentication.BuildernewBuilder(JwtAuthentication prototype) protected JwtAuthentication.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static JwtAuthenticationparseDelimitedFrom(InputStream input) static JwtAuthenticationparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtAuthenticationparseFrom(byte[] data) static JwtAuthenticationparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtAuthenticationparseFrom(com.google.protobuf.ByteString data) static JwtAuthenticationparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtAuthenticationparseFrom(com.google.protobuf.CodedInputStream input) static JwtAuthenticationparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtAuthenticationparseFrom(InputStream input) static JwtAuthenticationparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtAuthenticationparseFrom(ByteBuffer data) static JwtAuthenticationparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<JwtAuthentication>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, 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
-
PROVIDERS_FIELD_NUMBER
public static final int PROVIDERS_FIELD_NUMBER- See Also:
-
RULES_FIELD_NUMBER
public static final int RULES_FIELD_NUMBER- See Also:
-
FILTER_STATE_RULES_FIELD_NUMBER
public static final int FILTER_STATE_RULES_FIELD_NUMBER- See Also:
-
BYPASS_CORS_PREFLIGHT_FIELD_NUMBER
public static final int BYPASS_CORS_PREFLIGHT_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getProvidersCount
public int getProvidersCount()Description copied from interface:JwtAuthenticationOrBuilderMap of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringmap<string, .envoy.config.filter.http.jwt_authn.v2alpha.JwtProvider> providers = 1;- Specified by:
getProvidersCountin interfaceJwtAuthenticationOrBuilder
-
containsProviders
Map of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringmap<string, .envoy.config.filter.http.jwt_authn.v2alpha.JwtProvider> providers = 1;- Specified by:
containsProvidersin interfaceJwtAuthenticationOrBuilder
-
getProviders
Deprecated.UsegetProvidersMap()instead.- Specified by:
getProvidersin interfaceJwtAuthenticationOrBuilder
-
getProvidersMap
Map of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringmap<string, .envoy.config.filter.http.jwt_authn.v2alpha.JwtProvider> providers = 1;- Specified by:
getProvidersMapin interfaceJwtAuthenticationOrBuilder
-
getProvidersOrDefault
Map of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringmap<string, .envoy.config.filter.http.jwt_authn.v2alpha.JwtProvider> providers = 1;- Specified by:
getProvidersOrDefaultin interfaceJwtAuthenticationOrBuilder
-
getProvidersOrThrow
Map of provider names to JwtProviders. .. code-block:: yaml providers: provider1: issuer: issuer1 audiences: - audience1 - audience2 remote_jwks: http_uri: uri: https://example.com/.well-known/jwks.json cluster: example_jwks_cluster provider2: issuer: provider2 local_jwks: inline_string: jwks_stringmap<string, .envoy.config.filter.http.jwt_authn.v2alpha.JwtProvider> providers = 1;- Specified by:
getProvidersOrThrowin interfaceJwtAuthenticationOrBuilder
-
getRulesList
Specifies requirements based on the route matches. The first matched requirement will be applied. If there are overlapped match conditions, please put the most specific match first. Examples .. code-block:: yaml rules: - match: prefix: /healthz - match: prefix: /baz requires: provider_name: provider1 - match: prefix: /foo requires: requires_any: requirements: - provider_name: provider1 - provider_name: provider2 - match: prefix: /bar requires: requires_all: requirements: - provider_name: provider1 - provider_name: provider2repeated .envoy.config.filter.http.jwt_authn.v2alpha.RequirementRule rules = 2;- Specified by:
getRulesListin interfaceJwtAuthenticationOrBuilder
-
getRulesOrBuilderList
Specifies requirements based on the route matches. The first matched requirement will be applied. If there are overlapped match conditions, please put the most specific match first. Examples .. code-block:: yaml rules: - match: prefix: /healthz - match: prefix: /baz requires: provider_name: provider1 - match: prefix: /foo requires: requires_any: requirements: - provider_name: provider1 - provider_name: provider2 - match: prefix: /bar requires: requires_all: requirements: - provider_name: provider1 - provider_name: provider2repeated .envoy.config.filter.http.jwt_authn.v2alpha.RequirementRule rules = 2;- Specified by:
getRulesOrBuilderListin interfaceJwtAuthenticationOrBuilder
-
getRulesCount
public int getRulesCount()Specifies requirements based on the route matches. The first matched requirement will be applied. If there are overlapped match conditions, please put the most specific match first. Examples .. code-block:: yaml rules: - match: prefix: /healthz - match: prefix: /baz requires: provider_name: provider1 - match: prefix: /foo requires: requires_any: requirements: - provider_name: provider1 - provider_name: provider2 - match: prefix: /bar requires: requires_all: requirements: - provider_name: provider1 - provider_name: provider2repeated .envoy.config.filter.http.jwt_authn.v2alpha.RequirementRule rules = 2;- Specified by:
getRulesCountin interfaceJwtAuthenticationOrBuilder
-
getRules
Specifies requirements based on the route matches. The first matched requirement will be applied. If there are overlapped match conditions, please put the most specific match first. Examples .. code-block:: yaml rules: - match: prefix: /healthz - match: prefix: /baz requires: provider_name: provider1 - match: prefix: /foo requires: requires_any: requirements: - provider_name: provider1 - provider_name: provider2 - match: prefix: /bar requires: requires_all: requirements: - provider_name: provider1 - provider_name: provider2repeated .envoy.config.filter.http.jwt_authn.v2alpha.RequirementRule rules = 2;- Specified by:
getRulesin interfaceJwtAuthenticationOrBuilder
-
getRulesOrBuilder
Specifies requirements based on the route matches. The first matched requirement will be applied. If there are overlapped match conditions, please put the most specific match first. Examples .. code-block:: yaml rules: - match: prefix: /healthz - match: prefix: /baz requires: provider_name: provider1 - match: prefix: /foo requires: requires_any: requirements: - provider_name: provider1 - provider_name: provider2 - match: prefix: /bar requires: requires_all: requirements: - provider_name: provider1 - provider_name: provider2repeated .envoy.config.filter.http.jwt_authn.v2alpha.RequirementRule rules = 2;- Specified by:
getRulesOrBuilderin interfaceJwtAuthenticationOrBuilder
-
hasFilterStateRules
public boolean hasFilterStateRules()This message specifies Jwt requirements based on stream_info.filterState. Other HTTP filters can use it to specify Jwt requirements dynamically. The *rules* field above is checked first, if it could not find any matches, check this one.
.envoy.config.filter.http.jwt_authn.v2alpha.FilterStateRule filter_state_rules = 3;- Specified by:
hasFilterStateRulesin interfaceJwtAuthenticationOrBuilder- Returns:
- Whether the filterStateRules field is set.
-
getFilterStateRules
This message specifies Jwt requirements based on stream_info.filterState. Other HTTP filters can use it to specify Jwt requirements dynamically. The *rules* field above is checked first, if it could not find any matches, check this one.
.envoy.config.filter.http.jwt_authn.v2alpha.FilterStateRule filter_state_rules = 3;- Specified by:
getFilterStateRulesin interfaceJwtAuthenticationOrBuilder- Returns:
- The filterStateRules.
-
getFilterStateRulesOrBuilder
This message specifies Jwt requirements based on stream_info.filterState. Other HTTP filters can use it to specify Jwt requirements dynamically. The *rules* field above is checked first, if it could not find any matches, check this one.
.envoy.config.filter.http.jwt_authn.v2alpha.FilterStateRule filter_state_rules = 3;- Specified by:
getFilterStateRulesOrBuilderin interfaceJwtAuthenticationOrBuilder
-
getBypassCorsPreflight
public boolean getBypassCorsPreflight()When set to true, bypass the `CORS preflight request <http://www.w3.org/TR/cors/#cross-origin-request-with-preflight>`_ regardless of JWT requirements specified in the rules.
bool bypass_cors_preflight = 4;- Specified by:
getBypassCorsPreflightin interfaceJwtAuthenticationOrBuilder- Returns:
- The bypassCorsPreflight.
-
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 JwtAuthentication parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtAuthentication parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtAuthentication parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtAuthentication parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtAuthentication parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtAuthentication parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static JwtAuthentication parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static JwtAuthentication parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static JwtAuthentication parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static JwtAuthentication 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 JwtAuthentication.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
-