[MNT] Disable authentication by default#229
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideDefault authentication behavior is changed to be disabled unless explicitly enabled via NB_ENABLE_AUTH, and tests are updated to validate the new defaults and remove an obsolete warning filter. Flow diagram for NB_ENABLE_AUTH-based authentication toggleflowchart TD
A[Start_API_process] --> B[Read_environment_variable_NB_ENABLE_AUTH]
B --> C{Is_NB_ENABLE_AUTH_set?}
C -- No_unset --> D[Use_default_value_False]
C -- Yes_set --> E[Convert_value_to_lowercase]
D --> F[AUTH_ENABLED_is_False]
E --> G{Value_equals_string_true?}
G -- Yes --> H[AUTH_ENABLED_is_True]
G -- No --> F
subgraph Request_handling
I[Incoming_API_request] --> J{AUTH_ENABLED_is_True?}
J -- Yes --> K[Enforce_authentication_and_validate_token]
J -- No --> L[Bypass_authentication_checks]
K --> M[Return_response]
L --> M
end
F --> I
H --> I
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
surchs
approved these changes
Mar 4, 2026
Contributor
surchs
left a comment
There was a problem hiding this comment.
Thanks @alyssadai for the quick fix!
🧑🍳
Contributor
|
🚀 PR was released in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
- Coverage 98.37% 98.17% -0.20%
==========================================
Files 30 30
Lines 984 987 +3
==========================================
+ Hits 968 969 +1
- Misses 16 18 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
NB_ENABLE_AUTHto False #226Changes proposed in this pull request:
NB_ENABLE_AUTHenvironment variable is unsetChecklist
This section is for the PR reviewer
[ENH],[FIX],[REF],[TST],[CI],[MNT],[INF],[MODEL],[DOC]) (see our Contributing Guidelines for more info)skip-release(to be applied by maintainers only)Closes #XXXXFor new features:
For bug fixes:
Summary by Sourcery
Set API authentication to be disabled by default and clean up related tests.
Bug Fixes:
Enhancements:
Tests: