Bug 57746 - Diagnosis check 04_saml_certificate_check ends with traceback if UCRV umc/saml/idp-server is not set
Summary: Diagnosis check 04_saml_certificate_check ends with traceback if UCRV umc/sam...
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: UMC - System diagnostic
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.0-9-errata
Assignee: Dirk Wiesenthal
QA Contact: Iván.Delgado
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-12 12:06 CET by Dirk Wiesenthal
Modified: 2024-11-14 08:28 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2024-11-12 12:06:58 CET
Seen in tests:

Traceback (most recent call last):
  File "/usr/share/ucs-test/00_checks/81_diagnostic_checks.py", line 66, in test_run_diagnostic_checks
    assert plugin_data['success'], plugin_data['error_message']
AssertionError: ## Check failed: 04_saml_certificate_check - Überprüfung der SAML-Zertifikate fehlgeschlagen! ##
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/univention/management/console/modules/diagnostic/__init__.py", line 276, in execute
      ret = execute(umc_module, **kwargs)
    File "/usr/lib/python3/dist-packages/univention/management/console/modules/diagnostic/plugins/04_saml_certificate_check.py", line 68, in run
      if keycloak_fqdn and 'realms/ucs/protocol/saml/descriptor' in umc_saml_idp:
  TypeError: argument of type 'NoneType' is not iterable
assert False

keycloak/server/sso/fqdn is not set but has a default value. umc/saml/idp-server is also not set but has no default value.
Comment 1 Dirk Wiesenthal univentionstaff 2024-11-12 12:10:33 CET
Problematic if a 5.0 system is joined in a 5.2 No-Keycloak environment. In environments with 5.0 Primary, umc/saml/idp-server should at least be set initially (SimpleSAMLphp).

But it is possible and allowed to unset it in 5.0, of course.
Comment 2 Dirk Wiesenthal univentionstaff 2024-11-12 13:33:06 CET
univention-management-console-module-diagnostic.yaml
9461e80d1675 | Bug #57746: YAML

univention-management-console-module-diagnostic (6.0.10-2)
88eaf2e558e0 | Bug #57746: Do not traceback in 04_saml_certificate_check if UMC is not configured for any kind of SSO


Package: univention-management-console-module-diagnostic
Version: 6.0.10-2
Branch: ucs_5.0-0-errata5.0-9
Scope: errata5.0-9


Not cherry-picked to 5.2 as it was fixed there a little differently in another issue.
Comment 3 Iván.Delgado univentionstaff 2024-11-13 12:14:34 CET
QA:
 Code review: OK
 Changelog: OK
 Advisory: OK
 Manual test: OK
Comment 4 Christian Castens univentionstaff 2024-11-13 17:22:03 CET
<https://errata.software-univention.de/#/?erratum=5.0x1173>