Repository navigation
feat: JWT authentication with file-based user store and RBAC - #13
Merged
Merged
Conversation
JWT-based auth with file-based user store, RBAC, sf CLI compatibility. New deps: JJWT (JWT tokens), spring-security-crypto (BCrypt). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Auth domain (auth/): - UserStore interface + FileBasedUserStore (data/users.json) + InMemoryUserStore (tests) - JwtService: HMAC-SHA256, 1hr access tokens, 7-day refresh tokens - AuthController: register, login, refresh, me, list users, delete user - JwtAuthFilter: enforces JWT on /services/* and /api/*, SF-compatible 401 errors - First-run mode: auth bypassed until first user registered OAuth2 compatibility: - POST /services/oauth2/token accepts grant_type=password with real credentials - Returns real JWT as access_token in SF-compatible response RBAC: ADMIN (all ops) / USER (data/metadata only, no reset/user management) New deps: jjwt 0.12.6 (JWT), spring-security-crypto (BCrypt) 114 tests pass (101 existing + 13 new auth tests) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
sf org loginagainst running instance🤖 Generated with Claude Code