question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JWT-grant as a new Oauth2 flow

See original GitHub issue

RFC7523 extends Oauth2 by using JWTs as grants.

It would be nice if this behaviour could be added as a new type of flow under the Oauth2 securityScheme, in addition to existing ones (authorizationCode, implicit, etc.)

The full name in the RFC is urn:ietf:params:oauth:grant-type:jwt-bearer, but I guess JWT will suffice. Apart from that, the tokenUrl and scopes would be needed.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ioggstreamcommented, Mar 11, 2021

Any news on that?

0reactions
ioggstreamcommented, Feb 1, 2022

@darrelmiller like @johakoch wrote, using JWTs for Client Authentication can already be expressed as such, though the OAS spec does not contain all the required information to retrieve the token. For example, we need to specity client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer and the JWT schema, in terms of the specific required claims/header-parameters.

Currently all those information are usually in description but it would be great to have a way to specify them.

    OAuth2:
      type: oauth2
      flows:
        clientCredentials:  # <- iiuc it's either  clientCredential or authorizationCode(PKCE)
          tokenUrl: https://pdnd.gov.it/as/token
          description: |-
            client_assertion_type: ...
            client_assertion format
          scopes:
            write:pets: modify pets in your account
            read:pets: read your pets

To support instead JWT as Authorization Grant, it is probably required to register new keywords.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON Web Token (JWT) Grant authentication
JSON Web Token (JWT) Grant is an OAuth 2.0 flow that is used to grant an access token to service integrations. Service integrations...
Read more >
OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration
The OAuth 2.0 JWT bearer and SAML assertion bearer flow requests look at all previous approvals for the user that include a refresh...
Read more >
OAuth 2.0 - JWT bearer token authorization grant type
JWT Bearer token authorization grant type for OAuth 2.0, also known as two-legged OAuth with impersonation (2LOi), can only be used in Connect ......
Read more >
Salesforce OAuth 2.0 JWT Bearer flow
OAuth 2.0 JWT Bearer flow is used for server to server integration scenarios. This flow uses a certificate to sign the JWT request...
Read more >
JWT Bearer Grant Type | OAuth2 Server PHP
The JWT Bearer grant type is used when the client wants to receive access tokens without transmitting sensitive information such as the client...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found