2017 © Pedro Peláez
 

simplesamlphp-module simplesamlphp-module-attributecollector

Collect attributes from backend databases like sql or ldap

image

niif/simplesamlphp-module-attributecollector

Collect attributes from backend databases like sql or ldap

  • Sunday, February 28, 2016
  • by gyufi
  • Repository
  • 7 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Attributecollector

simplesamlphp auth proc filter, that get attributes from backend database and set to attributes array., (*1)

This code is delivered from: https://forja.rediris.es/svn/confia/attributecollector, (*2)

Basic configuration

Configure this module as an Auth Proc Filter. More info at http://rnd.feide.no/content/authentication-processing-filters-simplesamlphp, (*3)

Example

In the following example the filter is configured for only one hosted IdP editing the file saml20-idp-hosted, (*4)

$metadata = array(

        'ssp-idp' => array(

        ...

                'authproc' => array(
                        10 => array(
                                'existing' => 'preserve',
                                'class' => 'attributecollector:AttributeCollector',
                                'uidfield' => 'subject',
                                'collector' => array(
                                        'class' => 'attributecollector:SQLCollector',
                                        'dsn' => 'pgsql:host=localhost;dbname=ssp-extra',
                                        'username' => 'ssp-extra',
                                        'password' => 'ssp-extra',
                                        'query' => 'SELECT * from extra where subject=:uidfield',
                                )
                        )
                ),

        ...

        )
);

Configuration Options explained

The filter needs the following options:, (*5)

  • class: The filter class. Allways: 'attributecollector:AttributeCollector'
  • uidfield: The name of the field used as an unique user identifier. The configured collector recives this uid so it can search for extra attributes.
  • collector: The configuration of the collector used to retrieve the extra attributes

The following option is optional:, (*6)

  • existing: Tell the filter what to do when a collected attribute already exists in the user attributes. Values can be: 'preserve': Ignore collected attribute and preserve the old one. This one is the default behaviour. 'replace': Ignore original attribute and replace it with the collected one. 'merge': Merge the collected attribute into the array of the original one.

Collector Configuration Options explained

The collector configuration array needs at least one option:, (*7)

  • class: The collector class.

Some other options may be needed by the collector, refer to the collector documentation., (*8)

The Versions

28/02 2016

dev-master

9999999-dev

Collect attributes from backend databases like sql or ldap

  Sources   Download

The Requires

 

28/02 2016

v1.0.0

1.0.0.0

Collect attributes from backend databases like sql or ldap

  Sources   Download

The Requires