-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for Digest
authorization
#4339
Merged
jamesgeorge007
merged 21 commits into
hoppscotch:next
from
anwarulislam:feat/digest-auth
Oct 29, 2024
Merged
feat: add support for Digest
authorization
#4339
jamesgeorge007
merged 21 commits into
hoppscotch:next
from
anwarulislam:feat/digest-auth
Oct 29, 2024
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
// HA1 = MD5(username:realm:password) | ||
const ha1 = crypto | ||
.createHash("md5") | ||
.update(`${username}:${realm}:${password}`) |
Check failure
Code scanning / CodeQL
Use of password hash with insufficient computational effort
Password from [an access to password](1) is hashed insecurely.
Password from [an access to password](2) is hashed insecurely.
// HA1 = MD5(username:realm:password) | ||
const ha1 = crypto | ||
.createHash("md5") | ||
.update(`${username}:${realm}:${password}`) |
Check failure
Code scanning / CodeQL
Use of a broken or weak cryptographic algorithm
[A broken or weak cryptographic algorithm](1) depends on [sensitive data from an access to username](2).
[A broken or weak cryptographic algorithm](1) depends on [sensitive data from an access to username](3).
anwarulislam
force-pushed
the
feat/digest-auth
branch
from
September 30, 2024 06:45
02af23e
to
7e6c7eb
Compare
anwarulislam
force-pushed
the
feat/digest-auth
branch
from
October 23, 2024 06:55
28f79b0
to
ee27463
Compare
anwarulislam
requested review from
AndrewBastin and
jamesgeorge007
as code owners
October 23, 2024 06:57
jamesgeorge007
approved these changes
Oct 23, 2024
jamesgeorge007
force-pushed
the
feat/digest-auth
branch
from
October 28, 2024 08:21
431e96b
to
ce61075
Compare
jamesgeorge007
force-pushed
the
feat/digest-auth
branch
from
October 28, 2024 09:03
ce61075
to
c36f78b
Compare
- Ensure failures reported in pre/post request scripts and request execution results in the CLI failing with a non-zero exit code. - Remove redundant test case and related CLI test suite updates. - Clean up.
…eptor Show a suitable warning via the inspector.
jamesgeorge007
force-pushed
the
feat/digest-auth
branch
from
October 29, 2024 06:30
8aa18a9
to
ee97231
Compare
nivedin
approved these changes
Oct 29, 2024
jamesgeorge007
changed the title
feat: digest authentication added to the request auth types
feat: add support for Oct 29, 2024
Digest
Authorization
jamesgeorge007
changed the title
feat: add support for
feat: add support for Oct 29, 2024
Digest
AuthorizationDigest
authorization
amk-dev
pushed a commit
to amk-dev/hoppscotch
that referenced
this pull request
Nov 26, 2024
Co-authored-by: jamesgeorge007 <[email protected]> Co-authored-by: nivedin <[email protected]>
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 HFE-570
What's changed
This PR introduces Digest authentication as new request auth types.
Note for reviewers
Digest auth works in two stages.
First, it requests for an initial response, where we get necessary information like realm, nonce, algorithm, etc., from the server in the header WWW-Authenticate.
Then, we have to parse information from that header. Finally, we have to generate an authorization header and request with that auth header in the Authorization header property.
To test digest auth in CLI
hopp test src/__tests__/e2e/fixtures/collections/digest-auth-coll.json -e src/__tests__/e2e/fixtures/environments/digest-auth-envs.json