联合用户的 WSO2AM2.1.0-update12 范围角色 [英] WSO2AM2.1.0-update12 scope roles for federated users
问题描述
使用 WSO2AM 2.1.0-update12
Using WSO2AM 2.1.0-update12
- 尝试从具有基于角色的范围的授权代码授予中获取令牌:
- 使用 SAML 对用户进行身份验证(SAML 仅返回用户名,我们承担来自底层 AD 用户存储的角色).
完整的堆栈跟踪可用
我们有一个例外:
DEBUG - Found Authorization Code for Client : kf2UGHFTyCzKUNgSMc65BZNCzooa, authorized user : FEDERATED/xxxxxxx@carbon.super, scope : test001_backend
Caused by: java.lang.NullPointerException
at org.wso2.carbon.user.core.common.UserRolesCache.isCaseSensitiveUsername(UserRolesCache.java:213)
at org.wso2.carbon.user.core.common.UserRolesCache.getRolesListOfUser(UserRolesCache.java:128)
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.getRoleListOfUserFromCache(AbstractUserStoreManager.java:3641)
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.getRoleListOfUser(AbstractUserStoreManager.java:2730)
... 67 more
事情是 - 在 wso2am 基础版本 2.1.0 中,授权有效,需要升级以支持组之间的应用程序共享.
thing is - in the wso2am base version 2.1.0 the authorization is working, the upgrade is needed to support application sharing between groups.
有什么提示吗?
更改是 - 通过 SAML 返回的用户被分配域 FEDERATED(因此完整域用户名是 FEDERATED/username,用户存储无法识别),使用基本版本 2.1.0(我不确定 FEDERATED 是否有效)域已设置,但用户角色和范围已正确验证)
the change is - user returned through SAML is assigned domain FEDERATED (so the full domain username is FEDERATED/username, which is not recognized by the userstore), using base version 2.1.0 works (I am not sure if the FEDERATED domain is set, but the user roles and scopes are validated properly)
推荐答案
作为解决方案 - 我们覆盖了用户存储管理器上的 getRoleListOfUser
方法,从用户名中剥离了领域 (FEDERATED).
As a resolution - we have overwritten the method getRoleListOfUser
on the userstore maanger stripping the realm (FEDERATED) from the username.
这篇关于联合用户的 WSO2AM2.1.0-update12 范围角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!