Skip to content

Conversation

lcpojr
Copy link
Owner

@lcpojr lcpojr commented Sep 27, 2020

Authentication flows that requires credentials as Resource Owner and Client Credentials now accepts client assertions.
It's important to avoid passing the raw secret on requests.

In this case the client application sends a JWT that is signed with it's private key and we verify it's signature using the public key stored on the ResourceManager. The required claims on JWT are exp, iat, nbf, iss, aud, jti, sub, typ.

The request payload should send the following new params:

  • client_assertions (JWT signed by private key and containing the required claims);
  • client_assertion_type (should be urn:ietf:params:oauth:client-assertion-type:jwt-bearer);

@lcpojr lcpojr self-assigned this Sep 27, 2020
@lcpojr lcpojr changed the title [WIP] feat: authentication flows now accepts client assertions feat: authentication flows now accepts client assertions Sep 27, 2020
@lcpojr lcpojr marked this pull request as ready for review September 27, 2020 18:36
@spec sign_out(conn :: Plug.Conn.t(), params :: map()) :: Plug.Conn.t()
def sign_out(%{private: %{session: session}} = conn, _params) do
session
session.jti
Copy link
Owner Author

Choose a reason for hiding this comment

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

@yashin5 this is what was crashing the logout -.-.
I removed this param unintentionally and as the API tests are mocked i didn't noticed at all xD.

@lcpojr lcpojr merged commit ff35320 into master Sep 27, 2020
@lcpojr lcpojr deleted the feat/client-assertions branch September 27, 2020 20:47
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.

1 participant