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 more capabilities to certificate-matcher for mTLS routes #4615

Open
calderonth opened this issue Oct 2, 2023 · 1 comment
Open

Add more capabilities to certificate-matcher for mTLS routes #4615

calderonth opened this issue Oct 2, 2023 · 1 comment
Assignees

Comments

@calderonth
Copy link

Is your feature request related to a problem? Please describe.
Currently the Certificate Matcher that can be configured in a route when using mTLS only offers the following capabilities:

  • fingerprint (SHA256)
  • spki_hash

This is insufficient and not scalable when configuring policies. Instead, one would expect the certificate matcher to allow a lot more granulatity, such as filtering on the SANs and using complex expression to build better mTLS route-logic.
In addition, when a route matches on mTLS, there is nothing in the JWT assertion to indicate that this is what allowed the connection to get through, instead one has to add custom HTTP header that can only include the fingerprint of the certificate.
It would be interesting to add claims to the JWT token to indicate reference the "method" that was used to authenticate (user, bearer, mtls certificate) and carry more metadata.

Describe the solution you'd like
The ability to build better mTLS route ACL using more complex matching, for instance:

- client_certificate:
    match_subject_alt_names:
      - email: '.*@blah\.com'

Describe alternatives you've considered
I have tried using the global SAN matching but it seems a little buggy.
I have reported #4614 on the side of this feature request.

@desimone
Copy link
Contributor

FYI, working on a corporate CLA.

@desimone desimone added the blocked PR/ISSUE is blocked by third party label Dec 29, 2023
@kenjenkins kenjenkins removed blocked PR/ISSUE is blocked by third party NeedsDiscussion labels Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants