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

Expose EnableUnsecuredResponse in SecurityBindingElement and add unit test #5176

Merged
merged 2 commits into from
Jul 3, 2023

Conversation

imcarolwang
Copy link
Contributor

Relates to #4817, #3705.

Note:
#4817 mentioned to expose both AllowInsecureTransport & EnableUnsecuredResponse, this PR only exposes EnableUnsecuredResponse since the impementation of property AllowInsecureTransport doesn't exist in the class on WCF core, it needs to be discussed whether to add it.

@HongGit HongGit requested a review from mconnew June 20, 2023 03:36
@HongGit
Copy link
Contributor

HongGit commented Jun 29, 2023

@imcarolwang can you please create a TWMC and send a invalid credentials? Service will reply a fault, toggle the value of the property and you should get two different exceptions.

@imcarolwang
Copy link
Contributor Author

@imcarolwang can you please create a TWMC and send a invalid credentials? Service will reply a fault, toggle the value of the property and you should get two different exceptions.

I don't quite understand what TWMC stands for, I added a scenario test base on my understanding of the comments, and for different settings of EnableUnsecuredResponse the test does get different exception when sending invalid client credential.

@mconnew
Copy link
Member

mconnew commented Jun 30, 2023

TWMC means SecurityMode.TransportWithMessageCredentials. The custom binding you used is equivalent to what you can get from using TWMC so your test matches what was asked.

@imcarolwang imcarolwang merged commit b90ebc9 into dotnet:main Jul 3, 2023
@imcarolwang imcarolwang deleted the issue4817 branch December 14, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants