Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App access JWT improvements #12567

Merged
merged 2 commits into from
May 11, 2022
Merged

App access JWT improvements #12567

merged 2 commits into from
May 11, 2022

Conversation

r0mant
Copy link
Collaborator

@r0mant r0mant commented May 11, 2022

Couple improvements/fixes for app access' JWT integration. Specifically:

  • Include iat (IssuedAt) claim which wasn't present before. Some apps that support JWT auth require it.
  • Add ability to inject JWT in any header via {{internal.jwt}} template variable. With this change, you can for example have the following app configuration to pass JWT in Authorization header:
apps:
- name: "example"
  uri: http://localhost:9200
  rewrite:
    headers:
    - "Authorization: Bearer {{internal.jwt}}"

These changes are required to support JWT authentication in more applications. For example, with these changes I was able to successfully configure JWT authentication/authorization with ElasticSearch:

https://www.elastic.co/guide/en/elasticsearch/reference/current/jwt-realm.html

constants.go Outdated Show resolved Hide resolved
docs/pages/application-access/guides/jwt.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/guides/connecting-apps.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/guides/jwt.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/guides/jwt.mdx Outdated Show resolved Hide resolved
Copy link
Collaborator

@zmb3 zmb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bot.

@r0mant r0mant enabled auto-merge (squash) May 11, 2022 21:54
@r0mant r0mant merged commit 0b6fe72 into master May 11, 2022
@github-actions
Copy link

@r0mant See the table below for backport results.

Branch Result
branch/v9 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants