使用SAML允许列表中的用户组属性以验证GP门户用户

使用SAML允许列表中的用户组属性以验证GP门户用户

49653
Created On 10/15/22 01:16 AM - Last Modified 05/09/23 05:45 AM


Objective


什么是用户组属性在SAML-类型身份验证配置文件以及如何在配置中使用它?

A SAML-类型身份验证配置文件允许从中提取组属性SAML通过字段响应用户组属性. 提取后,将根据中的值评估指定的组属性值允许列表该配置文件。 仅当组属性值与允许列表中的配置值匹配时才允许用户。

NOTE :用户组属性值可以仅有的用于评估允许列表的SAML-类型验证。 这用户组属性值不能在其他任何地方使用firewall配置包括任何类型的策略,GlobalProtect门户代理和无客户端VPN配置、网关代理配置或报告等。

PAN-OS配置帮助(参考):

用户组属性 (SAML仅有的):输入SAML在来自 IdP 的消息中标识身份验证用户的用户组的属性(默认为用户组)。 如果 IdP 服务器配置文件包含指定用户组属性的元数据,则该字段会自动使用该属性。 这firewall使用组信息将身份验证用户与允许列表条目进行匹配,而不是用于策略或报告。

作为本文中的示例,我们将配置一个SAML-键入身份验证配置文件以验证GP门户无客户端VPN用户基于用户组属性



Environment


PAN-OS
SAML 验证
GP门户登录


Procedure


配置及说明


1. 我们假设,PANW firewall已经配置了用户识别 > 组映射设置它从中获取用户到组的映射以及用户属性和组属性AD通过LDAP.

图片.png
图片.png

作为本文中的示例,有一个用户10在域中pantac-222-70这是以下组的一部分并具有以下用户属性:

 
> show user user-ids match-user  "pantac-222-70\user10"

User Name                         Vsys    	Groups
------------------------------------------------------------------
pantac-222-70\user10              vsys1     cn=users,cn=builtin,dc=pantac-222-70,dc=local
                                            cn=remote desktop users,cn=builtin,dc=pantac-222-70,dc=local
                                            cn=non-admin users,cn=users,dc=pantac-222-70,dc=local
                                            cn=vpn-users,dc=pantac-222-70,dc=local
                                            cn=domain users,cn=users,dc=pantac-222-70,dc=local
											
> show user user-attributes user "pantac-222-70\user10"

Primary: pantac-222-70\user10   Email: user10@pantac-222-70.local
Alt User Names:
1) pantac-222-70\user10
2) user10@pantac-222-70.local


NOTES:
  • pantac-222-70\user10 用户属于 5 个组AD和firewall使用两个用户属性标识用户: (1) sAM账户名(pantac-222-70\user10) 和(2) Email & userPrincipleName (user10@pantac-222-70.local)
  • 因此,如果用户被认证为pantac-222-70\user10或者user10@pantac-222-70.local , 这firewall将能够识别它并找到它与该用户关联的 5 个组


2. 现在让我们假设相同用户10也同步了SAML身份提供者 (IdP) 通过AD所以它有相同的AD组和属性。 除此之外用户10也是一个的一部分SAML-特定群体GP-用户(即GP-用户组是NOT知道在AD)

3. 我们猜测SAMLIdP 已正确配置为发送组属性名称团体价值为GP-用户在一个SAML回应PANW firewall(如何SAMLIdP 的配置超出了本文的范围)

4.PANW firewall配置有SAML身份提供者服务器配置文件

图片.png

5.PANW firewall正在使用上面的SAML身份提供者服务器配置文件在一个SAML-类型身份验证配置文件配置为寻找用户名属性:username &用户组属性:groups并提取其价值以供进一步使用

图片.png

除此之外SAML-类型身份验证配置文件配置有允许列表只允许属于SAML团体GP-用户

图片.png

6. 这SAML-类型身份验证配置文件正在被一个使用GlobalProtect门户网站

图片.png

重申一下,SAML用户组属性并且它的值没有在其他任何地方引用firewall配置包括GP门户代理配置或者无客户端VPN配置,它仅用于SAML-类型身份验证配置文件为了允许列表。 如果需要配置用户或组GP门户代理配置或者无客户端VPN配置, 它们必须通过目录服务来自用户组映射设置。

