public final class JwtProvider extends com.google.protobuf.GeneratedMessageV3 implements JwtProviderOrBuilder
Please see following for JWT authentication flow:
* `JSON Web Token (JWT) <https://tools.ietf.org/html/rfc7519>`_
* `The OAuth 2.0 Authorization Framework <https://tools.ietf.org/html/rfc6749>`_
* `OpenID Connect <http://openid.net/connect>`_
A JwtProvider message specifies how a JSON Web Token (JWT) can be verified. It specifies:
* issuer: the principal that issues the JWT. If specified, it has to match the *iss* field in JWT.
* allowed audiences: the ones in the token have to be listed here.
* how to fetch public key JWKS to verify the token signature.
* how to extract JWT token in the request.
* how to pass successfully verified token payload.
Example:
.. code-block:: yaml
issuer: https://example.com
audiences:
- bookstore_android.apps.googleusercontent.com
- bookstore_web.apps.googleusercontent.com
remote_jwks:
http_uri:
uri: https://example.com/.well-known/jwks.json
cluster: example_jwks_cluster
timeout: 1s
cache_duration:
seconds: 300
[#next-free-field: 11]
Protobuf type envoy.extensions.filters.http.jwt_authn.v4alpha.JwtProvider| Modifier and Type | Class and Description |
|---|---|
static class |
JwtProvider.Builder
Please see following for JWT authentication flow:
* `JSON Web Token (JWT) <https://tools.ietf.org/html/rfc7519>`_
* `The OAuth 2.0 Authorization Framework <https://tools.ietf.org/html/rfc6749>`_
* `OpenID Connect <http://openid.net/connect>`_
A JwtProvider message specifies how a JSON Web Token (JWT) can be verified.
|
static class |
JwtProvider.JwksSourceSpecifierCase |
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 |
AUDIENCES_FIELD_NUMBER |
static int |
CLOCK_SKEW_SECONDS_FIELD_NUMBER |
static int |
FORWARD_FIELD_NUMBER |
static int |
FORWARD_PAYLOAD_HEADER_FIELD_NUMBER |
static int |
FROM_HEADERS_FIELD_NUMBER |
static int |
FROM_PARAMS_FIELD_NUMBER |
static int |
ISSUER_FIELD_NUMBER |
static int |
LOCAL_JWKS_FIELD_NUMBER |
static int |
PAYLOAD_IN_METADATA_FIELD_NUMBER |
static int |
REMOTE_JWKS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAudiences(int index)
The list of JWT `audiences <https://tools.ietf.org/html/rfc7519#section-4.1.3>`_ are
allowed to access.
|
com.google.protobuf.ByteString |
getAudiencesBytes(int index)
The list of JWT `audiences <https://tools.ietf.org/html/rfc7519#section-4.1.3>`_ are
allowed to access.
|
int |
getAudiencesCount()
The list of JWT `audiences <https://tools.ietf.org/html/rfc7519#section-4.1.3>`_ are
allowed to access.
|
com.google.protobuf.ProtocolStringList |
getAudiencesList()
The list of JWT `audiences <https://tools.ietf.org/html/rfc7519#section-4.1.3>`_ are
allowed to access.
|
int |
getClockSkewSeconds()
Specify the clock skew in seconds when verifying JWT time constraint,
such as `exp`, and `nbf`.
|
static JwtProvider |
getDefaultInstance() |
JwtProvider |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getForward()
If false, the JWT is removed in the request after a success verification.
|
String |
getForwardPayloadHeader()
This field specifies the header name to forward a successfully verified JWT payload to the
backend.
|
com.google.protobuf.ByteString |
getForwardPayloadHeaderBytes()
This field specifies the header name to forward a successfully verified JWT payload to the
backend.
|
JwtHeader |
getFromHeaders(int index)
Two fields below define where to extract the JWT from an HTTP request.
|
int |
getFromHeadersCount()
Two fields below define where to extract the JWT from an HTTP request.
|
List<JwtHeader> |
getFromHeadersList()
Two fields below define where to extract the JWT from an HTTP request.
|
JwtHeaderOrBuilder |
getFromHeadersOrBuilder(int index)
Two fields below define where to extract the JWT from an HTTP request.
|
List<? extends JwtHeaderOrBuilder> |
getFromHeadersOrBuilderList()
Two fields below define where to extract the JWT from an HTTP request.
|
String |
getFromParams(int index)
JWT is sent in a query parameter.
|
com.google.protobuf.ByteString |
getFromParamsBytes(int index)
JWT is sent in a query parameter.
|
int |
getFromParamsCount()
JWT is sent in a query parameter.
|
com.google.protobuf.ProtocolStringList |
getFromParamsList()
JWT is sent in a query parameter.
|
String |
getIssuer()
Specify the `principal <https://tools.ietf.org/html/rfc7519#section-4.1.1>`_ that issued
the JWT, usually a URL or an email address.
|
com.google.protobuf.ByteString |
getIssuerBytes()
Specify the `principal <https://tools.ietf.org/html/rfc7519#section-4.1.1>`_ that issued
the JWT, usually a URL or an email address.
|
JwtProvider.JwksSourceSpecifierCase |
getJwksSourceSpecifierCase() |
DataSource |
getLocalJwks()
JWKS is in local data source.
|
DataSourceOrBuilder |
getLocalJwksOrBuilder()
JWKS is in local data source.
|
com.google.protobuf.Parser<JwtProvider> |
getParserForType() |
String |
getPayloadInMetadata()
If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata
in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn**
The value is the *protobuf::Struct*.
|
com.google.protobuf.ByteString |
getPayloadInMetadataBytes()
If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata
in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn**
The value is the *protobuf::Struct*.
|
RemoteJwks |
getRemoteJwks()
JWKS can be fetched from remote server via HTTP/HTTPS.
|
RemoteJwksOrBuilder |
getRemoteJwksOrBuilder()
JWKS can be fetched from remote server via HTTP/HTTPS.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasLocalJwks()
JWKS is in local data source.
|
boolean |
hasRemoteJwks()
JWKS can be fetched from remote server via HTTP/HTTPS.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static JwtProvider.Builder |
newBuilder() |
static JwtProvider.Builder |
newBuilder(JwtProvider prototype) |
JwtProvider.Builder |
newBuilderForType() |
protected JwtProvider.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static JwtProvider |
parseDelimitedFrom(InputStream input) |
static JwtProvider |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static JwtProvider |
parseFrom(byte[] data) |
static JwtProvider |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static JwtProvider |
parseFrom(ByteBuffer data) |
static JwtProvider |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static JwtProvider |
parseFrom(com.google.protobuf.ByteString data) |
static JwtProvider |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static JwtProvider |
parseFrom(com.google.protobuf.CodedInputStream input) |
static JwtProvider |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static JwtProvider |
parseFrom(InputStream input) |
static JwtProvider |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<JwtProvider> |
parser() |
JwtProvider.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 ISSUER_FIELD_NUMBER
public static final int AUDIENCES_FIELD_NUMBER
public static final int REMOTE_JWKS_FIELD_NUMBER
public static final int LOCAL_JWKS_FIELD_NUMBER
public static final int FORWARD_FIELD_NUMBER
public static final int FROM_HEADERS_FIELD_NUMBER
public static final int FROM_PARAMS_FIELD_NUMBER
public static final int FORWARD_PAYLOAD_HEADER_FIELD_NUMBER
public static final int PAYLOAD_IN_METADATA_FIELD_NUMBER
public static final int CLOCK_SKEW_SECONDS_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 JwtProvider.JwksSourceSpecifierCase getJwksSourceSpecifierCase()
getJwksSourceSpecifierCase in interface JwtProviderOrBuilderpublic String getIssuer()
Specify the `principal <https://tools.ietf.org/html/rfc7519#section-4.1.1>`_ that issued the JWT, usually a URL or an email address. It is optional. If specified, it has to match the *iss* field in JWT. If a JWT has *iss* field and this field is specified, they have to match, otherwise the JWT *iss* field is not checked. Note: *JwtRequirement* :ref:`allow_missing <envoy_v3_api_field_extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing>` and :ref:`allow_missing_or_failed <envoy_v3_api_field_extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing_or_failed>` are implemented differently than other *JwtRequirements*. Hence the usage of this field is different as follows if *allow_missing* or *allow_missing_or_failed* is used: * If a JWT has *iss* field, it needs to be specified by this field in one of *JwtProviders*. * If a JWT doesn't have *iss* field, one of *JwtProviders* should fill this field empty. * Multiple *JwtProviders* should not have same value in this field. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com
string issuer = 1;getIssuer in interface JwtProviderOrBuilderpublic com.google.protobuf.ByteString getIssuerBytes()
Specify the `principal <https://tools.ietf.org/html/rfc7519#section-4.1.1>`_ that issued the JWT, usually a URL or an email address. It is optional. If specified, it has to match the *iss* field in JWT. If a JWT has *iss* field and this field is specified, they have to match, otherwise the JWT *iss* field is not checked. Note: *JwtRequirement* :ref:`allow_missing <envoy_v3_api_field_extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing>` and :ref:`allow_missing_or_failed <envoy_v3_api_field_extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing_or_failed>` are implemented differently than other *JwtRequirements*. Hence the usage of this field is different as follows if *allow_missing* or *allow_missing_or_failed* is used: * If a JWT has *iss* field, it needs to be specified by this field in one of *JwtProviders*. * If a JWT doesn't have *iss* field, one of *JwtProviders* should fill this field empty. * Multiple *JwtProviders* should not have same value in this field. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com
string issuer = 1;getIssuerBytes in interface JwtProviderOrBuilderpublic com.google.protobuf.ProtocolStringList getAudiencesList()
The list of JWT `audiences <https://tools.ietf.org/html/rfc7519#section-4.1.3>`_ are
allowed to access. A JWT containing any of these audiences will be accepted. If not specified,
will not check audiences in the token.
Example:
.. code-block:: yaml
audiences:
- bookstore_android.apps.googleusercontent.com
- bookstore_web.apps.googleusercontent.com
repeated string audiences = 2;getAudiencesList in interface JwtProviderOrBuilderpublic int getAudiencesCount()
The list of JWT `audiences <https://tools.ietf.org/html/rfc7519#section-4.1.3>`_ are
allowed to access. A JWT containing any of these audiences will be accepted. If not specified,
will not check audiences in the token.
Example:
.. code-block:: yaml
audiences:
- bookstore_android.apps.googleusercontent.com
- bookstore_web.apps.googleusercontent.com
repeated string audiences = 2;getAudiencesCount in interface JwtProviderOrBuilderpublic String getAudiences(int index)
The list of JWT `audiences <https://tools.ietf.org/html/rfc7519#section-4.1.3>`_ are
allowed to access. A JWT containing any of these audiences will be accepted. If not specified,
will not check audiences in the token.
Example:
.. code-block:: yaml
audiences:
- bookstore_android.apps.googleusercontent.com
- bookstore_web.apps.googleusercontent.com
repeated string audiences = 2;getAudiences in interface JwtProviderOrBuilderpublic com.google.protobuf.ByteString getAudiencesBytes(int index)
The list of JWT `audiences <https://tools.ietf.org/html/rfc7519#section-4.1.3>`_ are
allowed to access. A JWT containing any of these audiences will be accepted. If not specified,
will not check audiences in the token.
Example:
.. code-block:: yaml
audiences:
- bookstore_android.apps.googleusercontent.com
- bookstore_web.apps.googleusercontent.com
repeated string audiences = 2;getAudiencesBytes in interface JwtProviderOrBuilderpublic boolean hasRemoteJwks()
JWKS can be fetched from remote server via HTTP/HTTPS. This field specifies the remote HTTP
URI and how the fetched JWKS should be cached.
Example:
.. code-block:: yaml
remote_jwks:
http_uri:
uri: https://www.googleapis.com/oauth2/v1/certs
cluster: jwt.www.googleapis.com|443
timeout: 1s
cache_duration:
seconds: 300
.envoy.extensions.filters.http.jwt_authn.v4alpha.RemoteJwks remote_jwks = 3;hasRemoteJwks in interface JwtProviderOrBuilderpublic RemoteJwks getRemoteJwks()
JWKS can be fetched from remote server via HTTP/HTTPS. This field specifies the remote HTTP
URI and how the fetched JWKS should be cached.
Example:
.. code-block:: yaml
remote_jwks:
http_uri:
uri: https://www.googleapis.com/oauth2/v1/certs
cluster: jwt.www.googleapis.com|443
timeout: 1s
cache_duration:
seconds: 300
.envoy.extensions.filters.http.jwt_authn.v4alpha.RemoteJwks remote_jwks = 3;getRemoteJwks in interface JwtProviderOrBuilderpublic RemoteJwksOrBuilder getRemoteJwksOrBuilder()
JWKS can be fetched from remote server via HTTP/HTTPS. This field specifies the remote HTTP
URI and how the fetched JWKS should be cached.
Example:
.. code-block:: yaml
remote_jwks:
http_uri:
uri: https://www.googleapis.com/oauth2/v1/certs
cluster: jwt.www.googleapis.com|443
timeout: 1s
cache_duration:
seconds: 300
.envoy.extensions.filters.http.jwt_authn.v4alpha.RemoteJwks remote_jwks = 3;getRemoteJwksOrBuilder in interface JwtProviderOrBuilderpublic boolean hasLocalJwks()
JWKS is in local data source. It could be either in a local file or embedded in the
inline_string.
Example: local file
.. code-block:: yaml
local_jwks:
filename: /etc/envoy/jwks/jwks1.txt
Example: inline_string
.. code-block:: yaml
local_jwks:
inline_string: ACADADADADA
.envoy.config.core.v4alpha.DataSource local_jwks = 4;hasLocalJwks in interface JwtProviderOrBuilderpublic DataSource getLocalJwks()
JWKS is in local data source. It could be either in a local file or embedded in the
inline_string.
Example: local file
.. code-block:: yaml
local_jwks:
filename: /etc/envoy/jwks/jwks1.txt
Example: inline_string
.. code-block:: yaml
local_jwks:
inline_string: ACADADADADA
.envoy.config.core.v4alpha.DataSource local_jwks = 4;getLocalJwks in interface JwtProviderOrBuilderpublic DataSourceOrBuilder getLocalJwksOrBuilder()
JWKS is in local data source. It could be either in a local file or embedded in the
inline_string.
Example: local file
.. code-block:: yaml
local_jwks:
filename: /etc/envoy/jwks/jwks1.txt
Example: inline_string
.. code-block:: yaml
local_jwks:
inline_string: ACADADADADA
.envoy.config.core.v4alpha.DataSource local_jwks = 4;getLocalJwksOrBuilder in interface JwtProviderOrBuilderpublic boolean getForward()
If false, the JWT is removed in the request after a success verification. If true, the JWT is not removed in the request. Default value is false.
bool forward = 5;getForward in interface JwtProviderOrBuilderpublic List<JwtHeader> getFromHeadersList()
Two fields below define where to extract the JWT from an HTTP request.
If no explicit location is specified, the following default locations are tried in order:
1. The Authorization header using the `Bearer schema
<https://tools.ietf.org/html/rfc6750#section-2.1>`_. Example::
Authorization: Bearer <token>.
2. `access_token <https://tools.ietf.org/html/rfc6750#section-2.3>`_ query parameter.
Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations
its provider specified or from the default locations.
Specify the HTTP headers to extract JWT token. For examples, following config:
.. code-block:: yaml
from_headers:
- name: x-goog-iap-jwt-assertion
can be used to extract token from header::
``x-goog-iap-jwt-assertion: <JWT>``.
repeated .envoy.extensions.filters.http.jwt_authn.v4alpha.JwtHeader from_headers = 6;getFromHeadersList in interface JwtProviderOrBuilderpublic List<? extends JwtHeaderOrBuilder> getFromHeadersOrBuilderList()
Two fields below define where to extract the JWT from an HTTP request.
If no explicit location is specified, the following default locations are tried in order:
1. The Authorization header using the `Bearer schema
<https://tools.ietf.org/html/rfc6750#section-2.1>`_. Example::
Authorization: Bearer <token>.
2. `access_token <https://tools.ietf.org/html/rfc6750#section-2.3>`_ query parameter.
Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations
its provider specified or from the default locations.
Specify the HTTP headers to extract JWT token. For examples, following config:
.. code-block:: yaml
from_headers:
- name: x-goog-iap-jwt-assertion
can be used to extract token from header::
``x-goog-iap-jwt-assertion: <JWT>``.
repeated .envoy.extensions.filters.http.jwt_authn.v4alpha.JwtHeader from_headers = 6;getFromHeadersOrBuilderList in interface JwtProviderOrBuilderpublic int getFromHeadersCount()
Two fields below define where to extract the JWT from an HTTP request.
If no explicit location is specified, the following default locations are tried in order:
1. The Authorization header using the `Bearer schema
<https://tools.ietf.org/html/rfc6750#section-2.1>`_. Example::
Authorization: Bearer <token>.
2. `access_token <https://tools.ietf.org/html/rfc6750#section-2.3>`_ query parameter.
Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations
its provider specified or from the default locations.
Specify the HTTP headers to extract JWT token. For examples, following config:
.. code-block:: yaml
from_headers:
- name: x-goog-iap-jwt-assertion
can be used to extract token from header::
``x-goog-iap-jwt-assertion: <JWT>``.
repeated .envoy.extensions.filters.http.jwt_authn.v4alpha.JwtHeader from_headers = 6;getFromHeadersCount in interface JwtProviderOrBuilderpublic JwtHeader getFromHeaders(int index)
Two fields below define where to extract the JWT from an HTTP request.
If no explicit location is specified, the following default locations are tried in order:
1. The Authorization header using the `Bearer schema
<https://tools.ietf.org/html/rfc6750#section-2.1>`_. Example::
Authorization: Bearer <token>.
2. `access_token <https://tools.ietf.org/html/rfc6750#section-2.3>`_ query parameter.
Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations
its provider specified or from the default locations.
Specify the HTTP headers to extract JWT token. For examples, following config:
.. code-block:: yaml
from_headers:
- name: x-goog-iap-jwt-assertion
can be used to extract token from header::
``x-goog-iap-jwt-assertion: <JWT>``.
repeated .envoy.extensions.filters.http.jwt_authn.v4alpha.JwtHeader from_headers = 6;getFromHeaders in interface JwtProviderOrBuilderpublic JwtHeaderOrBuilder getFromHeadersOrBuilder(int index)
Two fields below define where to extract the JWT from an HTTP request.
If no explicit location is specified, the following default locations are tried in order:
1. The Authorization header using the `Bearer schema
<https://tools.ietf.org/html/rfc6750#section-2.1>`_. Example::
Authorization: Bearer <token>.
2. `access_token <https://tools.ietf.org/html/rfc6750#section-2.3>`_ query parameter.
Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations
its provider specified or from the default locations.
Specify the HTTP headers to extract JWT token. For examples, following config:
.. code-block:: yaml
from_headers:
- name: x-goog-iap-jwt-assertion
can be used to extract token from header::
``x-goog-iap-jwt-assertion: <JWT>``.
repeated .envoy.extensions.filters.http.jwt_authn.v4alpha.JwtHeader from_headers = 6;getFromHeadersOrBuilder in interface JwtProviderOrBuilderpublic com.google.protobuf.ProtocolStringList getFromParamsList()
JWT is sent in a query parameter. `jwt_params` represents the query parameter names.
For example, if config is:
.. code-block:: yaml
from_params:
- jwt_token
The JWT format in query parameter is::
/path?jwt_token=<JWT>
repeated string from_params = 7;getFromParamsList in interface JwtProviderOrBuilderpublic int getFromParamsCount()
JWT is sent in a query parameter. `jwt_params` represents the query parameter names.
For example, if config is:
.. code-block:: yaml
from_params:
- jwt_token
The JWT format in query parameter is::
/path?jwt_token=<JWT>
repeated string from_params = 7;getFromParamsCount in interface JwtProviderOrBuilderpublic String getFromParams(int index)
JWT is sent in a query parameter. `jwt_params` represents the query parameter names.
For example, if config is:
.. code-block:: yaml
from_params:
- jwt_token
The JWT format in query parameter is::
/path?jwt_token=<JWT>
repeated string from_params = 7;getFromParams in interface JwtProviderOrBuilderpublic com.google.protobuf.ByteString getFromParamsBytes(int index)
JWT is sent in a query parameter. `jwt_params` represents the query parameter names.
For example, if config is:
.. code-block:: yaml
from_params:
- jwt_token
The JWT format in query parameter is::
/path?jwt_token=<JWT>
repeated string from_params = 7;getFromParamsBytes in interface JwtProviderOrBuilderpublic String getForwardPayloadHeader()
This field specifies the header name to forward a successfully verified JWT payload to the
backend. The forwarded data is::
base64url_encoded(jwt_payload_in_JSON)
If it is not specified, the payload will not be forwarded.
string forward_payload_header = 8 [(.validate.rules) = { ... }getForwardPayloadHeader in interface JwtProviderOrBuilderpublic com.google.protobuf.ByteString getForwardPayloadHeaderBytes()
This field specifies the header name to forward a successfully verified JWT payload to the
backend. The forwarded data is::
base64url_encoded(jwt_payload_in_JSON)
If it is not specified, the payload will not be forwarded.
string forward_payload_header = 8 [(.validate.rules) = { ... }getForwardPayloadHeaderBytes in interface JwtProviderOrBuilderpublic String getPayloadInMetadata()
If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata
in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn**
The value is the *protobuf::Struct*. The value of this field will be the key for its *fields*
and the value is the *protobuf::Struct* converted from JWT JSON payload.
For example, if payload_in_metadata is *my_payload*:
.. code-block:: yaml
envoy.filters.http.jwt_authn:
my_payload:
iss: https://example.com
sub: test@example.com
aud: https://example.com
exp: 1501281058
string payload_in_metadata = 9;getPayloadInMetadata in interface JwtProviderOrBuilderpublic com.google.protobuf.ByteString getPayloadInMetadataBytes()
If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata
in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn**
The value is the *protobuf::Struct*. The value of this field will be the key for its *fields*
and the value is the *protobuf::Struct* converted from JWT JSON payload.
For example, if payload_in_metadata is *my_payload*:
.. code-block:: yaml
envoy.filters.http.jwt_authn:
my_payload:
iss: https://example.com
sub: test@example.com
aud: https://example.com
exp: 1501281058
string payload_in_metadata = 9;getPayloadInMetadataBytes in interface JwtProviderOrBuilderpublic int getClockSkewSeconds()
Specify the clock skew in seconds when verifying JWT time constraint, such as `exp`, and `nbf`. If not specified, default is 60 seconds.
uint32 clock_skew_seconds = 10;getClockSkewSeconds in interface JwtProviderOrBuilderpublic 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 JwtProvider parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static JwtProvider parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static JwtProvider parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static JwtProvider parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static JwtProvider parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static JwtProvider parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static JwtProvider parseFrom(InputStream input) throws IOException
IOExceptionpublic static JwtProvider parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static JwtProvider parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static JwtProvider parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static JwtProvider parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static JwtProvider parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic JwtProvider.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static JwtProvider.Builder newBuilder()
public static JwtProvider.Builder newBuilder(JwtProvider prototype)
public JwtProvider.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected JwtProvider.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static JwtProvider getDefaultInstance()
public static com.google.protobuf.Parser<JwtProvider> parser()
public com.google.protobuf.Parser<JwtProvider> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public JwtProvider getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.