playframework / playframework/play-ws
Got "Digest algorithm not supported: md5" on try use DIGEST
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 224
- Forks
- 92
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 28
Description
As I understand it, when calling the ws.url().withAuth(username, password, WSAuthScheme.DIGEST) function, the MD5 encryption algorithm is selected by default, but it is not supported and I get an error. How can I force DIGEST to use SHA or allow configuration to use MD5?
The project uses:
scala - 2.13.8
play - 2.8.16
jvm - openjdk 11.0.16.1 2022-08-12 LTS
**UPD error log
[debug] p.s.a.o.a.n.r.NettyRequestSender - Digest algorithm not supported: md5
java.lang.UnsupportedOperationException: Digest algorithm not supported: md5
at play.shaded.ahc.org.asynchttpclient.Realm$Builder.ha1(Realm.java:504)
at play.shaded.ahc.org.asynchttpclient.Realm$Builder.newResponse(Realm.java:542)
at play.shaded.ahc.org.asynchttpclient.Realm$Builder.build(Realm.java:565)
at play.shaded.ahc.org.asynchttpclient.netty.handler.intercept.Unauthorized401Interceptor.exitAfterHandling401(Unauthorized401Interceptor.java:117)
at play.shaded.ahc.org.asynchttpclient.netty.handler.intercept.Interceptors.exitAfterIntercept(Interceptors.java:89)
at play.shaded.ahc.org.asynchttpclient.netty.handler.HttpHandler.handleHttpResponse(HttpHandler.java:78)
at play.shaded.ahc.org.asynchttpclient.netty.handler.HttpHandler.handleRead(HttpHandler.java:140)
at play.shaded.ahc.org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78)
at play.shaded.ahc.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
at play.shaded.ahc.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
[debug] p.s.a.o.a.n.c.ChannelManager - Closing Channel [**secure ip]
[debug] p.s.a.o.a.n.h.HttpHandler - Unexpected I/O exception on channel [id: 0x27d4ea64, **secure ip ! **secure ip]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ws.url().withAuth(..., WSAuthScheme.DIGEST) call and follow the reported play.shaded.ahc.org.asynchttpclient Realm$Builder.ha1 path. Determine how the supported digest algorithm is selected or configured, then verify that DIGEST authentication works with the requested algorithm without the reported unsupported-algorithm error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100