Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
noavarice wants to merge 1 commit into spring-projects:main
base: main
Choose a base branch
Loading
from noavarice:api-keys

Conversation

Copy link

@noavarice noavarice commented Aug 23, 2025
edited
Loading

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.

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
Reviewers
No reviews
Assignees
No one assigned
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /