Skip to content
Snippets Groups Projects
Commit 1b979c75 authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Rework metadata attributes extensions documentation.

Add a common use case to add entity categories - until now it's
hard for users to find SSP examples for how to do it.
parent 3534658a
No related branches found
No related tags found
No related merge requests found
SAML V2.0 Metadata Extensions for Login and Discovery User Interface SAML V2.0 Metadata Attribute Extensions
============================= =======================================
<!-- <!--
This file is written in Markdown syntax. This file is written in Markdown syntax.
...@@ -7,16 +7,16 @@ SAML V2.0 Metadata Extensions for Login and Discovery User Interface ...@@ -7,16 +7,16 @@ SAML V2.0 Metadata Extensions for Login and Discovery User Interface
http://daringfireball.net/projects/markdown/syntax http://daringfireball.net/projects/markdown/syntax
--> -->
* Author: Timothy Ace [tace@synacor.com](mailto:tace@synacor.com)
<!-- {{TOC}} --> <!-- {{TOC}} -->
This is a reference for the SimpleSAMLphp implemenation of the [SAML This is a reference for the SimpleSAMLphp implementation of the [SAML
V2.0 Attribute Extensions](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-attribute-ext.pdf) V2.0 Attribute Extensions](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-attribute-ext.pdf)
defined by OASIS. defined by OASIS. A common use case is adding entity attributes
to the generated metadata.
The `metadata/saml20-idp-hosted.php` entries are used to define the For an IdP `metadata/saml20-idp-hosted.php` entries are used to define the
metadata extension items. An example of this is: metadata extension items; for an SP they can be added to `config/authsources.php`.
An example of this is:
<?php <?php
$metadata['entity-id-1'] = [ $metadata['entity-id-1'] = [
...@@ -29,13 +29,13 @@ metadata extension items. An example of this is: ...@@ -29,13 +29,13 @@ metadata extension items. An example of this is:
]; ];
The OASIS specification primarily defines how to include arbitrary The OASIS specification primarily defines how to include arbitrary
`Attribute` and `Assertion` elements within the metadata for an IdP. `Attribute` and `Assertion` elements within the metadata for an entity.
*Note*: SimpleSAMLphp does not support `Assertion` elements within the *Note*: SimpleSAMLphp does not support `Assertion` elements within the
metadata at this time. metadata at this time.
Defining Attributes Defining Attributes
-------------- -------------------
The `EntityAttributes` key is used to define the attributes in the The `EntityAttributes` key is used to define the attributes in the
metadata. Each item in the `EntityAttributes` array defines a new metadata. Each item in the `EntityAttributes` array defines a new
...@@ -71,8 +71,8 @@ This generates: ...@@ -71,8 +71,8 @@ This generates:
When the curly braces are omitted, the NameFormat is automatically set When the curly braces are omitted, the NameFormat is automatically set
to "urn:oasis:names:tc:SAML:2.0:attrname-format:uri". to "urn:oasis:names:tc:SAML:2.0:attrname-format:uri".
Generated XML Metadata Examples Examples
---------------- --------
If given the following configuration... If given the following configuration...
...@@ -110,3 +110,33 @@ If given the following configuration... ...@@ -110,3 +110,33 @@ If given the following configuration...
<ds:X509Data> <ds:X509Data>
... ...
An example configuration to declare Géant Data Protection Code of Conduct
entity category support for a service provider in `authsources.php`:
'saml:SP' => [
...
'EntityAttributes' => [
'http://macedir.org/entity-category' => [
'http://www.geant.net/uri/dataprotection-code-of-conduct/v1'
]
],
'UIInfo' =>[
'DisplayName' => [
'en' => 'English name',
'es' => 'Nombre en Español',
],
'Description' => [
'en' => 'English description',
'es' => 'Descripción en Español',
],
'InformationURL' => [
'en' => 'http://example.com/info/en',
'es' => 'http://example.com/info/es',
],
'PrivacyStatementURL' => [
'en' => 'http://example.com/privacy/en',
'es' => 'http://example.com/privacy/es',
],
]
],
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment