Repository navigation
Conversation
3 tasks
AadarshM07
self-requested a review
October 29, 2026 12:08
AadarshM07
approved these changes
Oct 29, 2026
AadarshM07
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the changes on feat/70-quick-setup against develop. Everything looks good to me. tested the changes locally, test and CI passes as well
This branch has not been deployed
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.
Closes #70
What this adds
New
nitrostack/auth/setup.py, exported fromnitrostack:setup_jwt_auth,setup_api_key_auth,setup_oauth_auth: each returns adictof keyword arguments for the matching module, soJWTModule.for_root(**setup_jwt_auth())works. Secrets in the dict areSecretValue(from [auth]SecretValuewrapper for secrets #69), so printing the config never shows them. Plainstrsecrets are accepted and wrapped.validate_auth_env(kind) -> (valid, missing): lists every missing variable, not just the first. Where any one of several variables would do (for exampleJWKS_URIor an introspection endpoint) they are shown joined with "or".print_auth_setup_instructions(kind): prints the steps; never prints a secret.generate_test_credentials(): randomSecretValueJWT secret and API key on every call, documented as test-only, never printed.Differences from closed PR #4
PR #4's
setup.pyadded Starlette middleware from amiddleware.pythat does not exist ondevelop. The current modules are DI-based, so these helpers return config for the modules instead of patching an app. camelCase aliases andprintcalls are dropped.Tests
tests/test_auth_setup.py(19 tests): each helper's output configures its module and the resulting service works (JWT sign and verify, API key list, OAuth fields), all missing variables are reported, partial and complete environments, random test credentials, nothing printed or logged, and unknown kind. Full suite: 844 passed locally (--timeout=60).Notes
JWT_SECRET,API_KEY/API_KEY_<n>,RESOURCE_URI,AUTH_SERVER_URL,JWKS_URI,OAUTH_INTROSPECTION_ENDPOINT).