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

SAML Gap Analysis #4

Open
timcappalli opened this issue Nov 20, 2024 · 18 comments
Open

SAML Gap Analysis #4

timcappalli opened this issue Nov 20, 2024 · 18 comments

Comments

@timcappalli
Copy link
Member

Based on the discussion on yesterday's call, let's use this issue to start tracking down some technical reasons why SAML may be preferred over OIDC in some deployments.

@aaronpk
Copy link
Collaborator

aaronpk commented Nov 20, 2024

IdP-initiated login

The biggest feature of SAML I hear as an argument for it over OIDC is IdP-initiated login. While it works in OIDC a technically different way than SAML, it is a feature described in OIDC here.

@aaronpk
Copy link
Collaborator

aaronpk commented Nov 20, 2024

To reiterate what I said in the call: while there are certainly some ways to use OIDC in a way that is less secure than SAML, I want to identify all those gaps, and write language into the IPSIE profile of OIDC that makes it so only the secure ways of doing OIDC are allowed in IPSIE.

@sakimura
Copy link
Member

sakimura commented Nov 20, 2024 via email

@aaronpk
Copy link
Collaborator

aaronpk commented Nov 20, 2024

Sorry for the confusion Nat, my two comments here are unrelated. I agree that OIDC's IdP-initiated login is more secure than SAML's. However it was brought up on the call that there are some other ways in which SAML is more secure than some configurations of OIDC, so I want to identify that list so we can make sure to exclude the less-secure options from the OIDC profile.

@sakimura
Copy link
Member

sakimura commented Nov 20, 2024 via email

@sbroddy
Copy link

sbroddy commented Nov 20, 2024

IdP initiated login to SAML resources has long been frowned on, despite various vendors' encouragement of the practice. Just one of a multitude of references: link

In my ecosystem, it is rarely used, but on occasion there are RPs that for whatever reason cannot support SP initiated. One particular time reporting system comes to mind, though this has been resolved in later versions of their application.

In my biased opinion, we should not be encouraging IdP initiated SAML today if there is any concern over security.

Back to the original start of this issue, I operate in a SAML federation with >1,000 enterprises, ~700 IdPs, and >6,000 RPs/SPs. And that's before I include my international SAML federation (order of 6,000 IdPs and ~80 interfederated federations). Expecting this number of enterprises and resources to pivot in any near term timeframe is not really reasonable. A pivot of this sort would be akin to IPv4 to IPv6 migrations.

@aaronpk
Copy link
Collaborator

aaronpk commented Nov 20, 2024

I appreciate the migration challenge issue, but setting that aside, I was hoping to learn more about the technical features of SAML that lead it to be preferred over OIDC.

@sbroddy
Copy link

sbroddy commented Nov 20, 2024

I don't know enough about OIDC to effectively weigh in here, but I'm sure there are significant gaps between the two as SAML is used in my ecosystem, and at the scale at which we use it. I'm starting some of these gap conversations amongst colleagues and may have more to weigh in here in the future.

@dickhardt
Copy link
Contributor

Q: is IPSIE guidance for new deployments, or is guidance for how existing deployments can become more secure?

If for new deployments, I believe we want the simplest implementation that provides the desired security. That favors OIDC.

For the latter, one must take into account what is deployed, which favors SAML.

Allowing one of the other requires an IdP to support both, which increases the complexity and attack surface.

Perhaps there should be two different IPSIE specs. One that is SAML based and one that is OIDC based?

The big IdPs deployments will likely support both.

If we take that approach, a SAML task force and a OIDC task force may be the way to divide and conquer the work.

@someknowledge
Copy link

someknowledge commented Nov 24, 2024

Should we provide requirements first and based on those requirements we can choose to keep SAML or not. While there is a security concern about IdP initiated calls, we should not ignore the use case since such use case utilized by many sites.

@dickhardt
Copy link
Contributor

If a goal is for existing SAML deployments to upgrade to a more secure and best practice, not allowing SAML would likely be a non-starter for existing deployments.

Perhaps call it IPSIE for Legacy Deployments :)

@someknowledge
Copy link

Is IPSIE backbone OIDC as protocol? If yes, than we should have it in the charter. Otherwise, why are we trying to address multiple security requirements with existing protocol, unless we want to extend the protocol, which will require input from existing body.

@timcappalli
Copy link
Member Author

timcappalli commented Nov 25, 2024

is IPSIE guidance for new deployments, or is guidance for how existing deployments can become more secure?

For version 1, I'd like to see us focus on new deployments. I'd like us to be able to answer the question of: "I'm building a B2B SaaS app. Which protocols do I need to implement and what are the best practices for integrating with an enterprise identity provider?"

Working to answer this question provides a very clear, focused scope that will allow us to move quickly on a first version.

@Tom-MITRE
Copy link

Would it be helpful to collect relevant Enterprise SAML profiles in use, now, as a baseline?

