34
Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Embed Size (px)

Citation preview

Page 1: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Shibboleth 2.0 IdP Training:Basics and Installation

January, 2009

Page 2: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

IdP Basics: Terms – SAML

• Security Access Markup Language

• XML-based standard for authentication and authorization data interchange

• Identity Provider – producer of assertions

• Service Provider – consumer of assertions

• Current Version: 2.0

• Shibboleth 2.0 implements SAML 2.0

Page 3: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

IdP Basics: Terms – Entity ID

• A unique URI for a Shibboleth Identity Provider (IdP) or Service Provider (SP)

• The recommended format is a URL

• https://idp.colostate.edu/idp/shibboleth

• InCommon Federation uses URNs:

• urn:mace:incommon:colostate.edu

Page 4: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

IdP Basics: Terms – Relying Party

• The SAML peer to which the IdP is communicating with

• The peer in most cases for an IdP is an SP

Page 5: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

IdP Basics: Terms – Profile

• A description of how to use SAML to accomplish a specific task

• Profiles define the interface for SAML peers

Page 6: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

IdP Basics: Terms – Metadata

• A description of the SAML features supported by a SAML entity

• This includes the URLs for communicating with the entity

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

Page 7: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

IdP Installation Prerequisites

• Three basic prerequisites for installation:

• Java Virtual Machine

• Java Servlet Container

• HTTP Listener

• You should be comfortable installing software on your platform

Page 8: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

IdP Installation Prerequisites

Prerequisite What we’re using

Java Virtual Machine Sun Java SE 6

Java Servlet Container Apache Tomcat 6

HTTP Listener Apache HTTPD 2.2 + mod_proxy_ajp

Page 9: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Apache Tomcat Shibboleth

Prerequisites• Set in

TOMCAT_HOME/conf/server.xml

• Turn off Apache Tomcat authentication (optional)

• Set AJP listener to accept connections from localhost only

Page 10: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Lab: Shibboleth Installation

• Unzip the distribution archive

• Run an install script

• Answer questions

• Deploy a WAR file

• Restart Tomcat and verify the installation on port 8080

Page 11: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Shibboleth Home (SHIB_HOME)

• /opt/shibboleth-idp should contain

• The Shibboleth documentation refers to this directory as SHIB_HOME

bin logs

conf metadata

credentials war

lib

Page 12: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

SHIB_HOME/bin• Contains command line tools

• aacli: attribute authority command line interface

• version: returns the IdP version

Page 13: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

SHIB_HOME/conf

• Contains the IdP’s configuration files:

• We will cover most of these today

attribute-filter.xml logging.xml

attribute-resolver.xml

login.config

handler.xml relying-party.xml

internal.xml service.xml

Page 14: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

SHIB_HOME/credentials

• Credentials used by the IdP

• The installer creates these:

• idp.key (IdP key)

• idp.crt (certificate)

• idp.jks (keystore)

• You can use this directory to store Federation certificates

Page 15: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

SHIB_HOME/lib• Copies of libraries in the WAR file

that make up the IdP

• Used by the command line tools

Page 16: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

SHIB_HOME/logs• Contains the IdP log files

• idp-process.log*

• idp-access.log

• idp-audit.log

• * Often referred to when troubleshooting

Page 17: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

SHIB_HOME/metadata

• Contains metadata files

• Files placed in this directory are not automatically loaded

Page 18: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

SHIB_HOME/war• Contains the IdP WAR file created by

the installer

• Note that we configured Apache Tomcat to run the IdP directly from the WAR file

Page 19: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

HTTP Listener• Apache Tomcat has a built-in HTTP

listener and can be used as a standalone

• Apache HTTPD is a web server often implemented as a HTTP listener for Tomcat

• Using both can offer flexibility

• And interface well with legacy components

Page 20: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Apache HTTPD and Tomcat

• Use mod_proxy_ajp

• Define VirtualHosts for the Shibboleth SAML profiles, which listen on ports 443 and optionally 8443

• mod_proxy directive to connect to Tomcat

• Certificate settings

• Others as required (logging, etc.)

Page 21: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Lab: Apache HTTPD• Configure Apache HTTPD as the HTTP

listener for Apache Tomcat

• mod_proxy_ajp has already been installed

• Modify /etc/httpd/conf/httpd.conf

• Add the ProxyPass for /idp

• Restart Apache HTTPD

Page 22: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Logging

• Configured using the logging.xml file

• 5 Logging levels

• ERROR

• WARN

• INFO

• DEBUG

• TRACE

Page 23: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Lab: Logging• Change the logging level of the

edu.internet2.middleware.shibboleth logger and evaluate the difference in the logging messages

Page 24: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Metadata: General• Describes SAML features supported

by the IdP and SP

• Includes the URLs for communicating with the IdP and SP

• Certificates for IdPs and SPs to trust each other

• Federations will typically control and publish metadata

Page 25: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Metadata: Configuration

• Metadata can be stored and loaded locally (use SHIB_HOME/metadata)

• Metadata can also be loaded from a remote source

• We will discuss both configurations

Page 26: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Metadata: Configuration

• Metadata is loaded into the IdP by metadata providers

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

• A single metadata “container” provider is defined where you will define within it your metadata providers

Page 27: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Metadata: Defining a Provider

• Metadata providers are defined using the <MetadataProvider> element

• Every metadata provider must have a:

• Unique ID using the id attribute

• Type using the xsi:type attribute

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

Page 28: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Metadata: Filesystem Provider• The Filesystem metadata provider

loads a metadata file from the local filesystem.

• Use type definition:

• xsi:type="FilesystemMetadataProvider"

• Configuration attribute

• metadataFile

Page 29: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Metadata: File-backed HTTP

Provider• Loads metadata via HTTP and backs

it up to local file

• Type definition:• xsi:type="FileBackedHTTPMetadataProvider"

• Configuration attributes:

• metadataURL

• backingFile

Page 30: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Lab: Metadata Providers

• Define a file-backed HTTP metadata provider

Page 31: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Multiple Metadata Providers

• The chaining metadata provider processes children metadata providers in the order they are defined

• If the same entity is defined in more than one metadata provider, only the first definition found will be used

Page 32: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Metadata Registration

• Metadata must be shared between relying parties

• Federations typically have a centralized registration process and systems

• Register certificates and profiles

Page 33: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

Lab: Metadata Registration

• Register your IdP so it can interact with the SP/DS in the lab

Page 34: Shibboleth 2.0 IdP Training: Basics and Installation January, 2009

References

• More information on IdP basics and installation can be found at:

• https://spaces.internet2.edu/display/SHIB2/Installation