SAML 用户登录、身份验证结果和用户到组的映射


A.在此期间SAML认证过程中,SAML IdP 发送一个SAML回应PANW firewall其中包含:

  • 状态码:成功(IESAML IdP 成功验证了用户)
  • 主题 NameID:user10@pantac-222-70.local (即经过身份验证的用户 NameID)
  • 组属性:groups有价值GP-用户
<saml2p:Status 
	xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
	<saml2p:StatusCode 
		Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</saml2p:Status>

<saml2:Subject 
	xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
	<saml2:NameID 
		Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">user10@pantac-222-70.local
	</saml2:NameID>
	...
</saml2:Subject

<saml2:Attribute 
	Name="groups" 
	NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
	<saml2:AttributeValue 
		xmlns:xs="http://www.w3.org/2001/XMLSchema" 
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
		xsi:type="xs:string">GP-Users
	</saml2:AttributeValue>
</saml2:Attribute>


B.PANW firewall得到SAML响应和授权进程按以下顺序处理它:

  • 收到SAML中的断言SAML回复
  • 提取属性名称团体有两个值:GP-用户
  • 尽管SAML身份验证配置文件配置有属性用户名授权没找到用户名中的属性SAML本例中的响应(即SAMLIdP 没有发送用户名属性)
  • 主题名称ID: user10@pantac-222-70.local用作用户名
  • 已配置允许列表GP-用户与提取的匹配团体价值GP-用户
  • 用户认证成功
2022-10-14 17:21:52.019 -0700 Received SAML Assertion from 'http://www.okta.com/-----------------' from client '10.x.x.x'
2022-10-14 17:21:52.020 -0700 debug: _extract_sso_attribute(pan_authd_saml_internal.c:543): Got attr name (usergroup) "groups" ; value "Everyone;GP-Users";
2022-10-14 17:21:52.021 -0700 debug: _parse_sso_response(pan_authd_saml.c:1443): SAML SSO response from 'http://www.okta.com/-----------------' has no username attribute
2022-10-14 17:21:52.022 -0700 debug: _parse_sso_response(pan_authd_saml.c:1446): SAML SSO response from 'http://www.okta.com/-----------------': Use saml:Subject NameID "user10@pantac-222-70.local" as username
2022-10-14 17:21:52.046 -0700 SAML Assertion: signature is validated against IdP certificate (subject 'crt.Okta_IdP.shared') for user 'user10@pantac-222-70.local'
2022-10-14 17:21:52.047 -0700 debug: pan_auth_saml_resp_process(pan_auth_state_engine.c:5393): Check allow list status for user10@pantac-222-70.local (Okta_SAML_AuthProf/vsys1)
2022-10-14 17:21:52.047 -0700 debug: pan_auth_cache_user_is_allowed(pan_auth_cache_allowlist_n_grp.c:569): This is a single vsys platform, group check for allow list is performed on "vsys1"
2022-10-14 17:21:52.048 -0700 debug: pan_auth_cache_user_is_allowed(pan_auth_cache_allowlist_n_grp.c:638): user "user10@pantac-222-70.local" whose group "GP-Users" of groups: "GP-Users" is in allow list of auth prof "Okta_SAML_AuthProf" on vsys "vsys1"
...
2022-10-14 17:21:52.049 -0700 debug: _log_saml_respone(pan_auth_server.c:363): Sent PAN_AUTH_SUCCESS SAML response:(authd_id: 7132225947322817561) (return username 'user10@pantac-222-70.local') (auth profile 'Okta_SAML_AuthProf') (NameID 'user10@pantac-222-70.local') ...


边注:关于用户到组的映射,因为用户已成功通过身份验证user10@pantac-222-70.local,这firewall将尝试找到从中获取的匹配用户属性用户组映射设置通过AD(在前面的第 1 点中讨论过)。 因为它匹配其中一个pantac-222-70\user10用户属性,它将被视为AD-映射5组。 这些AD政策上应使用 5 个组,GP门户代理配置,GP门户无客户端VPN配置等





Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000sZaHCAU&lang=zh_CN&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language