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

Add support for OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens #101

Closed
tlodderstedt opened this issue Aug 21, 2020 · 20 comments
Assignees
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@tlodderstedt
Copy link

tlodderstedt commented Aug 21, 2020

Expected Behavior
Support for RFC 8705 would allows clients to authenticate using TLS certificates and to bind access tokens to such certificates.

Current Behavior
Addition of client authentication with public client crypto increases the security capabilities of this project.

Context
There are several advantages:

  • Certificate-based authentication is more secure than shared secrets since the secret is managed at the client only. This reduces the attack surface at the AS.
  • Binding access tokens to certificates allows replay detection at the RS (recommended by the OAuth Security BCP). RFC 8705 provides a simple technical solution.
  • Since RFC 8705 also supports self-signed certs, this mechanisms does not suffer from the typical headache a PKI has built in.
  • Certificate-based client authentication is a great basis for using OAuth in micro service architecture as it allows

Related gh-1558, gh-1559, gh-1560

@pkostrzewa
Copy link

pkostrzewa commented Apr 9, 2021

@jgrandja Has it already been assigned to someone? I'd like to give it a try.

@jgrandja
Copy link
Collaborator

Thanks for the offer @pkostrzewa. I likely need to split this ticket up into 2 separate tasks. I'll get back to you sometime next week with a plan on how to implement this feature. Thanks!

@jgrandja
Copy link
Collaborator

@pkostrzewa Apologies for the long delay in my response.

I'm going to be taking on this feature as part of a POC that I'll be starting next week. The POC involves integration with SPIFFE / SPIRE.

If there are any other tasks you're interested in please let me know.

@jgrandja jgrandja self-assigned this May 20, 2021
@jgrandja jgrandja removed the status: on-hold We can't start working on this issue yet label May 20, 2021
@pkostrzewa
Copy link

@jgrandja Yes, I can take something else.

@jgrandja jgrandja modified the milestones: 0.1.2, 0.2.0 Jun 17, 2021
@jgrandja jgrandja modified the milestones: 0.2.0, 0.2.1 Jul 21, 2021
@jgrandja
Copy link
Collaborator

@aphalke
Copy link

aphalke commented Sep 30, 2022

Hi @jgrandja, in which release we can expect this feature?

@jgrandja jgrandja added this to the 1.1.x milestone Oct 4, 2022
@jgrandja
Copy link
Collaborator

jgrandja commented Oct 4, 2022

@aphalke We'll target this feature in the 1.1.0 release, which is approx. 7 months out.

@jgrandja jgrandja modified the milestones: 1.1.0, 1.1.0-RC1 Mar 6, 2023
@jgrandja jgrandja modified the milestones: 1.1.0-RC1, 1.2.x Apr 4, 2023
@jgrandja
Copy link
Collaborator

jgrandja commented Apr 4, 2023

This feature has been pushed to the 1.2.0 release, as we don't have enough time to get it into 1.1.0. It will be top priority for 1.2.0.

@jgrandja jgrandja removed this from the 1.2.0-M1 milestone Jun 15, 2023
@ZuoJunLN
Copy link

@jgrandja Do you know which version of spring authorization server will support mtls?

@jgrandja
Copy link
Collaborator

jgrandja commented Nov 1, 2023

@ZuoJunLN We're releasing 1.2 Nov 21 and then will be planning 1.3. We will consider adding this feature but I'm not sure at this point as we already have quite a bit of work planned for 1.3.

@ZuoJunLN
Copy link

ZuoJunLN commented Nov 1, 2023

@jgrandja Thank you for your reply. May I inquire about the reason for this ticket being repeatedly postponed? It has been there for over three years. Is there a technical issue causing the delay, or is it simply a matter of other priorities taking precedence?

@jgrandja
Copy link
Collaborator

jgrandja commented Nov 2, 2023

@ZuoJunLN Other priorities have taken precedence. No technical issue. As well, we have limited resources on the team so it's tough getting all the features we want/need into a release.

@ZuoJunLN
Copy link

ZuoJunLN commented Nov 2, 2023

@jgrandja Understood. By the way, in order to support mTLS, The client will pass a client certificate to the server, How does the Spring Authorization Server handle the client certificate? Does it obtain the client certificate from the request header, or does it retrieve the client certificate from somewhere else?

@jgrandja
Copy link
Collaborator

jgrandja commented Nov 3, 2023

@ZuoJunLN It will check for the client certificate in the request. See sample implementation for details.

@ZuoJunLN
Copy link

Thanks for your recently update, when 1.3.0-M3 will be released? when 1.3.0 will be officially released?

@jgrandja
Copy link
Collaborator

@ZuoJunLN Scheduled release dates are here

@ZuoJunLN
Copy link

@jgrandja In RFC 8705, it suggests that the Authorization Server should support a different token endpoint for each authentication method. Is this supported in this release?

@ZuoJunLN
Copy link

@jgrandja One more question about implementing this server: in RFC 8705, it states that the implementation of mutual-TLS for client authentication and mutual-TLS client certificate-bound access tokens can be done separately. Is this supported here?

@jgrandja
Copy link
Collaborator

@ZuoJunLN This is not a support forum. We prefer to use GitHub issues only for bugs and enhancements. If you have specific questions or require support please direct it to Stack Overflow.

There are 3 issues that are linked to this issue and only one of them are complete now. There is more work to be done in the other 2 issues until this feature is complete. Until this feature is fully complete and we have provided reference documentation, it is up to you to look at the current code to see what is currently implemented.

@jgrandja
Copy link
Collaborator

@tlodderstedt It's been a long time coming but I'm happy to share that this feature has been completed and will be released in 1.3 on May 21.

The Demo Sample shows how to configure the client for mTLS client authentication using both PKI and self-signed method.

I've split up this issue and associated tasks into 4 separate issues gh-1558, gh-1559, gh-1560 and gh-1561. I'll close this as a duplicate.

I still need to add reference documentation in gh-1561 before the release.

@jgrandja jgrandja added the status: duplicate A duplicate of another issue label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants