niif/simplesamlphp-module-attributeaggregator

此软件包的最新版本(v2.0.0-rc2)没有可用的许可信息。

属性聚合实现或SAML属性查询

v2.0.0-rc2 2017-12-05 10:41 UTC

This package is auto-updated.

Last update: 2024-09-09 06:34:17 UTC


README

Latest Stable Version Total Downloads Travis

属性聚合模块作为身份验证处理过滤器实现。它可以在SP的config.php文件中进行配置。

建议在SP上运行属性聚合模块,并将过滤器配置为在联邦ID之后运行,通常是在eduPersonPrincipalName解析之后。

安装

您可以使用composer安装此模块

composer require niif/simplesamlphp-module-attributeaggregator

如何设置attributeaggregator模块

模块的唯一必需选项是查询属性权威的entityId。AA必须支持urn:oasis:names:tc:SAML:2.0:bindings:SOAP绑定。

示例

            59 => array(
               'class' => 'attributeaggregator:attributeaggregator',
               'entityId' => 'https://aa.example.com:8443/aa',

              /**
               * The subject of the attribute query. Default: urn:oid:1.3.6.1.4.1.5923.1.1.1.6 (eduPersonPrincipalName)
               */
               //'attributeId' => 'urn:oid:1.3.6.1.4.1.5923.1.1.1.6',

               /** 
                * If set to TRUE, the module will throw an exception if attributeId is not found.
                */
               // 'required' => FALSE,

               /** 
                * The format of attributeId. Default is 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'
                */
               //'nameIdFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',


               /**
                * The name Format of the attribute names.
                */
               //'attributeNameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',

               /**
                * The requested attributes. If not present, we will get all
                * the attributes. The keys of the array is the attribute name in (''urn:oid'') format.
                * values:
                *   the array of acceptable values. If not defined, the filter will accept all values.
                * multiSource:
                *   merge:    merge the existing and the new values, this is the default behaviour,
                *   override: drop the existing values and set the values from AA,
                *   keep:     drop the new values from AA and keep the original values.
                */
               // 'attributes' => array(
               //         "urn:oid:attribute-OID-1" => array (
               //               "values" => array ("value1", "value2"),
               //               "multiSource" => "override"
               //               ),
               //         "urn:oid:attribute-OID-2" => array (
               //               "multiSource" => "keep"
               //               ),
               //         "urn:oid:attribute-OID-3" => array (
               //               "values" => array ("value1", "value2"),
               //               ),
               //         "urn:oid:attribute-OID-4" => array ()
               //        ),

            ),

如果您使用的是具有simplesamlphp-module-aa的simplesamlphp实现的AA,则必须定义PAOS acs端点,并确保Location正确(请查看VIRTUAL_HOST环境变量)。

当前sp数组中的authsources.php,即default-sp

        'AssertionConsumerService' => [
          [
            'index' => 0,
            'isDefault' => true,
            'Location' => 'https://' . getenv('VIRTUAL_HOST') . '/simplesaml/module.php/saml/sp/saml1-acs.php/default-sp',
            'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
          ],
          [
            'index' => 1,
            'Location' => 'https://' . getenv('VIRTUAL_HOST') . '/simplesaml/module.php/saml/sp/saml1-acs.php/default-sp',
            'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:PAOS',
          ],
        ],

选项

配置'''attributeaggregation'''模块时可以使用以下选项

entityId:属性权威的entityId。AA的元数据必须在attributeauthority-remote元数据集中,否则您将收到错误消息。

attributeId:这是发出的AttributeQuery中的Subject。该属性必须由一个authproc模块预先解析。默认属性是urn:oid:1.3.6.1.4.1.5923.1.1.1.6 (eduPersonPrincipalName)。

attributeNameFormat:发出的AttributeQuery中NameID的格式。默认值是urn:oasis:names:tc:SAML:2.0:attrname-format:uri

attributes:您可以在attributes数组中列出从属性权威期望的属性。该数组包含键值对,键是完整的联邦(''urn:oid'')格式中的属性名称,值是该属性的期望值数组。如果值为空数组,则解析所有属性的值,否则仅解析匹配的值。如果未定义attributes选项,则从AA的响应中解析每个属性。