【问题标题】:simplesamlphp get attributes returns value not expectedsimplesamlphp 获取属性返回值不是预期的
【发布时间】:2012-11-21 16:32:26
【问题描述】:

我已经设置了 OpenAM 和 SimpleSAMLPhp。我可以通过 OpenAM“Test Fed”和 SimpleSAMLPhp 中的“Auth”页面进行身份验证,所以我相信它一切正常。

但是,当我验证用户,然后打印出来:

$attributes = $as->getAttributes();
$attrs = print_r($attributes, true);

print '<pre>Attrs: ' . $attrs . '</pre>';

我得到以下信息:

Attrs: Array
(
    [groups] => Array
    (
        [0] => users
        [1] => members
    )

)

正如我所期望的那样:

inetuserstatus=[true], 
sn=[Healy], 
givenname=[Gareth], 
userpassword=xxx..., 
uid=[gareth.healy@localhost.com]

如果我调用 REST API http://auth.localhost.com:8080/openam/identity/attributes?subjectid=... 它会按预期返回值。

我也加入了saml response。这是 OpenAM/SimpleSAMLPhp 设置问题吗?

【问题讨论】:

标签: single-sign-on saml-2.0 openam


【解决方案1】:

您可能知道 SAML 与身份 Web 服务(您与 REST 一起使用并为“属性资源”返回一组默认属性)完全不同。

您可以通过在 OpenAM 端为服务提供者配置属性映射,将属性语句包含到 SAML 身份验证响应中。

您要映射的属性必须在数据存储配置中可用。

【讨论】:

  • 此外,您应该能够看到您的 SAML 断言根本不包含 AttributeStatement(也不包含您希望在 SP 中拥有的属性),这是因为您还没有设置 Attribute此 SP 在 OpenAM 端的映射。 ;)
  • 我按照以下屏幕截图完成了此操作:bit.ly/UUBBpR - 我相信这就是您的意思?还有什么我需要做的吗? SP端的任何重新配置​​/更新?因为我仍然没有看到它们被 SimpleSAMLPhp 拉过去
猜你喜欢
  • 1970-01-01
  • 2023-04-11
  • 2014-06-18
  • 2021-10-16
  • 2021-07-16
  • 1970-01-01
  • 2014-11-24
  • 1970-01-01
  • 2013-03-22
相关资源
最近更新 更多