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

Uncomment MessageCredentialType.IssuedToken for WSHttpBinding #1324

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

emre-toraman
Copy link

Fixes #1317

@emre-toraman
Copy link
Author

@dotnet-policy-service agree company="SOTI"

@emre-toraman emre-toraman marked this pull request as ready for review February 6, 2024 13:15
@emre-toraman
Copy link
Author

@birojnayak Thank you for your comment in #1317 (comment), I created the PR as you suggested. Can you please review and advise?

@g7ed6e
Copy link
Collaborator

g7ed6e commented Feb 8, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@birojnayak
Copy link
Collaborator

@emre-toraman have you tested internally ? Is there a possibility to add test ?

@emre-toraman
Copy link
Author

emre-toraman commented Feb 12, 2024

@birojnayak I have tested two things internally:

  • I was able to start WebApplication with a service that uses
var httpBinding = new WSHttpBinding(SecurityMode.TransportWithMessageCredential);
httpBinding.Security.Message.ClientCredentialType = MessageCredentialType.IssuedToken;
  • I was able to create binding elements from above binding and use that collection to create a CustomBinding:
var bindingElementCollection = httpBinding.CreateBindingElements()

I'm not sure how to create a client for this service though. Do you have any client sample for this configuration?

@birojnayak
Copy link
Collaborator

@emre-toraman I assume you have a client which is connecting to your existing WCF service, you can run the same client pointing to CoreWCF service. If that works let me know, happy to approve the PR.

I understand testing token is bit tricky and needs set up. While porting WS-Fed binding, I had written some test here. See if this could be useful.

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.

[Bug]: Can not use MessageCredentialType.IssuedToken for WSHttpBinding
3 participants