Skip to content

Support Digest authentication with SHA-256Β #13127

Closed

Description

@sbordet

Jetty version(s)
12.1.x

Enhancement Description
RFC7616 now specifies that Digest authentication can be performed with SHA-256 (was MD5 only before).

Jetty's client can already support that, but on the server the MD5 algorithm is hardcoded, while should be configurable.

Activity

  1. zzzi2p commented on May 13, 2025

    @zzzi2p

    I was invited to submit a PR for this based on my code at https://github.com/zzzi2p/jetty-multiauth . Unfortunately I won't be able due to lack of time and ability to test because my project is on 9.3/9.4. So I offer my code for some motivated person to adapt into a PR.

    My class is an all-in-one authenticator that does SHA256, MD5, and Basic, if enabled. A couple things to consider:

  2. joakime commented on May 13, 2025

    @joakime
    Contributor
  3. zzzi2p commented on May 13, 2025

    @zzzi2p

    of course; we're on it for Java 8 support.

  4. arsenalzp commented on May 25, 2025

    @arsenalzp
    Contributor

    Hello,
    Do you need support on this?

  5. sbordet commented on May 26, 2025

    @sbordet
    ContributorAuthor

    @arsenalzp yes we need to implement this.
    On the client, it is already implemented, but on the server it's hardcoded and we would like to have it configurable.

    Have a look at org.eclipse.jetty.security.authentication.DigestAuthenticator, in particular:
    https://github.com/jetty/jetty.project/blob/jetty-12.0.21/jetty-core/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java#L180

    A similar fix should be applied to org.eclipse.jetty.ee9.security.authentication.DigestAuthenticator.

    A test case using the client should be added in the ee9, ee10, ee11 oej.eeN.test.DigestPostTest.

  6. arsenalzp commented on May 27, 2025

    @arsenalzp
    Contributor

    /assign

  7. arsenalzp commented on May 31, 2025

    @arsenalzp
    Contributor

    @arsenalzp yes we need to implement this. On the client, it is already implemented, but on the server it's hardcoded and we would like to have it configurable.

    Have a look at org.eclipse.jetty.security.authentication.DigestAuthenticator, in particular: https://github.com/jetty/jetty.project/blob/jetty-12.0.21/jetty-core/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/DigestAuthenticator.java#L180

    A similar fix should be applied to org.eclipse.jetty.ee9.security.authentication.DigestAuthenticator.

    A test case using the client should be added in the ee9, ee10, ee11 oej.eeN.test.DigestPostTest.

    Hello,
    I've just seen there is hardcoded MD5 algorithm in digest authentication DigestAuthenticator class. It is in 12.1.x branch, so no changes since 12.0.x.

  8. sbordet commented on Jun 3, 2025

    @sbordet
    ContributorAuthor

    @arsenalzp yes, please make the changes in the jetty-12.1.x branch.

  9. arsenalzp commented on Jun 4, 2025

    @arsenalzp
    Contributor

    Sure!

  10. moved this to πŸ— In progress in Jetty 12.1.0 - (FROZEN)on Jun 11, 2025
  11. added a commit that references this issue on Jul 2, 2025
  12. sbordet commented on Jul 2, 2025

    @sbordet
    ContributorAuthor

    Implemented by #13236.

  13. moved this from πŸ— In progress to βœ… Done in Jetty 12.1.0 - (FROZEN)on Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions