Shibboleth 2.0 SP slides - Installfest

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Shibboleth 2.0 SP slides - Installfest - Presentation Transcript

    1. Shibboleth 2.0 InstallFest Service Provider Material May 2008 Ann Arbor, MI
    2. SP Overview and Installation
      • Bearings and Terminology
      • Installation and Directory Structure
      • Generating Key and Certificate
      • Picking an entityID
      • Initial Configuration
      • Testing
    3. System Environment
      • CentOS (Red Hat) 5 VM, ssh, "password"
      • Apache 2.2, running on standard ports
      • Bogus SSL certificates
      • AuthConfig added to /cgi-bin for .htaccess
      • Hostnames:
        • sp N .example.com
        • altsp N .example.com (later)
    4. Terminology
      • Service Provider
        • SAML-enabling middleware for web applications
      • shibd
        • SP service/daemon for maintaining state
      • Session
        • Security context and cached data for a logged-in user
      • SessionInitiator
        • Part of SP that generates SSO requests
      • MetadataProvider
        • Provides secure information about IdPs at runtime
      • CredentialResolver
        • Interface from SP to its keys and certificates
    5. Installation
      • RPM-based:
        • $ rpm –ivh /opt/installfest/RPMS/*.rpm
      • Done by RPM after installation:
        • cp /etc/shibboleth/apache22.conf ig/etc/httpd/conf.d/shib.conf
        • cp /etc/shibboleth/shibd-redhat /etc/init.d/shibd
    6. Sanity Checks
      • Start processes:
        • $ /etc/init.d/shibd start
        • $ /etc/init.d/httpd start
      • Check status locally from shell:
        • $ curl -k https://localhost/Shibboleth.sso/Status
      • Access session handler from browser:
        • https://sp N .example.com/Shibboleth.sso/Session
      • Intentionally trigger an error from browser:
        • https://sp N .example.com/Shibboleth.sso/Foo
    7. Binaries
      • /usr/sbin/shibd
      • /usr/bin/resolvertest
      • /usr/bin/mdquery
      • /usr/lib/shibboleth/*.so
        • Apache/etc. modules, SP extensions
    8. Supporting Files
      • /etc/shibboleth
        • master and supporting configuration files
        • locally maintained metadata files
        • HTML templates
        • logging configuration files
        • credentials
      • /var/run/shibboleth
        • UNIX socket
        • remote metadata backups
      • /var/log/shibboleth
        • shibd and transaction logs
      • /var/log/httpd
        • native log (after permission change)
    9. Key/Certificate Generation
      • /etc/shibboleth/keygen.sh
      • Runs automatically during installation on most platforms.
      • For this event, copy over a pre-generated set for your assigned SP number:
        • $ cp /opt/installfest/sp N /sp.key /etc/shibboleth/sp-key.pem
        • $ cp /opt/installfest/sp N /sp.crt /etc/shibboleth/sp-cert.pem
    10. Picking an entityID
      • How NOT to do it (but we’re doing it anyway):
        • https://sp N .example.com/shibboleth
      • Why not?
        • Names should be unique, locally scoped, logical, representative, unchanging.
      • Where are they used?
        • On the wire, local configuration, metadata
        • IdP log files, configuration, filtering policies
    11. Bootstrapping the SP
      • Goals:
        • working SP against a single IdP
        • enable debugging of session attributes
        • avoid clock complaints
      • Give Apache the hostname.
        • $ vi /etc/httpd/conf/httpd.conf
        • Line 265:
          • ServerName sp N .example.com
    12. Bootstrapping the SP (cont.)
      • Relax some requirements and set your entityID and the IdP’s entityID.
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 6 (Do NOT do this in production) :
        • logger="syslog.logger" clockSkew="180000" >
        • Line 77:
        • <ApplicationDefaults id=&quot;default&quot; policyId=&quot;default&quot; entityID=&quot;https://sp N .example.com/shibboleth&quot; >
        • Line 105:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/Login&quot; isDefault=&quot;true&quot; id=&quot;Intranet&quot; relayState=&quot;cookie&quot; entityID=&quot;https://testidp.example.com/idp/shibboleth&quot; >
        • Line 184:
        • <Handler type=&quot;Session&quot; Location=&quot;/Session&quot; showAttributeValues=&quot;true&quot; />
    13. Bootstrapping the SP (cont.)
      • Provide metadata remotely from test IdP:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 208:
        • <MetadataProvider type=&quot;Chaining&quot;>
          • <MetadataProvider type=&quot;XML&quot; url=&quot;https://testidp.example.com/testidp-metadata.xml&quot; backingFilePath=&quot;testidp-metadata.xml&quot; reloadInterval=&quot;3600&quot;/>
      • Supply metadata to parties of interest. (done for you)
        • $ curl -k https://sp N .example.com/Shibboleth.sso/Metadata
    14. Testing the SP
      • Try it with a browser:
        • https://sp N .example.com/cgi-bin/test
      • Dump your session:
          • https://sp N .example.com/Shibboleth.sso/Session
    15. Logging Out
      • To logout locally from the SP and kill your session:
        • https://sp N .example.com/Shibboleth.sso/Logout
      • Or just close the browser and start over.
    16. Trying your own IdP
      • Adjust SessionInitiator and add metadata for your IdP to your SP:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 105:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/Login&quot; isDefault=&quot;true&quot; id=&quot;Intranet&quot; relayState=&quot;cookie&quot; entityID=&quot;https://idp N .example.com/idp/shibboleth&quot; >
        • Line 208:
        • <MetadataProvider type=&quot;Chaining&quot;>
          • <MetadataProvider type=&quot;XML&quot; path=&quot;/opt/installfest/idp N /idp N -metadata.xml&quot;/>
      • Add metadata for your SP to your IdP:
        • $ vi /opt/shibboleth-idp/conf/relying-party.xml
        • <MetadataProvider id=&quot;ShibbolethMetadata&quot; xsi:type=&quot;ChainingMetadataProvider&quot; xmlns=&quot;urn:mace:shibboleth:2.0:metadata&quot;>
          • <MetadataProvider id=&quot;SP N &quot; xsi:type=&quot;FilesystemMetadataProvider&quot; xmlns=&quot;urn:mace:shibboleth:2.0:metadata&quot;
          • metadataFile=&quot;/opt/installfest/sp N /sp N -metadata.xml&quot;/>
    17. Testing
      • Restart Tomcat (and the IdP)
        • $ /etc/init.d/tomcat stop
        • $ ps –ef | grep java
        • $ /etc/init.d/tomcat restart
      • Try it with a browser:
        • https://sp N .example.com/cgi-bin/test
      • Dump your session:
          • https://sp N .example.com/Shibboleth.sso/Session
    18. Use a Discovery Service
      • Use a discovery service by changing the default SessionInitiator:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 105:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/Login&quot; isDefault=&quot;false&quot; id=&quot;Intranet&quot; relayState=&quot;cookie&quot;
        • Line 119:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/DS&quot; id=&quot;DS&quot; relayState=&quot;cookie&quot; isDefault=&quot;true&quot; acsByIndex=&quot;false&quot; >
        • <SessionInitiator type=&quot;SAML2&quot; defaultACSIndex=&quot;1&quot; …/>
        • <SessionInitiator type=&quot;Shib1&quot; defaultACSIndex=&quot;5&quot;/>
        • <SessionInitiator type=&quot;SAMLDS&quot; URL=&quot;https://ds.example.com/DS/WAYF&quot; />
        • </SessionInitiator>
    19. Lazy Sessions
      • The mode of operation so far prevents an application from running without a login.
      • Two other very common cases:
        • public and private access to the same resources
        • separation of application and SP session
      • Semantics are: if valid session exists, then process it as usual (attributes in headers, REMOTE_USER, etc.), but if a session does NOT exist or is invalid, ignore it and pass on control.
    20. Using Lazy Sessions
      • In place of an API to &quot;doLogin&quot;, the SP uses redirects:
        • https://testsp1.example.com/Shibboleth.sso/Login
      • When you want a login to happen, redirect the browser to a SessionInitiator (/Login by convention) with any parameters you want to supply.
    21. Session Creation Parameters
      • https://spaces.internet2.edu/display/SHIB2/NativeSPSessionCreationParameters
      • Key Parameters
        • target (defaults to homeURL or &quot;/&quot;)
        • entityID (IdP to use, if known)
      • Most parameters can come from three places, in order of precedence:
        • query string parameter to handler
        • a content setting (.htaccess or RequestMap)
        • <SessionInitiator> element
    22. Lazy Session Example
      • Access unprotected script:
        • https://sp N .example.com/cgi-bin/content
      • View source to see the Login links:
        • /Shibboleth.sso/Login?target=/cgi-bin/content
        • /Shibboleth.sso/DS?target=/cgi-bin/content
      • Copy it and add any other parameters to see the result: e.g. try supplying the IdP:
        • /Shibboleth.sso/Login? target=/cgi-bin/content& entityID=https://idp N .example.com/idp/shibboleth
      • END
    23. SP Basic Configuraton
      • Summary of Files
      • Structure of Master Configuration
      • Changing Logging Levels
      • Metadata
      • .htaccess
      • RequestMap
      • Handlers
    24. Configuration Files /etc/shibboleth
      • shibboleth2.xml – master
      • apache*.config – Apache module loading
      • attribute-map.xml – attribute handling
      • attribute-policy.xml – attribute filtering
      • *.logger – logging levels
      • *Error.html – error templates
      • localLogout.html – SP-only logout template
      • globalLogout.html – single logout template
    25. shibboleth2.xml Structure
      • <OutOfProcess> / <InProcess>
      • <UnixListener> / <TCPListener>
      • <StorageService>
      • <SessionCache>
      • <ReplayCache>
      • <ArtifactMap>
      • <RequestMapper>
      • <ApplicationDefaults>
      • <SecurityPolicies>
    26. shibboleth2.xml Structure
      • <ApplicationDefaults>
        • <Sessions>
        • <Errors>
        • <RelyingParty> (*)
        • <MetadataProvider>
        • <TrustEngine>
        • <AttributeExtractor>
        • <AttributeResolver>
        • <AttributeFilter>
        • <CredentialResolver>
        • <ApplicationOverride> (*)
    27. Logging
      • Logging controlled independently between Apache and shibd (or globally to a syslog)
      • Transaction log handled out of shibd as a separate stream
      • *.logger files contain predefined settings for output locations and a default logging level (INFO) along with useful categories to raise to DEBUG
    28. Logging: Tracing Messages
      • Raise categories:
        • $ vi shibd.logger
        • Line 14:
        • # tracing of SAML messages and security policies
        • log4j.category.OpenSAML.MessageDecoder=DEBUG
        • log4j.category.OpenSAML.MessageEncoder=DEBUG
        • log4j.category.OpenSAML.SecurityPolicyRule=DEBUG
      • To implement *.logger changes:
        • $ touch shibboleth2.xml
        • $ tail -f /var/log/shibboleth/shibd.log
      • Test the SP again:
        • https://sp N .example.com/cgi-bin/test
    29. SP Metadata Features
      • Four primary methods built-in:
        • Local file (you manage it)
        • Remote file (periodic refresh, backed up for you)
        • Dynamic resolution of entityID
        • &quot;Null&quot; source that disables security
      • Security comes from metadata filtering, either by you or the SP:
        • Signature verification
        • White and blacklists
    30. Signature Verification
      • The test IdP's metadata is signed. Up until now, you loaded it without checking.
      • First, &quot;break&quot; it:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 208:
        • <MetadataProvider type=&quot;Chaining&quot;>
          • <MetadataProvider type=&quot;XML&quot; url=&quot;https://testidp.example.com/testidp-metadata.xml&quot; backingFilePath=&quot;testidp-metadata.xml&quot; reloadInterval=&quot;3600&quot;>
          • <SignatureMetadataFilter certificate=&quot;sp-cert.pem&quot;/>
          • </MetadataProvider>
    31. Signature Verification
      • Now preinstall the right signing key:
        • $ cd /etc/shibboleth
        • $ wget https://testidp.example.com/idp.crt
      • Then fix it:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 208:
        • <MetadataProvider type=&quot;Chaining&quot;>
          • <MetadataProvider type=&quot;XML&quot; url=&quot;https://testidp.example.com/testidp-metadata.xml&quot; backingFilePath=&quot;testidp-metadata.xml&quot; reloadInterval=&quot;3600&quot;>
          • <SignatureMetadataFilter certificate=&quot; idp.crt &quot;/>
          • </MetadataProvider>
    32. Content Settings
      • https://spaces.internet2.edu/display/SHIB2/NativeSPContentSettings
      • Per-host, -directory, -file, -query
      • Apache
        • .htaccess
      • Apache / IIS / other
        • RequestMap
          • Requires meticulous hostname &quot;agreement&quot; (we'll demo this later)
      • Testing with:
        • https://sp N .example.com/cgi-bin/content
    33. .htaccess Examples
      • Requiring authentication:
        • $ vi /var/www/cgi-bin/.htaccess
        • AuthType shibboleth
        • require shibboleth
        • ShibRequestSetting requireSession 1
    34. .htaccess Examples
      • Auto-redirecting to SSL:
        • $ vi /var/www/cgi-bin/.htaccess
        • AuthType shibboleth
        • require shibboleth
        • ShibRequestSetting requireSession 1
        • ShibRequestSetting redirectToSSL 443
    35. .htaccess Examples
      • Bypassing SSO:
        • $ vi /var/www/cgi-bin/.htaccess
        • AuthType shibboleth
        • require shibboleth
        • ShibRequestSetting requireSession 1
        • ShibRequestSetting forceAuthn 1
    36. RequestMap Examples
      • Make sure .htaccess is in its original state.
      • Requiring authentication:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 62:
        • <Host name=&quot; sp N .example.com &quot;>
        • <Path name=&quot; cgi-bin &quot; authType=&quot;shibboleth&quot;
        • requireSession=&quot;true&quot;/>
        • </Host>
    37. RequestMap Fragility
      • By default, Apache &quot;trusts&quot; the client about what the requested hostname is and reports that value internally.
      • To illustrate, now that the &quot;content&quot; script is protected, try this URL:
        • https://altsp N .example.com/cgi-bin/content
      • How to fix?
        • vi /etc/httpd/conf/httpd.conf
        • UseCanonicalName On
    38. RequestMap Examples
      • Auto-redirecting to SSL:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 62:
        • <Host name=&quot;sp N .example.com&quot;>
        • <Path name=&quot;cgi-bin&quot; authType=&quot;shibboleth&quot;
        • requireSession=&quot;true&quot; redirectToSSL=&quot;443&quot; />
        • </Host>
    39. RequestMap Examples
      • Bypassing SSO:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 62:
        • <Host name=&quot;sp N .example.com&quot;>
        • <Path name=&quot;cgi-bin&quot; authType=&quot;shibboleth&quot;
        • requireSession=&quot;true&quot; forceAuthn=&quot;true&quot; />
        • </Host>
    40. Other Content Settings
      • Requesting types of authentication
      • Error handling pages
      • Redirection-based error handling
      • isPassive
      • Supplying a specific IdP to use
    41. SP Handlers
      • &quot;Virtual&quot; applications inside the SP with access to its APIs:
        • SessionInitiator (requests)
        • AssertionConsumerService (incoming SSO)
        • LogoutInitiator (SP signout)
        • SingleLogoutService (incoming SLO)
        • ManageNameIDService (adv. SAML)
        • ArtifactResolutionService (adv. SAML)
        • Generic (diagnostics, other useful features)
    42. SP Handlers
      • The URL of a handler is the handlerURL + the Location of the handler.
        • e.g. for a virtual host testsp.example.com with handlerURL of &quot;/Shibboleth.sso&quot;, a handler with a Location of &quot;/Login&quot; will be https://testsp.example.com/Shibboleth.sso/Login
      • Handlers aren’t always SSL-only, but usually should be (handlerSSL=&quot;true&quot;).
      • Most of your metadata consists of your entityID, your keys, and your handlers.
      • Handlers are never &quot;protected&quot; by the SP.
    43. Some Handler Options
      • SessionInitiator and LogoutInitiators are the most &quot;tweakable&quot;. Some minor examples:
      • Remove relayState to pass URLs by value.
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 105:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/Login&quot; isDefault=&quot;true&quot; id=&quot;Intranet&quot; relayState=&quot;cookie&quot; entityID=&quot;https://testidp.example.com/idp/shibboleth&quot;>
    44. Some Handler Options
      • Switch to Artifact binding for response:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 105:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/Login&quot; isDefault=&quot;true&quot; id=&quot;Intranet&quot; relayState=&quot;cookie&quot; entityID=&quot;https://testidp.example.com/idp/shibboleth&quot;>
        • <SessionInitiator type=&quot;SAML2&quot; defaultACSIndex=&quot;2&quot; template=&quot;bindingTemplate.html&quot;/>
    45. Some Handler Options
      • Switch from SAML 2 Redirect to POST:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 105:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/Login&quot; isDefault=&quot;true&quot; id=&quot;Intranet&quot; relayState=&quot;cookie&quot; entityID=&quot;https://testidp.example.com/idp/shibboleth&quot;>
        • <SessionInitiator type=&quot;SAML2&quot; defaultACSIndex=&quot;1&quot; template=&quot;bindingTemplate.html&quot;
        • outgoingBindings=&quot;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST&quot; />
      • END
    46. SP Attribute Handling
      • Terminology
      • Scoped Attributes
      • Adding New Attribute Mappings
      • REMOTE_USER and Identifiers
      • Filtering Overview
      • Source-Based Filtering
      • Access Control
    47. SP Attribute Terminology
      • Push
        • delivering attributes with SSO assertion
      • Pull
        • querying for attributes after SSO
      • Extraction
        • decoding SAML information into neutral data structures mapped to environment or header variables
      • Filtering
        • blocking invalid, unexpected, or unauthorized values based on application or community criteria
      • Resolution
        • resolving a SSO assertion into a set of additional attributes (e.g. queries)
    48. Scoped Attributes
      • Common term across I2 middleware for attributes that consist of a relation between a value and a &quot;scope&quot;, usually an organizational domain or subdomain.
      • Makes simpler values globally usable or unique.
      • Lots of special treatment in Shibboleth to make them more useful and &quot;safe&quot;.
    49. Attribute Mappings
      • SAML attributes from any source are &quot;extracted&quot; using the configuration rules in attribute-map.xml
      • Each element is a rule for decoding a SAML attribute and assigning it a local &quot;id&quot; which becomes its mapped variable name.
      • Attributes can have > 1 &quot;id&quot; and multiple attributes can be mapped to the same &quot;id&quot;.
      • Decoders are attribute-independent but syntax-dependent.
    50. Dissecting an attribute rule
      • <Attribute id=&quot;affiliation&quot; aliases=&quot;affil&quot;
      • name=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot;>
      • <AttributeDecoder xsi:type=&quot;ScopedAttributeDecoder&quot;
      • caseSensitive=&quot;false&quot;/>
      • </Attribute>
        • id
          • the primary &quot;id&quot; to map into
        • aliases
          • optional alternate names to map into
        • name
          • SAML attribute name or NameID format to map from
        • AttributeDecoder xsi:type
          • decoder plugin to use (defaults to simple/string)
        • caseSensitive
          • how to compare values at runtime (defaults to true)
    51. Adding mappings
      • Add first and last name for both SAML 1 and SAML 2:
        • $ vi /etc/shibboleth/attribute-map.xml
        • <Attribute name=&quot;urn:mace:dir:attribute-def:sn&quot; id=&quot;sn&quot;/>
        • <Attribute name=&quot;urn:mace:dir:attribute-def:givenName&quot; id=&quot;givenName&quot;/>
        • <Attribute name=&quot;urn:oid:2.5.4.4&quot; id=&quot;sn&quot;/>
        • <Attribute name=&quot;urn:oid:2.5.4.42&quot; id=&quot;givenName&quot;/>
      • Takes effect immediately but NOT for any existing sessions.
    52. REMOTE_USER
      • Special single-valued variable that all web applications should support for container-managed authentication of a unique user.
      • Any attributes, once extracted/mapped, can be copied to REMOTE_USER.
      • Multiple attributes can be examined in order of preference, but only the first value will be used.
    53. Changing REMOTE_USER
      • Put the &quot;sn&quot; attribute into REMOTE_USER:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 80:
        • REMOTE_USER=&quot; sn eppn&quot;
      • Note without the mappings added earlier, no change will occur.
    54. Attribute Filtering
      • Answers the &quot;who can say what&quot; question on behalf of an application.
      • Usual examples:
        • constraining the possible values of an attribute (e.g. eduPersonAffiliation)
        • limiting the scopes/domains an IdP can speak for (e.g. OSU cannot assert faculty@umich.edu)
        • limiting custom attributes to particular sources
    55. Default Policy
      • Shared rule for legal affiliation values
      • Shared rule for scoped attributes
      • Generic policy applying those rules and letting all other attributes through.
      • Check /var/log/shibboleth/shibd.log for signs of filtering…
      • Combining policies currently a bit buggy in IdP and SP, fix forthcoming.
    56. Add a Source-Based Rule
      • Add a rule to limit acceptance of &quot;sn&quot; to a single IdP:
        • $ vi /etc/shibboleth/attribute-policy.xml
        • Line 55:
        • <afp:AttributeRule attributeID=&quot;sn&quot;>
        • <afp:PermitValueRule xsi:type=&quot;AttributeIssuerString&quot; value=&quot;https://idp N .example.com/idp/shibboleth&quot;/>
        • </afp:AttributeRule>
    57. Access Control
      • Not formally part of the SP, but cleanly integrated with it via an AccessControl API built into the request processing flow.
      • Two implementations are provided:
        • .htaccess &quot;require&quot; rule processing
        • XML-based policy syntax attached to content via RequestMap
    58. .htaccess Access Control
      • Special rules:
        • shibboleth (no authz)
        • valid-user (require a session, but NOT identity)
        • user (REMOTE_USER as usual)
        • group (group files as usual)
        • authnContextClassRef, authnContextDeclRef
      • &quot;OR&quot; implied unless ShibRequireAll used
      • Regular expressions supported using special syntax:
        • require rule ~ exp
    59. .htaccess Example
      • Require an entitlement or specific users:
        • $ vi /var/www/cgi-bin/.htaccess
        • AuthType shibboleth
        • ShibRequestSetting requireSession 1
        • require entitlement http://channel8.msdn.com/user
        • require user ~ ^staff(1|2)@example.com$
    60. XML Access Control
      • Portable across servers, mainly an example of what's possible; competing with XACML is not a goal.
      • For convenience, embeddable inside RequestMap syntax, but can be externalized.
      • Same special rules as .htaccess, adds boolean operators (<AND>,<OR>,<NOT>).
    61. XML Example
      • Require an entitlement or specific users:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 62:
        • <Host name=&quot;sp N .example.com&quot;>
        • <Path name=&quot;cgi-bin&quot; authType=&quot;shibboleth&quot; requireSession=&quot;true&quot;>
        • <AccessControl>
        • <OR>
        • <Rule require=&quot;entitlement&quot;> http://channel8.msdn.com/user</Rule>
        • <RuleRegex require=&quot;user&quot;>^staff(1|2)@example.com$</RuleRegex>
        • </OR>
        • </AccessControl>
        • </Path>
        • </Host>
      • END
    62. Session Initiators / Discovery
      • Concepts
      • Chains and protocol precedence
      • Lazy sessions
      • Discovery services
      • Internal discovery mechanisms
    63. Session Initiators / Discovery Concepts
      • Session Initiator
        • handler that creates a SSO request for an IdP or uses a discovery mechanism to identity the IdP (or both)
      • Discovery (in Shibboleth)
        • identifying the IdP of a particular user
        • can be internal or external, automatic or invasive
      • WAYF Service
        • old name in Shibboleth for a particular way to do discovery
      • Handler Chain
        • sequence of handlers that share configuration and run consecutively until &quot;something useful happens&quot; or an error occurs
    64. Simplest Case
      • Single IdP, single protocol, no discovery:
        • <SessionInitiator
        • type=&quot;SAML2&quot; id=&quot;simple&quot; isDefault=&quot;true&quot;
        • Location=&quot;/Login&quot;
        • entityID=&quot;https://testidp.example.com/idp/shibboleth&quot;
        • relayState=&quot;cookie&quot;
        • defaultACSIndex=&quot;1&quot;
        • template=&quot;bindingTemplate.html&quot;
        • />
      • Resembles the typical approach used in 1.3 SP but omits hardcoding the IdP's location.
    65. Intranet Case
      • Single IdP, multiple protocols, no discovery:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/Login&quot;
        • id=&quot;Intranet&quot; isDefault=&quot;true&quot; relayState=&quot;cookie&quot;
        • entityID=&quot; https://testidp.example.com/idp/shibboleth&quot;>
        • <SessionInitiator type=&quot;SAML2&quot; defaultACSIndex=&quot;1&quot; template=&quot;bindingTemplate.html&quot;/>
        • <SessionInitiator type=&quot;Shib1&quot; defaultACSIndex=&quot;5&quot;/>
        • </SessionInitiator>
      • Protocol precedence controlled by order of chain.
      • Common properties defined at the top and inherited by chain links.
    66. Favoring Legacy Protocol
      • Switch order of chain:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 105:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/Login&quot;
        • id=&quot;Intranet&quot; isDefault=&quot;true&quot; relayState=&quot;cookie&quot;
        • entityID=&quot; https://testidp.example.com/idp/shibboleth&quot;>
        • <SessionInitiator type=&quot;Shib1&quot; defaultACSIndex=&quot;5&quot;/>
        • <SessionInitiator type=&quot;SAML2&quot; defaultACSIndex=&quot;1&quot; template=&quot;bindingTemplate.html&quot;/>
        • </SessionInitiator>
      • Still allows either protocol, but if the IdP supports Shibboleth profile of SAML 1, it will be used instead.
    67. Discovery
      • Protocol SessionInitiators work when the IdP is known.
      • For consistency, discovery is implemented with alternate SessionInitiators that operate only when the IdP is NOT known.
      • A typical federated chain includes one or more &quot;protocol&quot; handlers followed by a single &quot;discovery&quot; handler at the end.
    68. Typical Discovery Methods
      • External Options
        • older WAYF model, specific to Shibboleth/SAML1, SP loses control if a problem occurs
        • newer SAMLDS model, recently standardized, supports multiple SSO protocols and allows the SP to control the process
      • Internal Options
        • implemented by an application, followed by a redirect with the entityID
        • advanced &quot;Cookie&quot;, &quot;Form&quot;, and &quot;Transform&quot; SessionInitiators
    69. DS Case
      • Multiple protocols, discovery via DS:
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/DS&quot;
        • id=&quot;DS&quot; isDefault=&quot;true&quot; relayState=&quot;cookie&quot;>
        • <SessionInitiator type=&quot;SAML2&quot; defaultACSIndex=&quot;1&quot; acsByIndex=&quot;false&quot; template=&quot;bindingTemplate.html&quot;/>
        • <SessionInitiator type=&quot;Shib1&quot; defaultACSIndex=&quot;5&quot;/>
        • <SessionInitiator type=&quot;SAMLDS&quot; URL=&quot;https://ds.example.com/DS&quot;/>
        • </SessionInitiator>
      • Same as intranet case, but omits entityID and adds a &quot;safety net&quot; at the bottom.
      • A bit sneaky: the DS handler tells the DS to return the user to this location with a lazy session redirect that will invoke an earlier handler in the chain.
    70. Problems with External Discovery
      • Loss of control, UI fidelity
      • Impact of errors
      • Choice of IdPs becomes arbitrary: metadata errors have to be handled
      • Comprehensiveness is impossible in a world of multiple federations, and the list is too long if there's only one federation
    71. Advanced SessionInitiators
      • Form SessionInitiator
        • Crude DS relying on HTML form template, NOT meant to replace the actual DS implementation.
      • Cookie SessionInitiator (early in chain)
        • Parses _saml_idp cookie maintained by idpHistory feature and sets entityID ahead of other handlers.
      • Transform SessionInitiator (early in chain)
        • Applies substitution or regex patterns against entityID to turn it into another entityID until metadata is available.
    72. Advanced Example
      • Use a form to prompt for the entityID, or a domain name or email address that is input to a convention (https://testidp.domain/idp/shibboleth):
        • <SessionInitiator type=&quot;Chaining&quot; Location=&quot;/DS&quot;
        • id=&quot;DS&quot; isDefault=&quot;true&quot; relayState=&quot;cookie&quot;>
        • <SessionInitiator type=&quot;Transform&quot;>
        • <Subst>https://testidp.$entityID/idp/shibboleth</Subst>
        • <Regex match=&quot;.+@(.+)&quot;>https://testidp.$1/idp/shibboleth</Regex>
        • </SessionInitiator>
        • <SessionInitiator type=&quot;SAML2&quot; defaultACSIndex=&quot;1&quot; acsByIndex=&quot;false&quot; template=&quot;bindingTemplate.html&quot;/>
        • <SessionInitiator type=&quot;Shib1&quot; defaultACSIndex=&quot;5&quot;/>
        • <SessionInitiator type=&quot;Form&quot; template=&quot;discoveryTemplate.html&quot;/>
        • </SessionInitiator>
      • END
    73. SP Advanced Integration
      • Error Handling
      • Logout
    74. Error Handling Approaches
      • https://spaces.internet2.edu/display/SHIB2/NativeSPErrors
      • Default is to output customizable templates divided into a couple of types of errors.
        • Templates written in HTML plus simple markup allowing information to be plugged in.
        • PLEASE customize these pages.
      • Optionally can redirect to a script on errors with parameters identifying the error.
        • Major use case: passive SSO failure.
    75. Logout
      • Two types of sign-out operations: local and global.
      • Local logout affects only the SP (and possibly applications behind it).
      • Global logout includes the IdP and possibly other SPs sharing the session at the IdP.
        • Most global/single logout protocols can start at either end.
    76. IdP-initiated Logout
      • Logout protocols that start at the IdP, such as SAML's, are implemented by SingleLogoutService handlers.
      • Details are dependent on the protocol, but generally will result in transfer back to the IdP regardless of the outcome.
    77. SP-initiated Logout
      • Relies on a chain of handlers called LogoutInitiators.
      • Each handler understands a single SSO protocol and how to perform logout for it.
      • The &quot;Local&quot; handler typically runs if nothing else does, and performs a local sign-out operation, ignoring the IdP.
    78. Application Notification
      • https://spaces.internet2.edu/display/SHIB2/NativeSPNotify
      • Applications can be notified when logout occurs by installing scripts to receive redirects or loopback XML messages.
      • Notifications allow applications to clean up their state before the SP cleans up its own.
      • END
    79. SP Virtualization
      • Terminology
      • Adding a second vhost-based application
      • Clustering
      • HTTP virtualization
    80. Terminology
      • Service Provider (physical)
        • an installation of the software on a server
      • Service Provider (logical)
        • web resources viewed externally as a unit
        • each entityID identifies exactly one logical SP
      • SP Application
        • web resources viewed internally as a unit
        • each applicationId identifies exactly one logical application
        • a user session is bound to exactly one application
    81. Virtualization Concepts
      • A single physical SP can host any number of logical SPs. (virtual hosting)
        • A logical SP can then include any number of &quot;applications&quot;.
        • Web virtual hosting is often related but is also independent.
        • Applications can inherit or override default configuration settings on a piecemeal basis.
      • Multiple physical SPs can also act as a single logical SP. (clustering)
    82. Adding an Application
      • Goal: add a second application with its own entityID living on its own virtual host.
      • Add the application and map the host to it:
        • $ vi /etc/shibboleth/shibboleth2.xml
        • Line 55:
        • <RequestMap applicationId=&quot;default&quot;>
        • <Host applicationId=&quot;alt&quot;/>
        • Line 243:
        • <ApplicationOverride id=&quot;alt&quot; entityID=&quot;https://altsp N .example.com/shibboleth&quot;/>
        • </ApplicationDefaults>
    83. Clustering
      • Configure multiple physical installations to share an entityID, and possibly credentials.
      • Configuration files often can be identical across servers that share an external hostname.
      • Session management:
        • For applications already handling this, 2-3 minute sticky sessions usually sufficient.
        • SP itself now clusterable via ODBC, soon memcached.
    84. HTTP Virtualization
      • Broadly, it's when the physical connection into a server has a different scheme, hostname, or port than the client sees.
      • Not all web servers actually support this!
        • &quot;Support&quot; means that the server's internal APIs allow an application to correctly construct an absolute redirect to itself.
    85. HTTP Virtualization
      • The SP relies on the web server to be correctly configured.
        • Apache virtual host definitions allow the scheme, hostname, and port to be &quot;overridden&quot; from the physical values. You MUST do this if you expect the SP to work.
      • For servers without native support (i.e. IIS), the SP has &quot;gap filling&quot; features allowing the scheme, hostname, and port to be supplied on a per-site basis.
        • https://spaces.internet2.edu/display/SHIB2/NativeSPISAPI
      • END
    86. SP Relying Party Configuration
      • Philosophically, goal is to reduce or eliminate IdP-specific settings:
        • deployment profiles and best practices
        • uniform entityID and metadata
        • uniform credentials
      • Counter to this goal are federation-specific approaches to naming, certificates, and security requirements.
      • Using PKI across federations is a major impediment to SP deployment and interfederation.
    87. Relying Party Settings
      • https://spaces.internet2.edu/display/SHIB2/NativeSPRelyingParty
      • Most settings are security- or connectivity-related:
        • signing and encryption rules, algorithms
        • selecting among multiple keys or certificates
        • authentication types and connection timeouts for back-channel communications to IdPs
        • rules for signing or encryption imposed on messages from IdPs
    88. Relying Party Selection
      • API to acquire settings is metadata-based and not as flexible as it should be
      • Primary matching based on IdP's entityID
      • Secondary matching proceeds up through any enclosing EntitiesDescriptor groups.
        • <md:EntitiesDescriptor Name=&quot;https://thefederation.com&quot;>
        • <md:EntitiesDescriptor Name=&quot;https://thefederation.com/group1&quot;>
        • <md:EntityDescriptor entityID=&quot;https://sp.example.com/shibboleth&quot;/>
        • </md:EntitiesDescriptor>
        • </md:EntitiesDescriptor>
    89. Credential Selection Example
      • Most common use case today.
      • With 2.0, credentials can be annotated with a name used when looking up the right set to use:
        • <ApplicationDefaults …>
        • <RelyingParty Name=&quot;https://theotherfederation.com&quot; keyName=&quot;other&quot;/>
        • <CredentialResolver type=&quot;Chaining&quot;>
        • <CredentialResolver type=&quot;File&quot;
        • key=&quot;sp-key.pem&quot; certificate=&quot;sp-cert.pem&quot;/>
        • <CredentialResolver type=&quot;File&quot; keyName=&quot;other&quot;
        • key=&quot;sp-key.pem&quot; certificate=&quot;other-cert.pem&quot;/>
        • </CredentialResolver>
        • </ApplicationDefaults>
    90. Complications
      • Settings can only be chosen based on the IdP once the IdP is known.
      • Sometimes settings needed in contexts in which the IdP is not known:
        • legacy WAYF model
        • SAML 2 Enhanced Client profile
      • Moral of the story: most settings simply shouldn't vary to avoid needless complexity.
      • END
    91. Campus SSO Support
      • OSU Experiences
      • Pros
      • Cons
      • Strategies and Issues
    92. OSU Deployment
      • Dates to 2004, accelerated deployment during 2005.
      • Migration from legacy software at 50+ departmental servers completed by March 2007.
      • Currently 141 locally registered SPs, server count closer to 100.
      • Two servers handle 80-130,000 logins/day.
      • 0.4 FTE
    93. Pros
      • Feature-rich without being fragile
      • Unified internal/external solution
      • Clusters/scales efficiently
      • Attribute support without requiring LDAP
      • Enforces proper application design
    94. Cons
      • Certificates and XML
      • Lack of web server expertise
      • Enforcing entityID sanity
      • Crazy hosting practices
      • Zero-effort expectations
        • configuration effort, especially error handling
        • using support channels
        • metadata and software maintenance
    95. Local Documentation
      • Put in a local context and set expectations
      • Pointers to support resources, preferably not your email address
      • Step by step process with starter files or a custom installer/package
        • metadata
        • routing requests to IdP
        • local attributes and conventions
        • error templates
    96. Attributes, Attributes, Attributes
      • Precise definitions
      • Local semantics
      • Conventions for header names
      • Influence developer practices
    97. Process
      • Certificate strategy: take advantage of 2.0 keypair generation
      • SP registration: manual or automated
      • IdP metadata: local vs. reuse of federation; understanding the security and operational issues
      • Policies for attribute release: avoiding &quot;policy by sysadmin&quot;
      • Awareness of updates and EOL timelines
    98. Federation Implications
      • Few local services may be interested in federating, and few of those may be ready.
      • Local strategy needn't focus on it, but shouldn't preclude it either.
        • single IdP
        • use of federation metadata
        • federation-friendly design practices
      • InCommon simplifying process of federating existing sites without reissuing credentials.
      • Campus-level WAYF/DS quite sensible.
      • END
    99. Federating Applications
      • Definitions
      • Policy or Wing It?
      • Authentication and Identifiers
      • Discovery
      • Introduction Problem
      • End User Support
    100. Definitions
      • Federation of an application
        • Accepting identity attributes from multiple, distinct external sources that do not share a common identity namespace.
        • Protocol agnostic (relying on OpenID is federation).
        • Implies some degree of externalization, but much may be left internal.
    101. Policy vs. Expediency
      • Address everything up front contractually or rely on remediation strategies through existing channels?
      • Level of Assurance
        • Formal means of assessing and articulating proofing, credentialing, and authentication processes.
        • Contrast with SSO within our organizations.
        • Contrast with non-federated alternatives.
    102. Externalizing Authentication
      • Most visible, well understood part
      • Analagous to making SSO work locally
      • Consider the cost of limiting the application to a single federation protocol
      • Consider dynamic provisioning of identities at the time of login
    103. Identifiers
      • Must determine application requirements for different kinds of identifiers.
      • Assumptions on length, character set fall apart in a federated model.
      • Lots of subtleties:
        • uniqueness
        • persistence
        • reassignment
        • human readability
        • social knowledge
    104. Common Identifiers
      • local userid/netid
        • usually readable, persistent but not permanent, often reassigned, not unique
      • email address
        • usually readable, persistent but not permanent, often reassigned, unique
      • eduPersonPrincipalName
        • usually readable, persistent but not permanent, can be reassigned, unique
      • eduPersonTargetedID / SAML 2.0 persistent ID
        • not readable, semi-permanent, not reassigned, unique
      • OpenID
        • usually somewhat readable, usually persistent, may be reassignable, unique
    105. eduPersonTargetedID
      • Legacy attribute placeholder for the SAML 2.0 persistent NameID format:
        • opaque
        • pairwise (IdP/SP, could be shared by >1 SP)
        • original motivation was privacy, but strongest features are lack of reassignment and immunity to name changes
        • <saml:NameID
        • Format=&quot;urn:oasis:names:tc:SAML:2.0:nameid-format:persistent&quot;
        • NameQualifier=&quot;https://testidp.example.com/idp/shibboleth&quot;
        • SPNameQualifier=&quot;https://testsp.example.com/shibboleth&quot;
        • >anystringthatcouldbeup256chars</saml:NameID>
        • https://testidp.example.com/idp/shibboleth!https://testsp.example.com/shibboleth!anystringthatcouldbeup256chars
    106. eduPersonTargetedID
      • Minimally supported so far:
        • not easily stored in LDAP
        • can be generated from a hash, but with drawbacks:
            • value tied to inputs (underlying userid, name of SP)
            • can't be refreshed to maintain privacy
            • hard to reverse efficiently
        • ideally generated randomly and stored and managed in a database, but adds state and additional backup requirements to IdP
    107. Discovery
      • Two kinds of applications:
        • relatively balanced audience across IdPs
        • overweighted to a single IdP with a few outliers
      • Most campus applications are the latter, making discovery a usability issue (or so some argue).
      • Easy solution is also a poor one:
        • &quot;Click here if you're not from Foobar U&quot;
        • I'll happily phish your users, just don't do it to mine
    108. Introduction Problem
      • More pronounced with federation, but can arise with SSO alone.
      • Traditional apps have access to their entire user population in advance.
      • Assigning roles or adding access involves a &quot;people picker&quot;.
      • There is no federated people picker, and privacy limits the ability to build one in the general sense.
    109. Introduction Problem
      • Basic use case:
        • I want to add person X to a group or give them to access a resource.
      • What is X? Can it be known in advance? If not, is strong security even possible?
      • Next major problem frontier.
    110. End User Support
      • Supporting a federated application from the IdP side is a dead end (e.g. OpenID).
      • Applications MUST provide adequate feedback to users and prepare their support staff for the change.
      • I argue they also must own access issues even if they ultimately get blamed on the IdP, or federation will never scale.
      • END
    111. SAML Metadata
      • Scope
      • Terminology
      • Migration Support
      • Trust Management
      • Identity Provider Metadata
      • Service Provider Metadata
    112. Scope
      • Entities in hierarchical groups
      • Peer roles and protocol support
      • Profile support and endpoint locations
      • Advertising extension support
      • Trust management
      • Encryption keys
      • Attribute support and requirements
      • Contact information
    113. Scope
      • Not in Scope:
        • Authorization policy
        • Security policy
      • Maybe in Scope:
        • Federation-asserted attributes about members
        • Profiles for non-SAML protocol families
    114. Other Relevancies
      • WS-Federation metadata proposals
      • WS-MetadataExchange
      • XRI and XRDS (used by OpenID)
      • DNSSEC, SRV records
    115. Terminology
      • EntityDescriptor
        • A distinct SAML-supporting system, can be collected into EntitiesDescriptor groups.
      • Role
        • A SAML functional role played by a system (IdP, SP, AA, PDP, etc.)
      • Protocol
        • A set of profiles grouped into a single &quot;family&quot; (SAML 1.0, SAML 1.1, SAML 2.0, etc.)
      • Endpoint
        • A descriptor identifying how to invoke a service supporting a particular profile.
      • KeyDescriptor
        • A signing or encryption key, underspecified syntax.
    116. Supporting Migration
      • Metadata use backported to SAML 1.1 by Shibboleth project, standardized at OASIS.
      • Entity roles tagged with supported protocols, allowing new protocols to be added without affecting existing deployments.
      • Supports multiple keys for key rollover.
    117. Trust Management
      • Agreement
        • Vehicle for communicating who can be trusted and how to establish that trust at a technical level.
      • Less Agreement
        • How to communicate trust and whether to do so absent additional infrastructure.
        • Aggregation of metadata.
      • Generally: peer to peer vs. additional PKI
    118. Trust Management
      • Shibboleth Implementation and Goals
        • Produce a well-documented and understandable set of approaches accomodating different communities.
        • Pursue a disaggregation of PKI from the SAML runtime to enable federation to scale without a global PKI.
        • Collaborate with vendors on profiles to standardize approaches.
    119. Identity Provider Metadata
      • Typically include IdP and AA roles, reflecting attribute query use in Shibboleth
      • Endpoints for SSO requests, queries, logout, advanced SAML profiles
      • Signing/encryption keys
      • Supported NameID formats, Attributes
      • Contact information
      • Proposal made to carry organization logos
    120. Service Provider Metadata
      • Role representing notion of a SAML-enabled web site supporting SSO profiles
      • Endpoints for SSO responses, logout, advanced SAML profiles
      • Signing/encryption keys
      • Supported NameID formats
      • Rudimentary support for expressing &quot;service levels&quot; and attribute requirements
      • Contact information

    + JISC.AMJISC.AM, 2 years ago

    custom

    3397 views, 1 favs, 0 embeds more stats

    Shibboleth 2.0 Installfest, 1-2 July, Birmingham.

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 3397
      • 3397 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 38
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories