Giter Club home page Giter Club logo

simplesamlphp-module-attributeaggregator's Introduction

Attribute Aggregator module

Latest Stable Version Total Downloads Travis

The Attribute Aggregator module is implemented as an Authentication Processing Filter. It can be configured in the SP's config.php file.

It is recommended to run the Attribute Aggregator module at the SP and configure the filter to run after the federated id, usually eduPersonPrincipalName is resolved.

Install

You can install the module with composer:

composer require niif/simplesamlphp-module-attributeaggregator

How to setup the attributeaggregator module

The only required option of the module is the entityId of the Attribute Authority to be queried. The AA must support urn:oasis:names:tc:SAML:2.0:bindings:SOAP binding.

Example:

            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 ()
               //        ),

            ),

You have to define PAOS acs endpoint with correct Location (take a look on VIRTUAL_HOST env variable), if the AA is a simpleSAMLphp implementation with simplesamlphp-module-aa

authsources.php in the current sp array, ie. 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',
          ],
        ],

Options

The following options can be used when configuring the '''attributeaggregation''' module

entityId : The entityId of the Attribute Authority. The metadata of the AA must be in the attributeauthority-remote metadata set, otherwise you will get an error message.

attributeId : This is the Subject in the issued AttributeQuery. The attribute must be previously resolved by an authproc module. The default attribute is urn:oid:1.3.6.1.4.1.5923.1.1.1.6 (eduPersonPrincipalName).

attributeNameFormat : The format of the NameID in the issued AttributeQuery. The default value is urn:oasis:names:tc:SAML:2.0:attrname-format:uri.

attributes : You can list the expected attributes from the Attrubute Authority in the attributes array. The array contains key-value pairs, where the keys are attribute names in full federated (''urn:oid'') format and the values are arrays with the expected values for that attribute. If the value is an empty array, all the values of the attributes are resolved, otherwise only the matching ones. If the attributes option is not defined, every attribute is resolved from the response from the AA.

simplesamlphp-module-attributeaggregator's People

Contributors

bajnokk avatar jaimeperez avatar m0ark avatar szabogyula avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

simplesamlphp-module-attributeaggregator's Issues

Module doesn't work for SimpleSAMLphp >= 1.19.1

Hi!

I've tried to install the module on a SimpleSAMLphp 1.19.1 (Debian 10) and... it doesn't work. :(

I've also tried to apply this patch: kukkjanos@e790e36

But I got the error:
Argument 1 passed to SAML2\Message::setIssuer() must be an instance of SAML2\XML\saml\Issuer or null, string given, called in /usr/local/src/simplesamlphp-1.19.1/modules/attributeaggregator/www/attributequery.php on line 149

Can you help us?

Thank you so much!
Marco

Enable the module by default

Now we are using composer, those modules installed with it won't be in place unless the user explicitly installs them. When a user installs this module, it will be disabled by default, and he or she will need to enable it by including an enable file in the root of the module. That file will be removed when updating the module with composer again.

Therefore, default behaviour should be to enable external modules by default.

attributeaggregator doesn't query Shibboleth attribute authority

I want to set up SimpleSAMLphp as a proxy for our virtual organization (VO), with VO-specific attributes handled by a combination of COmanage Registry (the collaboration management platform), OpenLDAP (the attribute store), and Shibboleth IdP (SAML2 attribute authority). SimpleSAMLphp is federated with InCommon as an SP. Ultimately, we want SimpleSAMLphp to not only handle federated logons on behalf of our SPs but to also handle attribute resolution for the VO. When an enrolled user logs into a web app, we want SimpleSAMLphp to pass along both the attributes provided by their home IdP plus the attributes managed by our VO. To do this I have installed version 1.0.3 of the niif/simplesamlphp-module-attributeaggregator module. Without the attribute aggregator module, proxied logons work just fine.

Here's where I'm stuck: the attribute aggregator module never seems to actually call our SAML2 attribute authority. As a result any authentication flow stops at that point. I've confirmed this by both checking the web server access logs on the attribute authority and by running a packet capture. The server running SimpleSAMLphp never even opens a TCP connection to the attribute authority, let alone issues the requisite SOAP request. I have even disabled SELinux.

I'm not sure how to go about debugging this, being new to SimpleSAMLphp and somewhat unfamiliar with modern PHP web app development. I've posted what I think are the relevant log entries from simplesamlphp.log in the following gist, as well as a copy of config.php and the attribute authority's XML metadata:

https://gist.github.com/xenophonf/f165829f8b1eb2a23abe9b1e2a40f94b

I would be grateful for any help you all could give me.

Missing installation instruction on Readme

SimpleSAMLphp: 1.16.3 (installed into /opt/simplesamlphp)
OS: Debian 9 - Stretch
AttributeAggregator module: installed through composer by following Readme file.


I saw that composer is not enough to enable the attributeaggregator module.

You have to copy the entire attributeaggregator directory from:

  • /opt/simplesamlphp/modules/vendor/simplesamlphp/simplesamlphp/modules/attributeaggregator

to:

  • /opt/simplesamlphp/modules/attributeaggregator

or you will receive an error like this:

Exception: Could not resolve 'attributeaggregator:attributeaggregator': no class named 'sspmod_attributeaggregator_Auth_Process_attributeaggregator' or 'SimpleSAML\Module\attributeaggregator\Auth\Process\attributeaggregator'.

Thank you so much for this module!

Para van ha self-signed az AA tanúsítványa

Lehet, hogy csak az újabb PHP miatt, de tény, hogy a SOAPClient-t úgy, hogy 'allow_self_signed' => TRUE. Nem tudom, hogy ezt az opciót meg lehetne-e adni már innen, az attributeaggregator-ból, mert bár az opciók összegyűjtése nem itt történik, hanem a vendor/simplesamlphp/saml2/src/SAML2/SOAPClient.php-ban, de a probléma e modul használatakor jön elő.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.