FusionAuth SAML协调lambda不减少应用程序上的角色

FusionAuth SAML协调lambda不减少应用程序上的角色,fusionauth,Fusionauth,我使用SAML v2和lambda从ADFS服务器映射角色: function reconcile(user, registration, samlResponse) { var roles = samlResponse.assertion.attributes['http://schemas.xmlsoap.org/claims/Group'] || []; registration.roles = roles; } 添加新角色时,代码似乎正常工作。用户注册已正确分配角色 但是,当

我使用SAML v2和lambda从ADFS服务器映射角色:

function reconcile(user, registration, samlResponse) {
  var roles = samlResponse.assertion.attributes['http://schemas.xmlsoap.org/claims/Group'] || [];

  registration.roles = roles;
}
添加新角色时,代码似乎正常工作。用户注册已正确分配角色

但是,当我删除广告中的角色时,它不会反映在用户注册中

在事件日志中,角色似乎已从注册中删除,但当我在UI中查看用户时,它们保持不变

8/26/2019 02:11:26 PM EEST Invoke configured lambda with Id [f9b358a9-63a2-4a28-b126-e70f9e0445f3]
8/26/2019 02:11:26 PM EEST User to reconcile: 
{
  "encryptionScheme" : null,
  "factor" : null,
  "id" : null,
  "password" : null,
  "passwordChangeRequired" : false,
  "passwordLastUpdateInstant" : null,
  "salt" : null,
  "verified" : false,
  "preferredLanguages" : [ ],
  "memberships" : [ ],
  "registrations" : [ {
    "data" : { },
    "preferredLanguages" : [ ],
    "tokens" : { },
    "applicationId" : "e6bc6d79-98b1-4a3b-8621-2a0a4dc9465c",
    "authenticationToken" : null,
    "cleanSpeakId" : null,
    "id" : null,
    "insertInstant" : null,
    "lastLoginInstant" : null,
    "roles" : [ ], <------------ roles are empty
    "timezone" : null,
    "username" : null,
    "usernameStatus" : null,
    "verified" : false
  } ],
  "active" : false,
  "birthDate" : null,
  "cleanSpeakId" : null,
  "data" : { },
  "email" : "johanad@xx",
  "expiry" : null,
  "firstName" : null,
  "fullName" : null,
  "imageUrl" : null,
  "insertInstant" : null,
  "lastLoginInstant" : null,
  "lastName" : null,
  "middleName" : null,
  "mobilePhone" : null,
  "parentEmail" : null,
  "tenantId" : null,
  "timezone" : null,
  "twoFactorDelivery" : null,
  "twoFactorEnabled" : false,
  "twoFactorSecret" : null,
  "username" : null,
  "usernameStatus" : null
}
8/26/2019 02:11:26 PM EEST The user with the email address [johanad@xx] already exists.
8/26/2019 02:11:26 PM EEST Merge the reconciled user from the Identity Provider into the FusionAuth user.
8/26/2019 02:11:26 PM EEST User is already registered for application with Id [e6bc6d79-98b1-4a3b-8621-2a0a4dc9465c].
8/26/2019 02:11:26 PM EEST User has successfully been reconciled and logged into FusionAuth.

这是外部IdP处理的当前行为。FusionAuth不知道外部IdP是否正在处理角色,因此它当前保留FusionAuth数据库中的角色,并忽略通过Lambda在中设置的角色。只有当用户已经存在时才会发生这种情况。对于新用户,可以在Lambda中设置角色

我认为造成这种情况的根本原因是一些IDP不提供角色,他们需要完全在FusionAuth中进行管理。其他IDP将提供角色,它们可以映射到Lambda中。看起来,当我们添加lambda时,我们没有添加指定身份提供者是否提供角色的功能

解决此问题的方法是,FusionAuth在身份提供程序上有一个新标志,指示IdP是否将解析和管理角色


如果您想在我们的GitHub问题跟踪器上打开一个功能请求,我们可能会在路线图上为您提供。如果您需要快速构建此功能,还可以联系专业服务。

谢谢您提供的信息!