dotnet / dotnet/wcf

Auth scheme Digest unauthorized on UWP

Open
#3,333 2 comments 0 reactions 1 assignee Claimed by @StephenBonikowsky View on GitHub
Backlog bug
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

Test case [Http_ClientCredentialTypeTests.DigestAuthentication_Echo_RoundTrips_String_No_Domain](https://github.com/dotnet/wcf/blob/master/src/System.Private.ServiceModel/tests/Scenarios/Security/TransportSecurity/Http/ClientCredentialTypeTests.4.1.0.cs#L20) fails on UWP runs but not on any other framework.

The only [other Digest test](https://github.com/dotnet/wcf/blob/master/src/System.Private.ServiceModel/tests/Scenarios/Security/TransportSecurity/Https/ClientCredentialTypeTests.4.1.0.cs#L213) fails its conditions so it is always skipped.

I was able to reproduce this locally...

- clean.cmd -all
- sync.cmd -p -- /p:ArchGroup=x64 /p:RuntimeOS=win10
- build.cmd -framework=uap -buildArch=x64 -Release -- /p:RuntimeOS=win10
- build-tests.cmd -framework=uap -buildArch=x64 -Release -Outerloop -- /p:RuntimeOS=win10 /p:ServiceUri=wcfcoresrv5.cloudapp.net/wcftestservice1 /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:SSL_Available=true /m:1

Error message...

> System.ServiceModel.Security.MessageSecurityException : The HTTP request is unauthorized with client authentication scheme 'Digest'. The authentication header received from the server was 'Digest realm=\"ec558\", nonce=\"MS8xMS8yMDE5IDExOjQyOjM4IEFN\", opaque=\"0000000000000000\", stale=false, algorithm=MD5, qop=\"auth\"'.

Call Stack...

```
at System.ServiceModel.Channels.HttpResponseMessageHelper.ValidateAuthentication()
at System.ServiceModel.Channels.HttpResponseMessageHelper.ParseIncomingResponse(TimeoutHelper timeoutHelper)
at System.ServiceModel.Channels.HttpChannelFactory1.HttpClientRequestChannel.HttpClientChannelAsyncRequest.ReceiveReplyAsync(TimeoutHelper timeoutHelper)
at System.ServiceModel.Channels.RequestChannel.RequestAsync(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.RequestAsyncInternal(Message message, TimeSpan timeout)
at System.Runtime.TaskHelpers.WaitForCompletionNoSpin[TResult](Task1 task)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(MethodCall methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(MethodInfo targetMethod, Object[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args) in E:\A\_work\6\s\corefx\src\System.Reflection.DispatchProxy\src\System\Reflection\DispatchProxyGenerator.cs:line 162
at generatedProxy_1.Echo(String )
at Http_ClientCredentialTypeTests.DigestAuthentication_Echo_RoundTrips_String_No_Domain()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.