uyuni-project / uyuni

Source code for Uyuni
https://www.uyuni-project.org/
GNU General Public License v2.0
438 stars 185 forks source link

https://<FQDN>/rhn/manager/sso/metadata - the response is not in xml format #6793

Open denis-54 opened 1 year ago

denis-54 commented 1 year ago

Problem description

Following the documentation (https://www.uyuni-project.org/uyuni-docs/en/uyuni/administration/auth-methods-sso-example.html ) I made the appropriate changes in the configuration file /etc/rhn/rhn.conf and made a restart - spacewalk-service restart. When accessing the URL, I get a response is not in xml format.

Steps to reproduce

  1. Read the documentation https://www.uyuni-project.org/uyuni-docs/en/uyuni/administration/auth-methods-sso-example.html .
  2. Add necessary parameters:
    
    java.sso = true

java.sso.onelogin.saml2.sp.entityid = https://myuyuni/rhn/manager/sso/metadata java.sso.onelogin.saml2.sp.assertion_consumer_service.url = https://myuyuni/rhn/manager/sso/acs java.sso.onelogin.saml2.sp.single_logout_service.url = https://myuyuni/rhn/manager/sso/sls

java.sso.onelogin.saml2.idp.entityid = https://keycloak/auth/realms/core-services/ java.sso.onelogin.saml2.idp.single_sign_on_service.url = https://keycloak/auth/realms/core-services/protocol/saml java.sso.onelogin.saml2.idp.single_logout_service.url = https://keycloak/auth/realms/core-services/protocol/saml

java.sso.onelogin.saml2.idp.x509cert = -----BEGIN CERTIFICATE----- -----END CERTIFICATE-----

java.sso.onelogin.saml2.organization.name = SUSE Manager admin java.sso.onelogin.saml2.organization.displayname = SUSE Manager admin java.sso.onelogin.saml2.organization.url = https://uyuni java.sso.onelogin.saml2.organization.lang =

java.sso.onelogin.saml2.contacts.technical.given_name = SUSE Manager admin java.sso.onelogin.saml2.contacts.technical.email_address = suma@example.org java.sso.onelogin.saml2.contacts.support.given_name = SUSE Manager admin java.sso.onelogin.saml2.contacts.support.email_address = suma@example.org

3. `spacewalk-service restart`
4. Check the result of accessing endpoint - [https://myuyuni/rhn/manager/sso/metadata](https://myuyuni/rhn/manager/sso/metadata) in atth file - [metadata.txt](https://github.com/uyuni-project/uyuni/files/11086796/metadata.txt)
5. I was expecting a response in plain xml format, but I get a lot of extra information around xml. See responce in 4.

### Uyuni version

```bash
Information for package Uyuni-Server-release:
---------------------------------------------
Repository     : uyuni-server-stable
Name           : Uyuni-Server-release
Version        : 2022.11-220400.195.1.uyuni2
Arch           : x86_64
Vendor         : obs://build.opensuse.org/systemsmanagement:Uyuni
Support Level  : Level 3
Installed Size : 1.4 KiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : Uyuni-Server-release-2022.11-220400.195.1.uyuni2.src
Summary        : Uyuni Server
Description    :
    Uyuni lets you efficiently manage physical, virtual,
    and cloud-based Linux systems. It provides automated and cost-effective
    configuration and software management, asset management, and system
    provisioning.

Uyuni proxy version (if used)

No response

Useful logs

No response

Additional information

No response

avshiliaev commented 1 year ago

@denis-54 thank you for your report. It seems like the endpoint indeed returns an entire HTML doc instead of a plain xml. At least I was able to reproduce it from the steps you've mentioned.