78
Installation to SSO Chad La Joie [email protected]

Shibboleth 2.0 IdP slides - Installfest (Edited)

  • Upload
    jiscam

  • View
    111

  • Download
    2

Embed Size (px)

DESCRIPTION

Shibboleth 2.0 Installfest, 1-2 July, Birmingham.

Citation preview

Page 1: Shibboleth 2.0 IdP slides - Installfest (Edited)

Installation to SSO

Chad La [email protected]

Page 2: Shibboleth 2.0 IdP slides - Installfest (Edited)

2© 2008 SWITCH

Tour of What We Learned

SWITCH AAI Demo Page: http://aai-demo.switch.ch

Page 3: Shibboleth 2.0 IdP slides - Installfest (Edited)

3© 2008 SWITCH

Terms: Entity ID

A unique identifier for a identity provider (IdP) or service provider (SP)

In shibboleth 2 the recommended format is a URLidp: https://HOSTNAME/idp/shibboleth

sp: http://HOSTNAME/shibboleth

Page 4: Shibboleth 2.0 IdP slides - Installfest (Edited)

4© 2008 SWITCH

Terms: Relying Party

The SAML peer to which the IdP is communicating.

In all existing cases, the relying party of the IdP is always an SP. Some very advanced cases allow one IdP to be a relying party to another IdP.

Page 5: Shibboleth 2.0 IdP slides - Installfest (Edited)

5© 2008 SWITCH

Terms: Binding

A description of how a SAML message is attached to an underlying transport protocol, such as http or smtp.

For example: If the message is sent over HTTP what HTTP headers need to be set, what are the URL or form parameter names, etc.

Page 6: Shibboleth 2.0 IdP slides - Installfest (Edited)

6© 2008 SWITCH

Terms: Profile

A description of how to use SAML, over a specific binding, to accomplish a specific task (e.g. Single Signon) in an interoperable manner.

Profiles are the finest grained unit of interoperability within SAML.

Page 7: Shibboleth 2.0 IdP slides - Installfest (Edited)

7© 2008 SWITCH

Terms: Metadata

A description of the SAML features supported by a SAML entity. Most importantly this includes the URLs for communicating with an entity.

Shibboleth also uses this information to build technical trust between entities.

Page 8: Shibboleth 2.0 IdP slides - Installfest (Edited)

8© 2008 SWITCH

Lets take a Closer Look

http://www.switch.ch/aai/demo/2/medium.html

Page 9: Shibboleth 2.0 IdP slides - Installfest (Edited)

9© 2008 SWITCH

Installation

• Unpack the Shibboleth distributionunzip -d /usr/local/src /opt/installfest/shibboleth-idp-2.0.0-bin.zip

• Change to /usr/local/src/identityprovider

• chmod +x ant.sh

• Run the installation script; ./ant.sh• answer yes, this is a new install• use /opt/shibboleth-idp as your shib home

directory• enter your hostname: idp#.example.com• enter password for your password

Page 10: Shibboleth 2.0 IdP slides - Installfest (Edited)

10© 2008 SWITCH

SHIB_HOME

• /opt/shibboleth-idp should now contain:–bin–conf–credentials–lib–logs–metadata–war

•The Shibboleth documentation refers to this directory as SHIB_HOME

Page 11: Shibboleth 2.0 IdP slides - Installfest (Edited)

11© 2008 SWITCH

SHIB_HOME/bin

Contains command line tools

aacli: Attribute authority command line interface allows you to simulate an attribute query/release

version: Provides the version of the IdP

Page 12: Shibboleth 2.0 IdP slides - Installfest (Edited)

12© 2008 SWITCH

SHIB_HOME/conf

The IdP’s configuration files.

We’ll cover most as we go through the course. We will not cover service.xml or internal.xml as these control advanced features.

Page 13: Shibboleth 2.0 IdP slides - Installfest (Edited)

13© 2008 SWITCH

SHIB_HOME/credentials

Credentials used by the IdP.

By default the IdP’s generated key (idp.key), cert (idp.crt) and a keystore (idp.jks) containing both are put here.

Good location to place things like trust anchor X.509 certs, cached CRLs, etc.

Page 14: Shibboleth 2.0 IdP slides - Installfest (Edited)

14© 2008 SWITCH

SHIB_HOME/lib

The libraries (jars) that make up the IdP.

These are copies of those that occur in the IdP WAR file and are only used by the command line tools.

Page 15: Shibboleth 2.0 IdP slides - Installfest (Edited)

15© 2008 SWITCH

SHIB_HOME/logs

Location of the Shibboleth log files.

process log: detailed description the IdP processing requests

access log: record of all the clients that connect to the idP

audit log: record of all information sent out from the IdP

Page 16: Shibboleth 2.0 IdP slides - Installfest (Edited)

16© 2008 SWITCH

SHIB_HOME/metadata

Default location where various metadata files are stored.

The IdP does not automatically load any metadata. Metadata read from a file, or stored backup copies of remote metadata are usually put in this directory.

Page 17: Shibboleth 2.0 IdP slides - Installfest (Edited)

17© 2008 SWITCH

SHIB_HOME/war

The location of the IdP WAR file created by the installer.

We point Tomcat to this file, instead of copying it to Tomcat, so that we don’t forget to copy new WARs if we rebuild the IdP (to add an extension, for example) or run into problems with Tomcat’s file caching mechanisms.

Page 18: Shibboleth 2.0 IdP slides - Installfest (Edited)

18© 2008 SWITCH

Metadata: Configuration

• Metadata is loaded in to the IdP by metadata providers.

• Metadata providers are configured in the relying-party.xml file

• This file may only contain one top-level provider. By default the top level provider is a chaining provider that contains other metadata providers and uses them in the order defined.

Page 19: Shibboleth 2.0 IdP slides - Installfest (Edited)

19© 2008 SWITCH

Metadata: Provider Config

•Metadata providers are configured using <MetadataProvider> element

•Every metadata provider has a:–unique ID given by the id attribute–type given by the xsi:type attribute

•Each type of metadata provider has its own set of configuration options

•Metadata provider may have a single filter defined by <MetadataFilter>

Page 20: Shibboleth 2.0 IdP slides - Installfest (Edited)

20© 2008 SWITCH

Metadata: Filesystem Provider

•The filesystem metadata provider reads a metadata file from the local filesystem.

•Type attribute value:–FilesystemMetadataProvider

•Configuration attribute:–metadataFile gives the path to the metadata file

Page 21: Shibboleth 2.0 IdP slides - Installfest (Edited)

21© 2008 SWITCH

Metadata: File-backed HTTP Provider

• Loads metadata via HTTP and backs it up to a local file

• Type attribute value:–FileBackedHTTPMetadataProvider

• Configuration Attributes:–metadataURL: HTTP URL of metadata file–backingFile: location of the backup file–cacheDuration: max time between refreshes

• Refreshes metadata automatically, no more cron jobs!

Page 22: Shibboleth 2.0 IdP slides - Installfest (Edited)

22© 2008 SWITCH

Metadata: Watchout

The chaining metadata provider looks up relying party information in its children in the order they are defined. If two child providers load different metadata for the same entity only the first description will ever be used by the IdP. No attempt to merge the data is made.

Page 23: Shibboleth 2.0 IdP slides - Installfest (Edited)

23© 2008 SWITCH

Metadata: UK Configuration

• Define the provider

<MetadataProvider id=“ukfederation”

xsi:type="FileBackedHTTPMetadataProvider”

xmlns="urn:mace:shibboleth:2.0:metadata”

metadataURL=“http://metadata.ukfederation.org.uk/ukfederation-metadata.xml”

backingFile=”/opt/shibboleth-idp/metadata/ukfed.xml”>

<!-- Filter for requiring and validating digital signature -->

<MetadataFilter xsi:type="SignatureValidation”

xmlns="urn:mace:shibboleth:2.0:metadata"

trustEngineRef="shibboleth.SignatureTrustEngine"

requireSignedMetadata="true" />

</MetadataProvider>

Page 24: Shibboleth 2.0 IdP slides - Installfest (Edited)

24© 2008 SWITCH

Metadata: UK Configuration

• Download UK Federation Certificatecurl http://metadata.ukfederation.org.uk/ukfederation.pem > /opt/shibboleth-idp/credentials/ukfederation.pem

• Add Certificate to shibboleth.SignatureTrustEngine trust engine

<security:TrustEngine xsi:type="security:StaticExplicitKeySignature" id="shibboleth.SignatureTrustEngine">

<Credential xsi:type="X509Filesystem” xmlns="urn:mace:shibboleth:2.0:security" id=”UKFederationTrustAnchor"> <Certificate> /opt/shibboleth-idp/credentials/ukfederation.pem </Certificate> </Credential>

</security:TrustEngine>

Page 25: Shibboleth 2.0 IdP slides - Installfest (Edited)

25© 2008 SWITCH

Terms: Authentication Method

An identifier that a relying party may use to stipulate how authentication should be performed.

Authentication method identifiers correspond to a prescription of how authentication is done (even if the details are only in someone’s head).

Page 26: Shibboleth 2.0 IdP slides - Installfest (Edited)

26© 2008 SWITCH

Terms: Login Handler

An IdP component that correlates all supported authentication methods with currently configured authentication mechanisms.

A login handler may map more than one authentication method to the same authentication mechanism.

Page 27: Shibboleth 2.0 IdP slides - Installfest (Edited)

27© 2008 SWITCH

Terms: Session

State information about the user, currently active authentication methods, and services to which they are signed into.

A user’s IdP session is created the first time they authenticate but may outlive the lifetime of all authentication methods.

Page 28: Shibboleth 2.0 IdP slides - Installfest (Edited)

28© 2008 SWITCH

Login Handler: Configuration

• Login handlers are configured in handler.xml•<LoginHandler> defines a login handler• Every login handler definition has a xsi:type attribute that defines the type of the handler.

• Each type has its own set of configuration options.• Each <LoginHandler> must contain at least one <AuthenticationMethod> indicating what authentication method it provides

Page 29: Shibboleth 2.0 IdP slides - Installfest (Edited)

29© 2008 SWITCH

Login Handler: UsernamePassword

•Login handler that prompts for a username/password and validates against a JAAS module (LDAP & Kerberos 5 currently supported)

•Type attribute value:UsernamePassword

•Configuration attributes:–jaasConfigurationLocation path to the JAAS configuration file

Page 30: Shibboleth 2.0 IdP slides - Installfest (Edited)

30© 2008 SWITCH

Login Handler: UsernamePassword

Edit the login.config• Uncomment the LDAP login modules• Configure it like this:

edu.vt.middleware.ldap.jaas.LdapLoginModule required

host=”ldap.example.org”

base="ou=people,dc=example,dc=org"

userField="uid";

Page 31: Shibboleth 2.0 IdP slides - Installfest (Edited)

31© 2008 SWITCH

Login Handler: UsernamePassword

Edit handler.xml

• Comment out RemoteUser handler

• Uncomment UsernamePassword handler• Add unspecified authentication method

<AuthenticationMethod> urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</AuthenticationMethod>

Page 32: Shibboleth 2.0 IdP slides - Installfest (Edited)

32© 2008 SWITCH

Login Handler: Authentication Duration

• Each authentication mechanism supports an activity timeout

• After this timeout expires the mechanism is considered inactive for that user.

• If the user attempts to access a new service provider that requires that authentication mechanism they must re-authenticate.

• It is configured by the authenticationDuration attribute on the <LoginHandler>

• Its value is the number of minutes of inactivity and its default value is 30.

Page 33: Shibboleth 2.0 IdP slides - Installfest (Edited)

33© 2008 SWITCH

Forced Authentication

•Only works with mechanisms that can re-authenticate a user.

•RemoteUser does not support forced authentication.

•The service provider will receive an error if the IdP can not support forced authentication

Page 34: Shibboleth 2.0 IdP slides - Installfest (Edited)

34© 2008 SWITCH

Terms: Authentication Mechanism

A concrete mechanism used to authenticate a user.

Shibboleth 2 currently supports REMOTE_USER, user/pass against LDAP & Kerberos, and IP address based mechanisms.

Page 35: Shibboleth 2.0 IdP slides - Installfest (Edited)

Attribute Resolution

Page 36: Shibboleth 2.0 IdP slides - Installfest (Edited)

36© 2008 SWITCH

Terms: Attribute

A piece of information about a user. Each attribute has a unique ID and has zero of more values.

Shibboleth attributes are protocol-agnostic data structures.

Page 37: Shibboleth 2.0 IdP slides - Installfest (Edited)

37© 2008 SWITCH

Terms: SAML Attribute

An attribute that is represented in SAML notation.

Shibboleth transforms attributes into SAML attributes by a process known as encoding.

Page 38: Shibboleth 2.0 IdP slides - Installfest (Edited)

38© 2008 SWITCH

Terms: Data Connector

A plugin that creates multiple attributes from information in data sources like LDAP and databases.

Shibboleth currently supports static, LDAP, relational database, computed, and stored ID data connectors.

Page 39: Shibboleth 2.0 IdP slides - Installfest (Edited)

39© 2008 SWITCH

Data Connection Configuration

•Data connectors are configured in attribute-resolver.xml•<DataConnector> defines a data connector

•Every data connector has a id attribute that uniquely identifies it.

•Every data connector has a xsi:type attribute that defines the type of the handler.

•Each type has its own set of configuration options.

Page 40: Shibboleth 2.0 IdP slides - Installfest (Edited)

40© 2008 SWITCH

Data Connector Configuration

•Some connectors will need information collected by another plugin in order to work. This is represented by a <resolver:Dependency ref=“NAME” />

•The dependency is declared before any other configuration elements.

•The value of the ref attribute is the ID of the plugin upon which the connector depends.

Page 41: Shibboleth 2.0 IdP slides - Installfest (Edited)

41© 2008 SWITCH

Data Connector Failover

•Data connectors may define failover connectors such that if the data connector fails the failover connector is invoked.

• If more than one failover connector is defined they are tried in order until one succeeds.

•They are defined using:<resolver:FailoverDataConnector ref="CONNECTOR_ID_1" />

Page 42: Shibboleth 2.0 IdP slides - Installfest (Edited)

42© 2008 SWITCH

Terms: Attribute Definition

A plugin that creates a single attribute by transforming other attributes and state information.

Shibboleth currently supports simple, scoping, regex, mapping, template, scripting, principal name, and principal authentication method attribute definitions.

Page 43: Shibboleth 2.0 IdP slides - Installfest (Edited)

43© 2008 SWITCH

Attribute Definition Configuration

•Attribute definitions are configured in attribute-resolver.xml•<AttributeDefinition> defines a definition

•Every definition has a id attribute that uniquely identifies it.

•Every definition has a xsi:type attribute that defines the type of the handler.

•Each type has its own set of configuration options.

Page 44: Shibboleth 2.0 IdP slides - Installfest (Edited)

44© 2008 SWITCH

Attribute Definition Configuration

•Most definitions will need information collected by another plugin in order to work. This is represented by a <resolver:Dependency ref=“NAME” />

•The dependency is declared before any other configuration elements.

•The value of the ref attribute is the ID of the plugin upon which the definition depends.

Page 45: Shibboleth 2.0 IdP slides - Installfest (Edited)

45© 2008 SWITCH

Terms: Attribute Encoder

A plugin that converts an attribute into a protocol specific form, like a SAML attribute.

Attribute encoders are associated with an attribute through the attribute’s attribute definition.

Page 46: Shibboleth 2.0 IdP slides - Installfest (Edited)

46© 2008 SWITCH

Attribute Encoder Configuration

• Attribute encoders are configured as children of an attribute definition.

•<AttributteEncoder> defines an encoder• Every definition has a xsi:type attribute that defines the

type of the handler. • Each type has its own set of configuration options.

Page 47: Shibboleth 2.0 IdP slides - Installfest (Edited)

47© 2008 SWITCH

Terms: Principal Connector

A plugin that converts a name identifier, provided by a relying party, into the internally used userid.

Page 48: Shibboleth 2.0 IdP slides - Installfest (Edited)

48© 2008 SWITCH

Terms: Attribute Resolver

A subsystem in Shibboleth responsible for fetching, transforming, and associating encoders with attributes.

Only attributes produced by attribute definitions leave the resolver and are available to other parts of the system.

Page 49: Shibboleth 2.0 IdP slides - Installfest (Edited)

49© 2008 SWITCH

More About Attribute Dependencies

•Any resolver plugin may have any number of dependencies.

• If more than one dependency provides the same attribute the dependant plugin operates on the effective union of values

•Attribute definitions may be marked with a dependencyOnly=“true” attribute. This ensures the value is never released outside the resolver (and speeds up filtering a bit).

Page 50: Shibboleth 2.0 IdP slides - Installfest (Edited)

50© 2008 SWITCH

Some Examples – LDAP Connector

<resolver:DataConnector xsi:type="LDAPDirectory" xmlns="urn:mace:shibboleth:2.0:resolver:dc" id="MyLDAP" ldapURL="LDAP_URL" baseDN="BASE_DN" principal="PRINCIPAL_NAME" principalCredential="PRINCIPAL_CREDENTIAL">

<FilterTemplate>

<![CDATA[

(uid=${requestContext.principalName})

]]>

</FilterTemplate>

<ReturnAttributes>x y z</ReturnAttributes>

Page 51: Shibboleth 2.0 IdP slides - Installfest (Edited)

51© 2008 SWITCH

Some examples – Static Connector

<resolver:DataConnector id="staticEntitlements" xsi:type="dc:Static"xmlns="urn:mace:shibboleth:2.0:resolver:dc">

<Attribute id="eduPersonEntitlement">

<Value>urn:mace:dir:entitlement:common-lib-terms</Value>

</Attribute>

</resolver:DataConnector>

Page 52: Shibboleth 2.0 IdP slides - Installfest (Edited)

52© 2008 SWITCH

Example – Simple Directory Lookup of epe

<resolver:AttributeDefinitionid="eduPersonEntitlement"xsi:type="Simple" xmlns="urn:mace:shibboleth:2.0:resolver:ad"sourceAttributeID="shibentitlement">

<resolver:Dependency ref="myLDAP" />

<!-- Attribute encoders -->

</resolver:AttributeDefinition>

Page 53: Shibboleth 2.0 IdP slides - Installfest (Edited)

53© 2008 SWITCH

Example – Attribute Encoders

<resolver:AttributeEncoder xsi:type="SAML1String"xmlns="urn:mace:shibboleth:2.0:attribute:encoder"name="urn:mace:dir:attribute -def:eduPersonEntitlement" />

<resolver:AttributeEncoder xsi:type="SAML2String"xmlns="urn:mace:shibboleth:2.0:attribute:encoder"name="urn:oid:1.3.6.1.4.1.5923.1.1.1.7"friendlyName="eduPersonEntitlement" />

Page 54: Shibboleth 2.0 IdP slides - Installfest (Edited)

54© 2008 SWITCH

Some examples – Static entitlements

<resolver:AttributeDefinitionid="eduPersonEntitlement"xsi:type="Simple"xmlns="urn:mace:shibboleth:2.0:resolver:ad" sourceAttributeID="shibentitlement">

<resolver:Dependency ref="staticEntitlements" />

<!-- Attribute Encoders -->

</resolver:AttributeDefinition>

Page 55: Shibboleth 2.0 IdP slides - Installfest (Edited)

55© 2008 SWITCH

Example – Computing epe from group membership

<resolver:AttributeDefinition xsi:type="Script"xmlns="urn:mace:shibboleth:2.0:resolver:ad"id="eduPersonEntitlement">

<Dependency ref="MyLDAP" />

<Script>

<![CDATA[ // Script here

]]>

</Script>

</resolver:AttributeDefinition>

Page 56: Shibboleth 2.0 IdP slides - Installfest (Edited)

56© 2008 SWITCH

Example – Continued

<![CDATA[importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);

epe = new BasicAttribute("eduPersonEntitlement");

for (i = 0; i<isMemberOf.getValues().size(); i++ { if (isMemberOf.getValues().get(i)).equals("STF"){ epe.getValues().add("member"); epe.getValues().add("staff");

}

}

]]>

Page 57: Shibboleth 2.0 IdP slides - Installfest (Edited)

57© 2008 SWITCH

Example – eptid computed

<resolver:AttributeDefinition xsi:type="Scoped" id="eduPersonTargetedID" xmlns="urn:mace:shibboleth:2.0:resolver:ad" scope="example.org" sourceAttributeID="computedID">

<resolver:Dependency ref="computedIDConnector" />

</resolver:AttributeDefinition>

<resolver:DataConnector xsi:type="ComputedId" xmlns="urn:mace:shibboleth:2.0:resolver:dc" id="computedIDConnector" generatedAttributeID="computedID" sourceAttributeID="uid" salt="your random string here">

<resolver:Dependency ref="myLDAP" />

</resolver:DataConnector>

Page 58: Shibboleth 2.0 IdP slides - Installfest (Edited)

58© 2008 SWITCH

Example – eptid stored

<resolver:AttributeDefinition xsi:type="Scoped" id="eduPersonTargetedID" xmlns="urn:mace:shibboleth:2.0:resolver:ad" scope="example.org" sourceAttributeID="storedID">

<resolver:Dependency ref="storedIDConnector" />

</resolver:AttributeDefinition>

Page 59: Shibboleth 2.0 IdP slides - Installfest (Edited)

59© 2008 SWITCH

Example - Continued

<resolver:DataConnector xsi:type="StoredId"xmlns="urn:mace:shibboleth:2.0:resolver:dc"id="storedIDConnector"generatedAttributeID="storedID"sourceAttributeID="uid"salt="ThisIsRandomText">

<resolver:Dependency ref="MyLDAP" />

<ApplicationManagedConnection jdbcDriver="DRIVER_CLASS"

jdbcURL="DATABASE_URL" jdbcUserName="DATABASE_USER" jdbcPassword="DATABASE_USER_PASSWORD" />

<!-- Remember to JDBC driver in correct place -->

</resolver:DataConnector>

Page 60: Shibboleth 2.0 IdP slides - Installfest (Edited)

60© 2008 SWITCH

Example – Continued

• Database created with:CREATE TABLE shibpid (

localEntity VARCHAR NOT NULL,

peerEntity VARCHAR NOT NULL,

principalName VARCHAR NOT NULL,

localId VARCHAR NOT NULL,

persistentId VARCHAR NOT NULL,

peerProvidedId VARCHAR NULL,

creationDate TIMESTAMP NOT NULL,

deactivationDate TIMESTAMP NULL

)

Page 61: Shibboleth 2.0 IdP slides - Installfest (Edited)

61© 2008 SWITCH

Example – adding scope

<resolver:AttributeDefinition id="eduPersonPrincipalName" xsi:type="Scoped" xmlns="urn:mace:shibboleth:2.0:resolver:ad" scope="example.org" sourceAttributeID="uid">

<resolver:Dependency ref="myLDAP" />

</resolver:AttributeDefinition>

Page 62: Shibboleth 2.0 IdP slides - Installfest (Edited)

62© 2008 SWITCH

Example - prescoped

<resolver:AttributeDefinition id="eduPersonPrincipalName" xsi:type="Precoped" xmlns="urn:mace:shibboleth:2.0:resolver:ad" scope="example.org" sourceAttributeID="shibeppn">

<resolver:Dependency ref="myLDAP" />

</resolver:AttributeDefinition>

Page 63: Shibboleth 2.0 IdP slides - Installfest (Edited)

Attribute Filtering

Page 64: Shibboleth 2.0 IdP slides - Installfest (Edited)

64© 2008 SWITCH

Terms: Attribute Filter Policy

A policy containing a trigger, that indicates if the policy is active, and a set of attribute value filters.

Page 65: Shibboleth 2.0 IdP slides - Installfest (Edited)

65© 2008 SWITCH

Attribute Filter Policy Configuration

•Attribute filters are defined in attribute-filter.xml

•Attribute filter policies are declared with <AttributeFilterPolicy>

•Every filter policy has a single id attribute that provides a unique name for the policy.

Page 66: Shibboleth 2.0 IdP slides - Installfest (Edited)

66© 2008 SWITCH

Terms: Policy Requirement Rule

A specific requirement that must be met in order for an attribute filter policy to in effect.

An attribute filter policy may only have one requirement rule but some rules allow child rules to be declared and combined.

Page 67: Shibboleth 2.0 IdP slides - Installfest (Edited)

67© 2008 SWITCH

Policy Requirement Rule Configuration

•<PolicyRequirementRule> defines a requirement rule.

•Every rule has a xsi:type attribute that defines its type.

•Each type has its own set of configuration options.

•Every attribute filter policy must have one, and only one, policy requirement rule

Page 68: Shibboleth 2.0 IdP slides - Installfest (Edited)

68© 2008 SWITCH

Terms: Attribute Rule

A rule, specific to an attribute, that determines which values are released to a relying party.

An attribute filter policy may have any number of attribute rules.

Page 69: Shibboleth 2.0 IdP slides - Installfest (Edited)

69© 2008 SWITCH

Attribute Rule Configuration

•A rule representing the set of values released to a relying party.•<AttributeRule> defines a rule.

•Every rule has an attributeID attribute that identifies the attribute, by ID, to which the rule applies

Page 70: Shibboleth 2.0 IdP slides - Installfest (Edited)

70© 2008 SWITCH

Terms: Permit Value Rule

A rule that determines if an attribute value is permitted to be released to a relying party.

Page 71: Shibboleth 2.0 IdP slides - Installfest (Edited)

71© 2008 SWITCH

Permit Value Rule Configuration

•A rule that signifies a value should be released to the requester.•<PermitValueRule> defines a rule.

•Every rule has a xsi:type attribute that defines its type.

•Each type has its own set of configuration options.

Page 72: Shibboleth 2.0 IdP slides - Installfest (Edited)

72© 2008 SWITCH

Attribute Filtering Gotchyas

•Only those values explicitly permitted are ever released

•There is no way to expressly deny the release of an attributes so be careful how your attribute filter policies overlap (deny value rules will be in 2.1)

•Rules that operate on an attributes’ values will not take into consideration value scopes.

Page 73: Shibboleth 2.0 IdP slides - Installfest (Edited)

73© 2008 SWITCH

Example – Release eptid & eppn to anyone

<AttributeFilterPolicy id="releaseToAnyone">

<PolicyRequirementRule xsi:type="basic:ANY" />

<AttributeRule attributeID="eduPersonTargetedID">

<PermitValueRule xsi:type="basic:ANY" />

</AttributeRule>

<AttributeRule attributeID="eduPe...cipalName">

<PermitValueRule xsi:type="basic:ANY" />

</AttributeRule>

</AttributeFilterPolicy>

Page 74: Shibboleth 2.0 IdP slides - Installfest (Edited)

74© 2008 SWITCH

Example – Release eppn to specific SPs

<AttributeFilterPolicy id="releaseEPPN"> <PolicyRequirementRule xsi:type="basic:OR"> <basic:Rule xsi:type="saml:AttributeRequesterString" value="https://sdauth.sciencedirect.com/sp" />

<basic:Rule xsi:type="saml:AttributeRequesterString" value="urn:mace:athens:somesp" />

</PolicyRequirementRule>

<AttributeRule attributeID="eduPer...cipalName">

<PermitValueRule xsi:type="basic:ANY" />

</AttributeRule>

</AttributeFilterPolicy>

Page 75: Shibboleth 2.0 IdP slides - Installfest (Edited)

75© 2008 SWITCH

Example – Release only allowed epa values

<AttributeFilterPolicy>

<PolicyRequirementRule xsi:type="basic:ANY" /> <AttributeRule attributeID="eduPersonAffiliation">

<PermitValueRule xsi:type="basic:OR">

<basic:Rule xsi:type="basic:AttributeValueString"

value="member" ignoreCase="true" />

<basic:Rule xsi:type="basic:AttributeValueString"

value="staff" ignoreCase="true" />

<!-- etc. -->

</PermitValueRule>

</AttributeRule>

</AttributeFilterPolicy>

Page 76: Shibboleth 2.0 IdP slides - Installfest (Edited)

76© 2008 SWITCH

Example – Release eppn to specific entitygroups

<AttributeFilterPolicy id="releaseEPPN"> <PolicyRequirementRule xsi:type="basic:OR"> <basic:Rule xsi:type="saml:AttributeRequesterInEntityGroup" value="https://ukfederation.org.uk" />

<basic:Rule xsi:type="saml:AttributeRequesterInEntityGroup" value="urn:mace:athens" />

</PolicyRequirementRule>

<AttributeRule attributeID="eduPer...cipalName">

<PermitValueRule xsi:type="basic:ANY" />

</AttributeRule>

</AttributeFilterPolicy>

Page 77: Shibboleth 2.0 IdP slides - Installfest (Edited)

77© 2008 SWITCH

Example – Release eppn to all Sps except...

<AttributeFilterPolicy id="releaseEPPN">

<PolicyRequirementRule xsi:type="basic:NOT">

<basic:Rule xsi:type="basic:OR">

<basic:Rule xsi:type="saml:AttributeRequesterString" value="http://sdauth.sciencedirect.com/sp" />

<basic:Rule xsi:type="saml:AttributeRequesterString" value="urn:mace:athens:somesp" />

</basic:Rule>

</PolicyRequirementRule>

<AttributeRule attributeID="eduPersonPrincipalName">

<PermitValueRule xsi:type="basic:ANY" />

</AttributeRule>

</AttributeFilterPolicy>

Page 78: Shibboleth 2.0 IdP slides - Installfest (Edited)

78© 2008 SWITCH

Example – Release epe if AuthN method is x or y & SP is z...

<PolicyRequirementRule xsi:type="basic:AND">

<basic:Rule xsi:type="basic:OR">

<basic:Rule xsi:type="...AuthenticationMethodString" value="some-string-for-iris-scan" />

<basic:Rule xsi:type="...AuthenticationMethodString" value="some-string-for-fingerprint-reader" />

</basic:Rule>

<basic:Rule xsi:type="..AttributeRequesterString" value="https://myfinanceapp.example.org/sp" />

</basic:Rule>

</PolicyRequirementRule>