Skip to content

API key authentication implementation #17800

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

noavarice
Copy link

@noavarice noavarice commented Aug 23, 2025

See GH-17563

Adds API key authentication support. Key components include the following:

  • ApiKei is a data model consisting of ID and secret parts. ApiKey provides method for generating new instance randomly;
  • ApiKeyDigest handles hashing API key secret part and comparing secret with existing hash. This component closely resembles PasswordEncoder functionality;
  • ApiKeySearchService allows framework user to hook into the API key authentication lifecycle. This component closely resembles UserDetailsService functionality;
  • ApiKeyAuthenticationProvider handles API key authentication aspects;
  • ApiKeyAuthenticationFilter intercepts incoming requests and hands control over to AuthenticationManager the same way other similar filters do (e.g., BasicAuthenticationFilter).

This is a work-in-progress, it's far from finish (no reactive stack support, no tests, etc.), but it catches the way it should work from my perspective.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants