Skip to content

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
Signed-off-by: Alexey Razinkov <noavarice@gmail.com>
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