Skip to content

Support at+jwt Types in JWT Realm #119370

@ChrisSamo632

Description

@ChrisSamo632

Description

Some JWT providers (e.g. logto.io) only provie Access Token JWTs with a typ of at+jwt, but Elasticsearch currently only supports JWT types of JWT in the JWT Realm for authentication.

Attempting to connect with such Access Token JWTs in Elasticsearch results in:

Caused by java.lang.IllegalArgumentException: invalid jwt typ header; Caused by com.nimbusds.jose.proc.BadJOSEException: JOSE header typ (type) at+jwt not allowed

It may be that a custom JWT Decoder needs to be included in a SecurityFilterChain (or similar, depending upon how Elasticsearch implements such security), similar to the approach suggested for Spring applicaitons in https://github.com/logto-io/logto/blob/master/packages/console/src/assets/docs/guides/api-spring-boot/README.mdx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions