zitadel/internal/api/grpc/admin
Livio Spring 35df5f61fc
fix(saml): improve error handling (#8928)
# Which Problems Are Solved

There are multiple issues with the metadata and error handling of SAML:
- When providing a SAML metadata for an IdP, which cannot be processed,
the error will only be noticed once a user tries to use the IdP.
- Parsing for metadata with any other encoding than UTF-8 fails.
- Metadata containing an enclosing EntitiesDescriptor around
EntityDescriptor cannot be parsed.
- Metadata's `validUntil` value is always set to 48 hours, which causes
issues on external providers, if processed from a manual down/upload.
- If a SAML response cannot be parsed, only a generic "Authentication
failed" error is returned, the cause is hidden to the user and also to
actions.

# How the Problems Are Solved

- Return parsing errors after create / update and retrieval of an IdP in
the API.
- Prevent the creation and update of an IdP in case of a parsing
failure.
- Added decoders for encodings other than UTF-8 (including ASCII,
windows and ISO, [currently
supported](efd25daf28/encoding/ianaindex/ianaindex.go (L156)))
- Updated parsing to handle both `EntitiesDescriptor` and
`EntityDescriptor` as root element
- `validUntil` will automatically set to the certificate's expiration
time
- Unwrapped the hidden error to be returned. The Login UI will still
only provide a mostly generic error, but action can now access the
underlying error.

# Additional Changes

None

# Additional Context

reported by a customer

(cherry picked from commit ffe9570776)
2024-12-03 11:42:58 +01:00
..
integration_test chore: remove some integration test flakiness (#8818) 2024-10-31 15:34:20 +00:00
custom_text_converter.go feat: invite user link (#8578) 2024-09-11 10:53:55 +00:00
custom_text.go feat: invite user link (#8578) 2024-09-11 10:53:55 +00:00
domain_policy.go fix: handle UserLoginMustBeDomain changes correctly (#4765) 2022-12-06 09:01:31 +01:00
email_converters.go feat: add http as smtp provider (#8545) 2024-09-12 06:27:29 +02:00
email.go feat: add http as smtp provider (#8545) 2024-09-12 06:27:29 +02:00
event_test.go fix(ListEvents): add aggregate types to filter if not set (#7490) 2024-03-05 15:44:51 +00:00
event.go fix(ListEvents): add aggregate types to filter if not set (#7490) 2024-03-05 15:44:51 +00:00
export.go fix: fix slice init length (#8707) 2024-11-15 09:33:15 +01:00
failed_event_converter.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
failed_event.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
feature.go perf(oidc): optimize token creation (#7822) 2024-05-16 07:07:56 +02:00
iam_member_converter_test.go remove negated integration tags 2023-04-26 19:55:13 +03:00
iam_member_converter.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
iam_member.go perf: remove owner removed columns from projections for oidc (#6925) 2023-11-20 17:21:08 +02:00
iam_settings_converter.go feat: add http as smtp provider (#8545) 2024-09-12 06:27:29 +02:00
iam_settings.go feat: SMTP Templates (#6932) 2024-04-11 09:16:10 +02:00
idp_converter_test.go remove negated integration tags 2023-04-26 19:55:13 +03:00
idp_converter.go fix(saml): improve error handling (#8928) 2024-12-03 11:42:58 +01:00
idp.go fix: generalise permission check for query user information (#8458) 2024-08-23 06:44:18 +00:00
import.go feat(storage): generic cache interface (#8628) 2024-09-25 21:40:21 +02:00
information.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
instance_converter.go feat: trusted (instance) domains (#8369) 2024-07-31 18:00:38 +03:00
instance.go feat: trusted (instance) domains (#8369) 2024-07-31 18:00:38 +03:00
label_policy_converter.go feat: add attribute to only enable specific themes (#6798) 2023-10-26 05:54:09 +00:00
label_policy.go fix: return absolute asset urls (#3676) 2022-05-20 10:30:12 +02:00
language_converter.go feat: restrict languages (#6931) 2023-12-05 11:12:01 +00:00
language.go refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
lockout_converter.go feat: provide option to limit (T)OTP checks (#7693) 2024-04-10 09:14:55 +00:00
lockout.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
login_policy_converter.go feat: allow to force MFA local only (#6234) 2023-07-20 04:06:16 +00:00
login_policy.go fix: keep user idp links (#7079) 2023-12-19 10:25:50 +00:00
milestone_converter.go refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
milestone.go perf: query projected milestones for onboarding view (#6760) 2023-10-25 11:16:34 +00:00
notification_policy.go feat: add notification policy and password change message (#5065) 2023-01-25 09:49:41 +01:00
notification_provider.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
oidc_settings_converter.go fix: correct oidcsettings management (#4413) 2022-09-27 12:53:49 +02:00
oidc_settings.go fix: correct oidcsettings management (#4413) 2022-09-27 12:53:49 +02:00
oneof.go feat: protos refactoring 2021-03-09 10:30:11 +01:00
org_converter.go fix: allow sorting of MyProjectOrgs (by name) (#7970) 2024-05-17 09:52:15 +02:00
org.go feat: org v2 ListOrganizations (#8411) 2024-08-15 06:37:06 +02:00
password_age_converter.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
password_age.go fix(query): realtime data on defined requests (#3726) 2022-06-14 07:51:00 +02:00
password_complexity_converter.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
password_complexity.go fix(query): realtime data on defined requests (#3726) 2022-06-14 07:51:00 +02:00
privacy_policy_converter.go feat(cnsl): docs link can be customized and custom button is available (#7840) 2024-05-13 16:01:50 +02:00
privacy_policy.go fix(query): realtime data on defined requests (#3726) 2022-06-14 07:51:00 +02:00
restrictions.go feat: restrict languages (#6931) 2023-12-05 11:12:01 +00:00
server.go feat: trusted (instance) domains (#8369) 2024-07-31 18:00:38 +03:00
sms_converter.go feat: Add Twilio Verification Service (#8678) 2024-09-26 09:14:33 +02:00
sms.go feat: add http as sms provider (#8540) 2024-09-06 13:11:36 +00:00
smtp_converters.go fix: smtp provider (#8610) 2024-09-13 13:22:25 +00:00
smtp.go feat: add http as smtp provider (#8545) 2024-09-12 06:27:29 +02:00
user_converter.go fix: make user creation errors helpful (#5382) 2023-03-14 19:20:38 +00:00
view_converter.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
view.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00