The DRAFT of NIST SP 800-63C-4 introduces comparison across implementations of federation that employ OpenID Connect and SAML (see table).
The table is very high level but identifies the Artifact Binding specification of SAML allows for a back-channel presentation of assertions consistent with that FAL2 requirement: https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf
ACRMinProfile highlights a critical need for OIDC-SAML parity and interoperability.

IPSIE may benefit from a comparison of security features and limitations of OpenID and SAML. Is there an updated SAML 2.0 profile with "2024 security tailoring" applied that we could use as a baseline? Is there a SAML BCP?

The FICAM SAML 2.0 WebSSO Profile is only available from archives at the moment:
https://info.idmanagement.us/2012/10/what-are-ficam-technical-profiles-and.html
https://web.archive.org/web/20130214055629/https://www.idmanagement.gov/documents/SAML20_Web_SSO_Profile.pdf
The FICAM profile cites the Liberty Alliance eGov profile:
https://web.archive.org/web/20220121012046/https://www.projectliberty.org/liberty/content/download/4711/32210/file/Liberty_Alliance_eGov_Profile_1.5_Final.pdf

@ve7jtb
Copy link

ve7jtb commented Nov 26, 2024 via email

@sbroddy
Copy link

sbroddy commented Nov 27, 2024

@Tom-MITRE

Would it be helpful to collect relevant Enterprise SAML profiles in use, now, as a baseline?

As John mentions, I would take a look at SAML2int. There are also a plethora of REFEDS profiles that have been developed in the R&E space in the last decade. Many of these are specific to R&E, but some equivalent profiles to them is something to think about in IPSIE for SAML IMO.

For example: The REFEDS assurance framework. RAF

Listing of their specifications: https://refeds.org/specifications

The table is very high level but identifies the Artifact Binding specification of SAML allows for a back-channel presentation of assertions consistent with that FAL2 requirement

Is your reading of 800-63 that to achieve FAL2, that the backchannel is required? That was not my interpretation, only that encryption of the assertion is required and it could be presented via the front channel. I could be wrong though. In any case, back-channel is still supported in federations like InCommon/EduGAIN but has long since fallen out of favor along with things like ECP.

@Tom-MITRE
Copy link

@sbroddy
From my perspective, IPSIE can climb on the shoulders of giants. As we develop the use cases, I'd suggest we're looking for strong tailoring options at FAL2 to provide enterprise-level security consistent with tailoring AAL2 to require phishing resistance. Selected tailoring should include core options and extensions that both RP and IdP vendors and open source either support or will support.

For OAuth 2.0 and OpenID Connect, there's been extensive security tailoring in FAPI, iGov, and MITRE Enterprise Mission-tailored profiles, and those facilitate additional tailoring within downstream profiles. There's no greenfield required for enterprise tailoring of OAuth and OIDC for IPSIE.

As you've indicated, there is an enormous install base of SAML, including (government) enterprises. If SAML profiles are used in government to deploy SAML services, or are supported by enterprise vendor products, identifying a short list would seem to be very helpful context, independent of the WG's determination about SAML 2.0 as a part of a profile bundle,

"Injection protection" is required for FAL2 in Rev4 (DRAFT), which most readily maps to backchannel. There may be other methods in SAML 2.0 to achieve Injection Protection.

I didn't know about SAML2int and I wouldn't be surprised if there is an active "SAML 2.0 Best Common Practice" effort, as well...

@sbroddy
Copy link

sbroddy commented Nov 27, 2024

"Injection protection" is required for FAL2 in Rev4 (DRAFT), which most readily maps to backchannel.

Encryption of the assertion prevents injection, which can be done through the front-channel. The RP has to support encrypted assertions, which is hit and miss. Pretty much all of the open source SAML implementations support it though. And reading that table, it seems they're more worried about SP initiated SAML than anything. But I'd have to re-read it to be sure.

Edit: upon a re-read, encrypted assertions don't even seem to be required. It's mainly about RP/SP initiated and the nonce. Both of which my existing deployed IdP and at least some of my RPs already meet.

The use of a signed front channel response from the IdP with an RP-provided nonce covered by the signature, which prevents the attacker from injecting an assertion reference from one session to another.

<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="https://xxx.xxx.edu/xxx" ID="_eab05671e00f394fd709d0cc8b5b2977" InResponseTo="_2cf227b3505ab476839e9b82bc3930aee117d85863" IssueInstant="2024-11-27T21:46:48.023Z" Version="2.0" >

The nonce, generated by the RP, and then returned within the "InResponseTo" is included within the signed XML generated by the IdP. In that particular case, the RP also accepts encrypted assertions, and my IdP also encrypts, though that isn't explicitly required for FAL2.

I didn't know about SAML2int and I wouldn't be surprised if there is an active "SAML 2.0 Best Common Practice" effort, as well...

Have a look at InCommon's Baseline Expectations also. It's also federation specific, but there are a few useful items there. Everyone in InCommon agrees to meet a minimum operational/security baseline. See also things like the AARC Blueprint, Cappucino/Esspresso assurance levels out of Geant, etc.

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

No branches or pull requests

8 participants