zitadel/internal/integration
Livio Spring e57a9b57c8
feat(saml): allow setting nameid-format and alternative mapping for transient format (#7979)
# Which Problems Are Solved

ZITADEL currently always uses
`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent` in SAML requests,
relying on the IdP to respect that flag and always return a peristent
nameid in order to be able to map the external user with an existing
user (idp link) in ZITADEL.
In case the IdP however returns a
`urn:oasis:names:tc:SAML:2.0:nameid-format:transient` (transient)
nameid, the attribute will differ between each request and it will not
be possible to match existing users.

# How the Problems Are Solved

This PR adds the following two options on SAML IdP:
- **nameIDFormat**: allows to set the nameid-format used in the SAML
Request
- **transientMappingAttributeName**: allows to set an attribute name,
which will be used instead of the nameid itself in case the returned
nameid-format is transient

# Additional Changes

To reduce impact on current installations, the `idp_templates6_saml`
table is altered with the two added columns by a setup job. New
installations will automatically get the table with the two columns
directly.
All idp unit tests are updated to use `expectEventstore` instead of the
deprecated `eventstoreExpect`.

# Additional Context

Closes #7483
Closes #7743

---------

Co-authored-by: peintnermax <max@caos.ch>
Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2024-05-23 05:04:07 +00:00
..
config test(e2e): fix events flakiness (#7829) 2024-04-23 09:20:11 +02:00
assert_test.go feat: impersonation roles (#7442) 2024-02-28 10:21:11 +00:00
assert.go feat: add action v2 execution on requests and responses (#7637) 2024-05-04 11:55:57 +02:00
client.go feat(saml): allow setting nameid-format and alternative mapping for transient format (#7979) 2024-05-23 05:04:07 +00:00
integration_test.go AddHumanUser tests 2023-04-28 14:39:53 +03:00
integration.go feat: query side for executions and targets for actions v2 (#7524) 2024-03-14 09:56:23 +00:00
oidc.go perf(oidc): optimize token creation (#7822) 2024-05-16 07:07:56 +02:00
rand.go feat: restrict languages (#6931) 2023-12-05 11:12:01 +00:00
user.go feat(oidc): token exchange impersonation (#7516) 2024-03-20 10:18:46 +00:00
usertype_string.go feat(api): add organisation service (#6340) 2023-08-11 14:19:14 +00:00