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

Support SAML assertion encryption as IdP #1741

Closed
3 tasks done
annismckenzie opened this issue Jun 1, 2022 · 3 comments
Closed
3 tasks done

Support SAML assertion encryption as IdP #1741

annismckenzie opened this issue Jun 1, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@annismckenzie
Copy link

annismckenzie commented Jun 1, 2022

Support SAML assertion encryption as IdP

Problem

The SAML standard allows for encrypting the assertion in the SAML response. The Auth0 docs on signing and encrypting SAML requests are very comprehensive. FusionAuth currently does not support encrypted SAML assertions. FusionAuth already supports signing SAML authentication requests and handles signed SAML assertions.

Solution

When FusionAuth is acting as the SAML IdP:

  1. Allow configuring a certificate in Key Master that is used to encrypt assertions
  2. Update Application configuration to provide settings for SAML encryption
  3. Generate a symmetric key to encrypt the assertion according to the application configuration. A new key is used for each assertion
  4. Use the configured certificate from Key Master to encrypt the symmetric key and include it in the SAML response

Alternatives/workarounds

none

Additional context

How assertions should be encrypted is hard to figure out from the documentation available online. A lot of places mention using AES128 or AES256. AES is symmetric so it can't be the key included in the metadata as mentioned above. https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/sign-and-encrypt-saml-requests#send-encrypted-saml-authentication-assertions mentions that it uses AES256 for encrypting the assertion and RSA-OAEP for the key transport (presumably the key used for encrypting the assertion). That would mean the certificate generated must adhere to that so it can be used.

It's also possible to encrypt the initial SAML authentication request using a public key provided by the IdP. That would be a separate feature request.

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

Documentation

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

@annismckenzie
Copy link
Author

annismckenzie commented Jun 1, 2022

https://backstage.forgerock.com/docs/am/7/saml2-guide/saml2-encryption.html at the top in How Does Encryption Work? explains it better. Pretty involved both on the IdP as well as on the FusionAuth side.

@robotdan robotdan added this to Backlog in FusionAuth Issues via automation Jul 13, 2023
@robotdan robotdan added this to the 1.47.0 milestone Jul 13, 2023
@robotdan robotdan moved this from Backlog to Reviewer approved in FusionAuth Issues Jul 13, 2023
@robotdan robotdan added the enhancement New feature or request label Jul 13, 2023
@spwitt spwitt changed the title Support SAML assertion encryption Support SAML assertion encryption as IdP Jul 21, 2023
@spwitt
Copy link

spwitt commented Jul 21, 2023

We are preparing a release that will include the ability for FusionAuth to encrypt SAML assertions when acting as the SAML IdP. This issue has been updated to focus on that use case. Two other issues have been created to support encrypted assertions when FusionAuth is acting as the SAML SP and to update SAML metadata response(s) according to the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
FusionAuth Issues
  
Delivered
Development

No branches or pull requests

4 participants