This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
[Schema] Return 401 error when no HTTP authentication is configured #1802
Merged
BewareMyPower
merged 1 commit into
streamnative:master
from
BewareMyPower:bewaremypower/schema-auth-failure
Apr 23, 2023
Merged
[Schema] Return 401 error when no HTTP authentication is configured #1802
BewareMyPower
merged 1 commit into
streamnative:master
from
BewareMyPower:bewaremypower/schema-auth-failure
Apr 23, 2023
Conversation
This file contains 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
Demogorgon314
previously approved these changes
Apr 21, 2023
There are some failed tests:
I will fix them soon. |
BewareMyPower
force-pushed
the
bewaremypower/schema-auth-failure
branch
2 times, most recently
from
April 23, 2023 03:38
caddc0e
to
6d3218e
Compare
Codecov Report
@@ Coverage Diff @@
## master #1802 +/- ##
============================================
+ Coverage 16.03% 16.04% +0.01%
Complexity 626 626
============================================
Files 165 165
Lines 12329 12321 -8
Branches 1128 1125 -3
============================================
Hits 1977 1977
+ Misses 10189 10181 -8
Partials 163 163 |
### Motivation When authentication is enabled, if the Schema REST requests were sent without HTTP authentication header, the Schema Registry will return 404, rather than 401. ### Modifications - When `SchemaStorageException` is thrown, build the response with the error code and the exception message. - Add `testSchemaNoAuth` to verify 401 unauthorized will be returned.
BewareMyPower
force-pushed
the
bewaremypower/schema-auth-failure
branch
from
April 23, 2023 04:50
6d3218e
to
1a0a58c
Compare
@Demogorgon314 I split the unrelated logic of this PR into another PR: #1807. PTAL again. |
Demogorgon314
approved these changes
Apr 23, 2023
BewareMyPower
added a commit
that referenced
this pull request
Apr 24, 2023
…1802) [Schema] Return 401 error when no HTTP authentication is configured ### Motivation When authentication is enabled, if the Schema REST requests were sent without HTTP authentication header, the Schema Registry will return 404, rather than 401. ### Modifications - When `SchemaStorageException` is thrown, build the response with the error code and the exception message. - Add `testSchemaNoAuth` to verify 401 unauthorized will be returned. (cherry picked from commit c41ad06)
BewareMyPower
added a commit
that referenced
this pull request
Apr 24, 2023
…1802) [Schema] Return 401 error when no HTTP authentication is configured ### Motivation When authentication is enabled, if the Schema REST requests were sent without HTTP authentication header, the Schema Registry will return 404, rather than 401. ### Modifications - When `SchemaStorageException` is thrown, build the response with the error code and the exception message. - Add `testSchemaNoAuth` to verify 401 unauthorized will be returned. (cherry picked from commit c41ad06)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
cherry-picked/branch-2.11
cherry-picked/branch-3.0
no-need-doc
This pr does not need any document
release/2.11
release/3.0
type/bug
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.
[Schema] Return 401 error when no HTTP authentication is configured
Motivation
When authentication is enabled, if the Schema REST requests were sent without HTTP authentication header, the Schema Registry will return 404, rather than 401.
Modifications
SchemaStorageException
is thrown, build the response with the error code and the exception message.testSchemaNoAuth
to verify 401 unauthorized will be returned.Documentation
Check the box below.
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
(Please explain why)
doc
(If this PR contains doc changes)