使用单点登录 (SSO) 进行身份验证

SUSE Multi-Linux Manager 通过实现安全声明标记语言 (SAML) 2 协议来支持单点登录 (SSO)。

单点登录是一种身份验证过程,它允许用户使用一组身份凭证访问多个应用程序。SAML 是一套基于 XML 的标准,用于交换身份验证和授权数据。SAML 身份服务提供者 (IdP) 向服务提供者 (SP) 提供身份验证和授权服务,例如 SUSE Multi-Linux Manager。SUSE Multi-Linux Manager 公开三个端点,必须启用它们才能进行单点登录。

SUSE Multi-Linux Manager 中的 SSO 支持:

  • 使用 SSO 登录。

  • 使用服务提供者发起的单点注销 (SLO) 和身份服务提供者单点注销服务 (SLS) 注销。

  • 声明和 nameId 加密。

  • 声明签名。

  • 使用 AuthNRequest、LogoutRequest 和 LogoutResponses 进行消息签名。

  • 启用声明使用者服务端点。

  • 启用单点注销服务端点。

  • 发布 SP 元数据(可签名)。

SUSE Multi-Linux Manager 中的 SSO 不支持:

  • 身份服务提供者 (IdP) 的产品选择和实现。

  • 对其他产品的 SAML 支持(请查看相关的产品文档)。

有关 SSO 的示例实现,请参见 示例 SSO 实现

If you change from the default authentication method to single sign-on, the new SSO credentials apply only to the Web UI. Client tools such as mgr-sync or spacecmd continue to work with the default authentication method only.

1. 先决条件

在开始之前,需要事先使用这些参数配置一个外部身份服务提供者。请查看 IdP 文档获取说明。

The mapping between the IdP user and the SUSE Multi-Linux Manager user is specified in a SAML:Attribute. The SAML:Attribute must be configured in the IdP and must be passed to SUSE Multi-Linux Manager in the SAML authentication. The attribute must be named uid and must contain the SUSE Multi-Linux Manager user mapped to it after login. The SUSE Multi-Linux Manager user must be created before you activate single sign-on.

需要以下端点:

After the authentication with the IdP using the user orgadmin is successful, you are logged in to SUSE Multi-Linux Manager as the orgadmin user, provided that the orgadmin user exists in SUSE Multi-Linux Manager.

2. 启用 SSO

SSO 与其他类型的身份验证是互斥的:请要么启用,要么禁用 SSO。默认已禁用 SSO。

Use mgrctl term before running steps inside the server container.

过程:启用 SSO
  1. 如果您的用户在 SUSE Multi-Linux Manager 中尚不存在,请先创建他们。

  2. Edit /etc/rhn/rhn.conf and add this line at the end of the file:

    java.sso = true
  3. Find the parameters you want to customize in /usr/share/rhn/config-defaults/rhn_java_sso.conf. Insert the parameters you want to customize into /etc/rhn/rhn.conf and prefix them with java.sso. For example, in /usr/share/rhn/config-defaults/rhn_java_sso.conf find:

    onelogin.saml2.sp.assertion_consumer_service.url = https://YOUR-PRODUCT-HOSTNAME-OR-IP/rhn/manager/sso/acs

    To customize it, create the corresponding option in /etc/rhn/rhn.conf by prefixing the option name with java.sso.:

    java.sso.onelogin.saml2.sp.assertion_consumer_service.url = https://YOUR-PRODUCT-HOSTNAME-OR-IP/rhn/manager/sso/acs

    To find all the occurrences you need to change, search in the file for the placeholders YOUR-PRODUCT and YOUR-IDP-ENTITY. Every parameter comes with a brief explanation of what it is meant for.

  4. 重启 spacewalk 服务以应用更改:

    mgradm restart

访问 SUSE Multi-Linux Manager URL 时,您将重定向到 SSO 的 IdP,需要在其中完成身份验证。身份验证成功后,您将重定向到 SUSE Multi-Linux Manager Web UI,并以经过身份验证的用户身份登录。如果您在使用 SSO 登录时遇到问题,请查看 SUSE Multi-Linux Manager 日志了解详细信息。