feat: optional bearer authentication with RSS_API_TOKEN - #26
Merged
Conversation
…token # Conflicts: # README.md # docker-compose.yml # main.py # tests/test_main.py
- remove RSS_API_TOKEN from _missing check — auth is skipped when unset - require_api_token() passes through when RSS_API_TOKEN is not configured - merge main (13 commits: Pydantic validation, reauth, URL encoding, etc.) - update tests: auth off by default, auth-specific tests enable token at runtime - update docker-compose: RSS_API_TOKEN defaults to empty (no crash) - update README and .env.example: document optional nature
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
Merges
codex/add-api-authentication-with-testswith the latestmain(13 commits ahead) and makesRSS_API_TOKENoptional.When
RSS_API_TOKENis not set, the API works exactly as before — no authentication required. Set it to a long random secret to requireAuthorization: Bearer <token>on/freshrss/unread.Changes
RSS_API_TOKENis optional — removed from the required-env startup checkrequire_api_token()passes through when token is not configuredmain(Pydantic validation, reauth, URL encoding, etc.)main.py,tests/test_main.py,docker-compose.yml,README.mddocker-compose.ymluses${RSS_API_TOKEN:-}— safe default to emptytest_unread_allows_requests_when_token_not_configured— proves no-auth mode worksDocker Image Impact
RSS_API_TOKEN— backward compatibleRSS_API_TOKEN, auth is enforced; if not, everything works as todayTest Plan