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

Enable client assertion authentication #66

Closed
5 tasks
ycrumeyrolle opened this issue Oct 9, 2017 · 10 comments
Closed
5 tasks

Enable client assertion authentication #66

ycrumeyrolle opened this issue Oct 9, 2017 · 10 comments
Assignees

Comments

@ycrumeyrolle
Copy link

ycrumeyrolle commented Oct 9, 2017

Endpoints

  • token
  • introspection
  • revocation

Styles

  • client_secret_jwt
  • private_key_jwt

Client_secret_jwt require an additional signingAlgorithm parameter. The key is the client_secret.
private_key_jwt require the additional parameters signingAlgorithm and an asymmetric key. The key could be a JWK.

Requirement
No dependency to Microsoft JWT package
Integrated within a generic callback when creating the POST body

@ycrumeyrolle
Copy link
Author

ycrumeyrolle commented Oct 9, 2017

No dependency to Microsoft JWT package

Or is it no external dependency at all ?

@ycrumeyrolle
Copy link
Author

Integrated within a generic callback when creating the POST body

Can you ne more precise?

@leastprivilege
Copy link
Contributor

For all bearer style credentials, it typically boils down to adding something to the POST body, e.g.

client_assertion and client_assertion_type

Instead of baking in client assertion support directly, I want a generic easy way to add to the POST body (easier than modifying the body in an HTTP handler).

Once we have that, you can have helpers that produce the actually assertion and use that new hook to add it to the body.

I don't want the assertion producing code in IdentityModel itself.

@leastprivilege leastprivilege changed the title Enabled client assertion authentication Enable client assertion authentication Oct 9, 2017
@leastprivilege leastprivilege self-assigned this Oct 9, 2017
@ycrumeyrolle
Copy link
Author

ycrumeyrolle commented Oct 9, 2017

The current implementation of the post values authentication style is into an extension method of the RequestAsync method called RequestCustomAsync. Do you agree that it is not the desired hook model?

@ycrumeyrolle
Copy link
Author

Proposal :

With an Authenticate method

var client = new TokenClient(...);
client.Authenticate(_authentication parameters_);
client.RequestAsync();

Where the Authenticatemethod would be virtual. This method may be called within the RequestAsync method. The Authenticate method would add items to the form dictionary.

With an IAuthenticator

var client = new TokenClient(..., IAuthenticator instance);
client.RequestAsync();

The IAuthenticator would add items to the form dictionary.

With a DiscovertClient Factory

var disco = ...
var tokenClient = disco.CreateTokenClient();
client.RequestAsync();

The discovery client would be responsible to create a client with the appropriate parameters. What if the AS support multiple authentication methods?

@leastprivilege
Copy link
Contributor

The more I think about it, I don't like putting these feature in here.

IdentityModel should have the building blocks necessary to pass the credentials with the request. Other higher level libraries should implement the smarts you are talking about.

TokenClient is all set - introspection & revocation I need to check.

I encourage you to write this higher level lib that utilizes IdentityModel.

@leastprivilege
Copy link
Contributor

Did you even start work on the higher level library I mentioned?

@ycrumeyrolle
Copy link
Author

I put this work in standby for the moment.

@leastprivilege
Copy link
Contributor

ok . closing then,

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants