Skip to content
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

[ELY-2310] Enhance DigestAuthenticationMechanismTest to compute digest values instead of using hard coded values #1685

Merged
merged 1 commit into from May 17, 2023

Conversation

miador
Copy link
Contributor

@miador miador commented Mar 25, 2022

Trying to solve https://issues.redhat.com/browse/ELY-2310
According to spec, the A1 value should be unq(username) ":" unq(realm) ":" passwd. I've refactored the A1 according to that and since no password needed in encode i removed if block.

@Skyllarr
Copy link
Contributor

Skyllarr commented Mar 25, 2022

Hello @miador . Thank you for PR! Pls change your commit title to have the issue number at the beginning, Thanks!

import static org.wildfly.security.http.HttpConstants.SHA256;
import static org.wildfly.security.http.HttpConstants.SHA512_256;
import static org.wildfly.security.http.HttpConstants.UNAUTHORIZED;
import static org.wildfly.security.http.HttpConstants.*;
Copy link
Contributor

@Skyllarr Skyllarr Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor, please do not use * in imports

@@ -19,7 +19,6 @@
package org.wildfly.security.http.digest;

import mockit.integration.junit4.JMockit;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miador Just minor, this space should be added back

}

@Test
public void testRfc2617EncodedQuery() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miador Why is this test method removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry. Adding back

" opaque=\"00000000000000000000000000000000\",\n" +
" algorithm=MD5"
}, new URI(uri));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miador testRfc2617EncodedPath test method was removed, maybe you need to rebase on 1.x?

@miador
Copy link
Contributor Author

miador commented Mar 26, 2022

The password value for SHA256 is with lowecase "o", so the password should be Circle of Life.
Please see: https://www.rfc-editor.org/errata_search.php?rfc=7616&eid=4495

@miador miador requested a review from Skyllarr March 26, 2022 11:03
@Skyllarr
Copy link
Contributor

The password value for SHA256 is with lowecase "o", so the password should be Circle of Life. Please see: https://www.rfc-editor.org/errata_search.php?rfc=7616&eid=4495

@miador Currently some tests use uppercase Of and some lowercase of. It is not important as long as both the server's handler and client use the same. This PR LGTM, thank you.

@Skyllarr Skyllarr added the +1 DV label Mar 29, 2022
@miador
Copy link
Contributor Author

miador commented Oct 21, 2022

Hello,
I am doing a cleanup through my PRs. Will this be merged? If not, i can close.

@Skyllarr
Copy link
Contributor

@fjuma Please review

Copy link
Contributor

@fjuma fjuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much @miador and apologies for the delayed review!

@Skyllarr Skyllarr merged commit 471ebeb into wildfly-security:1.x May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants