-
Notifications
You must be signed in to change notification settings - Fork 562
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
[P2] Support System.ServiceModel.Channels.SecurityBindingElement #3860
Comments
Will this also add support for the derived class AsymmetricSecurityBindingElement? For example, below is effectively the one and only code block that is preventing us from targeting .NET Standard and running on .NET Core. I would be forever grateful if this would be supported with your upcoming release in some way.
|
@krispenner, I have a concern about whether that will enable you because you are setting the MessageProtectionOrder. That implies you are using security mode Message, but we can only support TransportWithMessageCredential (which doesn't sign or encrypt the message). Can you please provide you complete binding configuration so I can validate that there's nothing else missing. |
@mconnew, thank you for you reply. We are using certificate based mutual authentication. We were given the code below from the party that is hosting the service in order for us to communicate with them, they offer no other binding options. We then had to move our .NET Core hosted app on Linux App Services to .NET Framework on Windows App Services because we could not implement the below when targeting .NET Standard.
Note there is also a second line of code near the bottom that is also not supported in .NET Standard but I would assume as we are setting it to
|
@krispenner, unfortunately I have some bad news for you. The class AsymmetricSecurityBindingElement is only used when doing full message security. I was able to get TransportWithMessageCredentials working by rewriting WCF's usage of the System.IdentityModel version of SignedXml to use the System.Cryptography.Xml version instead. Unfortunately that version doesn't support all the transforms needed to support full message security. There's potential to use a SignedXml implementation from another team, but that needs some work to support WCF's usage scenario and I haven't even begun to have a serious conversation with that team about it yet. |
@mconnew |
Tracking Message security work with #3424. |
Hi @StephenBonikowsky, it looks like all this is completed now?!! :) Can you please confirm? Could you also let me know how I can track the status of the release that will contain this feature 3.1.x?? Or provided a targeted date when this will be released? Thank you so much! |
@krispenner We are getting close. The scenario is not complete end-to-end yet, I closed a bunch of the issues tracking specific APIs that we have added to the public contract already in 3.1. #3871 will likely be the final Issue to be closed when we are code complete, so you can track that. |
Sounds great, very excited! 👍 |
@krispenner, from my memory of when I investigated your scenario, I don't expect the specific scenario you listed as working as a result of #3871. I believe usage of AsymmetricSecurityBindingElement implies full message security which we still don't have any concrete plans to be able to support. |
@mconnew thanks for letting me know. Are there any high-level expectations for this to be available in .NET 5 at the latest or even that target is unlikely at this point? |
@krispenner, unfortunately our hands are tied. We depend on code which isn't in .NET Core to achieve message security. There is a potential path to bring the feature, but I'll be honest it will be a while before we can consider thinking about trying to get everything lined up for that. We have a couple of other big features we're lining up right now which will have a wider impact, but I can't talk about all of them right now. I can tell you we're bringing reliable sessions next. |
@mconnew and @StephenBonikowsky are there any new updates to share on this work? Specifically, as per my request for full message security implementation. @mconnew wrote:
If this is still not supported nor expected to be supported, then based on my sample code above can you recommend the least destructive changes to this code that would allow it to run in .NET 5 or even .NET Core 3.1? If it's just removing some extra security piece that could potentially be replaced by a similar feature but be supported I could request the vendor to make those code changes to their service. Because if they don't upgrade their service, then it will eventually be at risk when .NET Framework 4.8 stops being supported by MS. So I may have a case for them to invest in making some small code changes for that reason. |
@krispenner, you are using MessageSecurity with certificate authentication. Both the client and server are validating the other end using a certificate and then using those certificates to encrypt the communication. This is odd as you are also using an HttpsTransportBindingElement which will also encrypt the connection meaning you have redundant encryption. You are sending an encrypted message over an encrypted connection. You are also using the February 2005 versions of the protocols. A binding which will give you almost the same features is WSHttpBinding. There are 2 different ways to use WSHttpBinding. If you use SecurityMode.Transport, then it will use simply use certificates to secure the HTTPS connection and the actual messages are sent over HTTPS which will provide over the wire encryption. The client validates the server based on the server's certificate used for HTTPS and the server requires a client certificate provided as part of the HTTPS connection and validates the client based on that certificate. This is the option with the best performance. |
Thank you very much @mconnew, this is a great explanation. I'm going to take this back to them and see if they will change anything on their end based on your comments. |
If the server is a WCF server they should just be able to add another endpoint besides their existing one on a new url so existing clients will continue to work. |
Yes for sure, that is something I was also going to include in my suggestion. Thanks again, this is amazing help! |
property SecurityAlgorithmSuite DefaultAlgorithmSuite
property SecurityKeyEntropyMode KeyEntropyMode
API Notes
Implementation Notes
Already ported.
Public Contract Notes
Testing Notes
PR Links
DefaultAlgorithmSuite was added to PC via: #3875
KeyEntropyMode was added to PC via: #3900
Scenario tests tracked by: #4022
The text was updated successfully, but these errors were encountered: