SAML2 sample useCaseDemo

Introduction


This is a sample that illustrates the following use cases in  a circle of trust having one Identity Provider(IDP, title shown as GreatAir in sample pages,) and one Service Provider(SP, title shown as BestCars in sample pages).


Installing the sample


The sample is  installed  if you have specified DEPLOY_SAMPLES=true in the  saml2silent file used to install and configure in SAML2 plugin on your system

Prerequisites to use the sample


To run and test the sample

After you have done these, you would be able to run and test out the sample.
See setting up IDP and SP  for detailed instructions on setting up IDP and SP.

Trying sample use cases


This document assumes IDP SAML2 plugin is configured  at http://idp-host/federation/saml2 and SP SAML2 plugin is configured at  http://sp-host/federation/saml2. Please correct the URLs used in the following text to reflect your  installation URLs.  By default SAML2 plugin is configured in Access Manager to run at http://am-host/amserver/saml2. By default SAML2 plugin is configured in Federation Manager to run at http://fm-host/federation/saml2.


IDP initiated SSO and SLO



SP initiated SSO and SLO



IDP Initiated Federation and Defederation


SP Initiated Federation and Defederation


Setting up IDP and SP to try out useCaseDemo sample

Install SAML2 at IDP, create and load meta data


Install SAML2 plugin at IDP http://idp-host/federation/saml2.

Create metaFile and extended metaFile at IDP. Let us call them idp1Meta.xml and idp1MetaX.xml respectively, using the command

<opt/SUNWam/saml2/bin>saml2meta -i <staging dir> template -u <userdn> -w <password> -e <entityID> -d  <idpMetaAlias> -m idp1Meta.xml -x idp1MetaX.xml
(-i option is required only for SAML2 installed in FM)

Edit idp1MetaX.xml and replace

<Attribute name="cotlist">
          <Value></Value>
  </Attribute>

With

<Attribute name="cotlist">
          <Value>samplecot</Value>
  </Attribute>

This is required to add IDP to the circle of trust (COT), "samplecot".  COT, "samplecot"  is automatically created by SAML2 plugin installer.



Import the meta files into IDP, using the command

<opt/SUNWam/saml2/bin>saml2meta -i <staging dir> import -u <userdn> -w <password> -m idp1Meta.xml -x idp1MetaX.xml
(-i option is required only for SAML2 installed in FM)

Install SAML2 at SP, create and load meta data


Install SAML2 plugin at SP http://sp-host/federation/saml2.

Create metaFile and extended metaFile at SP. Let us call them sp1Meta.xml and sp1MetaX.xml respectively, using the command

<opt/SUNWam/saml2/bin>saml2meta -i <staging dir> template -u <userdn> -w <password> -e <entityID> -s  <spMetaAlias>
 -m sp1Meta.xml -x sp1MetaX.xml
(-i option is required only for SAML2 installed in FM)

Edit sp1MetaX.xml and replace

<Attribute name="cotlist">
          <Value></Value>
  </Attribute>

With

<Attribute name="cotlist">
          <Value>samplecot</Value>
  </Attribute>

This is required to add SP to the circle of trust (COT), "samplecot".  COT, "samplecot"  is automatically created by SAML2 plugin installer.


Import meta files into SP.
<opt/SUNWam/saml2/bin>saml2meta -i <staging dir> import -u <userdn> -w <password> -m sp1Meta.xml -x sp1MetaX.xml
(-i option is required only for SAML2 installed in FM)

Register SP meta data with IDP


Get  sp1Meta.xml and sp1MetaX.xml to  a directory at IDP.
Modify sp1MetaX.xml and set attribute hosted="0" for EntityConfig element.
Import SP meta xml files into IDP.
<opt/SUNWam/saml2/bin>saml2meta -i <staging dir> import -u <userdn> -w <password> -m sp1Meta.xml -x sp1MetaX.xml
(-i option is required only for SAML2 installed in FM)

Add SP to COT  "samplecot" at IDP

<opt/SUNWam/saml2/bin>saml2meta -i <staging dir> cotadd -u <userdn> -w <password> -t samplecot -e <SP EntityID>

(-i option is required only for SAML2 installed in FM)

Register IDP meta data with SP


Get  idp1Meta.xml and idp1MetaX.xml to  a directory at SP.
Modify idp1MetaX.xml and set  and set attribute hosted="0" for EntityConfig element.
Import IDP meta xml files into SP.
<opt/SUNWam/saml2/bin>saml2meta -i <staging dir> import -u <userdn> -w <password> -m idp1Meta.xml -x idp1MetaX.xml
(-i option is required only for SAML2 installed in FM)

Add IDP to COT  "samplecot" at SP

<opt/SUNWam/saml2/bin>saml2meta -i <staging dir> cotadd -u <userdn> -w <password> -t samplecot -e <IDP EntityID>
(-i option is required only for SAML2 installed in FM)

Select SAML2 Authentication Module in Authentication Core Service

This needs to be done only for SAML2 installed as SP on FM.

Login(local login) to FM as top level administrator(amadmin).
Navigate to Organization > Authentication > Core : Edit
Select SAML2 in Organization Authentication Modules choice list
Save