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

feat: add support for saml encrypted assertions #1752

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

hf
Copy link
Contributor

@hf hf commented Aug 30, 2024

By setting the GOTRUE_SAML_ALLOW_ENCRYPTED_ASSERTIONS to true the SAML private key will be advertised as usable with encryption too.

Encrypted assertions are fairly rare these days because:

  • They make it very hard to debug what's going on.
  • HTTPS is the default protocol on the web for over 10 years, including in intranets.

Why not use a separate key?

The underlying library does not support it and there are no significant cryptological issues using the same RSA key for signatures and encryption, especially in a limited setting like this.

@hf hf requested a review from a team as a code owner August 30, 2024 13:21
@hf hf force-pushed the hf/saml-encrypted-assertions branch from 9f90a99 to b614d68 Compare August 30, 2024 13:21
@hf hf changed the title Hf/saml encrypted assertions feat: add support for saml encrypted assertions Aug 30, 2024
@coveralls
Copy link

coveralls commented Aug 30, 2024

Pull Request Test Coverage Report for Build 10663458667

Details

  • 3 of 5 (60.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 57.867%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/conf/saml.go 1 3 33.33%
Totals Coverage Status
Change from base Build 10605980831: -0.002%
Covered Lines: 9125
Relevant Lines: 15769

💛 - Coveralls

Copy link
Contributor

@J0 J0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like after this change user can use opt in to use the SAML private key for signing.

Looks fine.

@hf hf force-pushed the hf/saml-encrypted-assertions branch from b614d68 to 5aa39cb Compare September 2, 2024 08:19
@hf hf merged commit c5480ef into master Sep 2, 2024
2 checks passed
@hf hf deleted the hf/saml-encrypted-assertions branch September 2, 2024 08:26
hf pushed a commit that referenced this pull request Sep 2, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.160.0](v2.159.2...v2.160.0)
(2024-09-02)


### Features

* add authorized email address support
([#1757](#1757))
([f3a28d1](f3a28d1))
* add option to disable magic links
([#1756](#1756))
([2ad0737](2ad0737))
* add support for saml encrypted assertions
([#1752](#1752))
([c5480ef](c5480ef))


### Bug Fixes

* apply shared limiters before email / sms is sent
([#1748](#1748))
([bf276ab](bf276ab))
* simplify WaitForCleanup
([#1747](#1747))
([0084625](0084625))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
By setting the `GOTRUE_SAML_ALLOW_ENCRYPTED_ASSERTIONS` to `true` the
SAML private key will be advertised as usable with encryption too.

Encrypted assertions are fairly rare these days because:

- They make it very hard to debug what's going on.
- HTTPS is the default protocol on the web for over 10 years, including
in intranets.

**Why not use a separate key?**

The underlying library [does not support
it](https://pkg.go.dev/github.com/crewjam/saml@v0.4.14/samlsp#Options)
and there are no significant cryptological issues using the same RSA key
for signatures and encryption, especially in a limited setting like
this.
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.160.0](supabase/auth@v2.159.2...v2.160.0)
(2024-09-02)


### Features

* add authorized email address support
([supabase#1757](supabase#1757))
([f3a28d1](supabase@f3a28d1))
* add option to disable magic links
([supabase#1756](supabase#1756))
([2ad0737](supabase@2ad0737))
* add support for saml encrypted assertions
([supabase#1752](supabase#1752))
([c5480ef](supabase@c5480ef))


### Bug Fixes

* apply shared limiters before email / sms is sent
([supabase#1748](supabase#1748))
([bf276ab](supabase@bf276ab))
* simplify WaitForCleanup
([supabase#1747](supabase#1747))
([0084625](supabase@0084625))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
By setting the `GOTRUE_SAML_ALLOW_ENCRYPTED_ASSERTIONS` to `true` the
SAML private key will be advertised as usable with encryption too.

Encrypted assertions are fairly rare these days because:

- They make it very hard to debug what's going on.
- HTTPS is the default protocol on the web for over 10 years, including
in intranets.

**Why not use a separate key?**

The underlying library [does not support
it](https://pkg.go.dev/github.com/crewjam/saml@v0.4.14/samlsp#Options)
and there are no significant cryptological issues using the same RSA key
for signatures and encryption, especially in a limited setting like
this.
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.160.0](supabase/auth@v2.159.2...v2.160.0)
(2024-09-02)


### Features

* add authorized email address support
([supabase#1757](supabase#1757))
([f3a28d1](supabase@f3a28d1))
* add option to disable magic links
([supabase#1756](supabase#1756))
([2ad0737](supabase@2ad0737))
* add support for saml encrypted assertions
([supabase#1752](supabase#1752))
([c5480ef](supabase@c5480ef))


### Bug Fixes

* apply shared limiters before email / sms is sent
([supabase#1748](supabase#1748))
([bf276ab](supabase@bf276ab))
* simplify WaitForCleanup
([supabase#1747](supabase#1747))
([0084625](supabase@0084625))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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