| 5 | 1. Configure Apache |
| 6 | {{{ |
| 7 | [sxjpm@alligator ~]$ vi /etc/httpd/conf.d/ssl.conf |
| 8 | <VirtualHost _default_:443> |
| 9 | ServerName casshib.alaska.edu:443 |
| 10 | ... |
| 11 | # iTunesU Integration Pieces |
| 12 | Alias /itunesu /var/www/html/itunesu |
| 13 | <Directory /var/www/html/itunesu> |
| 14 | DirectoryIndex index.pl |
| 15 | Options +ExecCGI |
| 16 | AddHandler cgi-script .pl |
| 17 | </Directory> |
| 18 | <Location /itunesu> |
| 19 | AuthType shibboleth |
| 20 | ShibRequestSetting requireSession 1 |
| 21 | ShibRequestSetting applicationId itunesu |
| 22 | require valid-user |
| 23 | </Location> |
| 24 | </VirtualHost> |
| 25 | }}} |
| 26 | |
| 27 | 2. Configure Shibboleth Logical SP |
| 28 | {{{ |
| 29 | [sxjpm@alligator ~]$ vi /etc/shibboleth/shibboleth2.xml |
| 30 | ... |
| 31 | <!-- iTunesU Integration Stuff --> |
| 32 | <ApplicationOverride id="itunesu" entityID="https://casshib.alaska.edu/itunesu"> |
| 33 | <Sessions lifetime="28800" timeout="3600" |
| 34 | checkAddress="false" handlerURL="/itunesu/Shibboleth.sso" /> |
| 35 | </ApplicationOverride> |
| 36 | ... |
| 37 | }}} |
| 38 | |
| 39 | 3. Generate Shibboleth Logical SP Metadata [[br]] Note that the md:AssertionConsumerService tags need to have their URLs tweaked before submitting the metadata to the IdP. The values 'itunesu/' must be inserted before the 'Shibboleth.sso' value. |
| 40 | {{{ |
| 41 | [sxjpm@alligator ~]$ cd /etc/shibboleth/ |
| 42 | [sxjpm@alligator shibboleth]$ ./metagen.sh -h casshib.alaska.edu -e https://casshib.alaska.edu/itunesu |
| 43 | <md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://casshib.alaska.edu/itunesu"> |
| 44 | <md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:1.0:protocol"> |
| 45 | <md:Extensions> |
| 46 | <DiscoveryResponse xmlns="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol" Binding="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol" Location="https://casshib.alaska.edu/Shibboleth.sso/DS" index="1"/> |
| 47 | </md:Extensions> |
| 48 | <md:KeyDescriptor> |
| 49 | <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> |
| 50 | <ds:X509Data> |
| 51 | <ds:X509Certificate> |
| 52 | MIIC+jCCAeKgAwIBAgIJAJCjNskusfKlMA0GCSqGSIb3DQEBBQUAMBwxGjAYBgNV |
| 53 | BAMTEWFtYXpvbi5hbGFza2EuZWR1MB4XDTEwMTAyMDIzMTYzOVoXDTIwMTAxNzIz |
| 54 | MTYzOVowHDEaMBgGA1UEAxMRYW1hem9uLmFsYXNrYS5lZHUwggEiMA0GCSqGSIb3 |
| 55 | DQEBAQUAA4IBDwAwggEKAoIBAQDYNn6n8nATxM6TCF/4B0SBqfxMZ0U5S21XpGV1 |
| 56 | KjDpFvJzbYKKiZqFFS/utprcPnBTRtxklrCZTQ9TzAkqcyKy7yu10UjU3LE90nD5 |
| 57 | ap7XLL/ubvbzNZt7ExWq0MmUP+RoIxw0OarCd3l73+0gQjrbbOFoHDsKnVP/ecqm |
| 58 | ihwq5y+0wYKaWJ0a8X66iqXDlxWncpA2fheSvCpJuQ0SFNP1UM+xB+rVqoV6Rsiq |
| 59 | LBPPfNTxKw2Wo6LdzegLWr6IYEsekz8vUEtlPFu5O4WCNCoxkuD1LZVOckGyf8Cl |
| 60 | FN3F584npoh9qYut2nof/FXlcyt8y/FQy3IveIUaHxOZ5IfDAgMBAAGjPzA9MBwG |
| 61 | A1UdEQQVMBOCEWFtYXpvbi5hbGFza2EuZWR1MB0GA1UdDgQWBBR1r8eS+S/LgBlN |
| 62 | /1M5ABOrjaySTDANBgkqhkiG9w0BAQUFAAOCAQEAv2P882jFULso1XAM1nJDX3YF |
| 63 | DW1oQGPNEdDh44x5QWWnBRCR9/BEajtjRGFwP4IjEt4by4YXbLT3EoSvdR6eviAF |
| 64 | vfVZA95Gm8ar/PMoJo9vWwd2pRHNC+h9E/bYblRV6tGVkfrDd4OjjsugvQfUAbu+ |
| 65 | Gg0oyojg+QoZ9Ig7H++PEpQkfNIetFFautM4MGFD098pa03n+p5cUpczC32MT9D+ |
| 66 | vvXYnBAlD0XqEos0m0oJbe3chCBkgP72tMl7/P5ty76QiXwLwWI/J1wwZxbiyRMV |
| 67 | BAgIj3qYzIkpe0BFLXjRp9u489Ixq2eoxWVnFnW1EJq5ygjvqP7KGcXNQYExJQ== |
| 68 | </ds:X509Certificate> |
| 69 | </ds:X509Data> |
| 70 | </ds:KeyInfo> |
| 71 | </md:KeyDescriptor> |
| 72 | <!-- |
| 73 | <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://casshib.alaska.edu/Shibboleth.sso/SLO/SOAP"/> |
| 74 | <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://casshib.alaska.edu/Shibboleth.sso/SLO/Redirect"/> |
| 75 | <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://casshib.alaska.edu/Shibboleth.sso/SLO/POST"/> |
| 76 | <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://casshib.alaska.edu/Shibboleth.sso/SLO/Artifact"/> |
| 77 | <md:ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://casshib.alaska.edu/Shibboleth.sso/NIM/SOAP"/> |
| 78 | <md:ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://casshib.alaska.edu/Shibboleth.sso/NIM/Redirect"/> |
| 79 | <md:ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://casshib.alaska.edu/Shibboleth.sso/NIM/POST"/> |
| 80 | <md:ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://casshib.alaska.edu/Shibboleth.sso/NIM/Artifact"/> |
| 81 | --> |
| 82 | <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://casshib.alaska.edu/Shibboleth.sso/SAML2/POST" index="1"/> |
| 83 | <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="https://casshib.alaska.edu/Shibboleth.sso/SAML2/POST-SimpleSign" index="2"/> |
| 84 | <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://casshib.alaska.edu/Shibboleth.sso/SAML2/Artifact" index="3"/> |
| 85 | <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS" Location="https://casshib.alaska.edu/Shibboleth.sso/SAML2/ECP" index="4"/> |
| 86 | <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post" Location="https://casshib.alaska.edu/Shibboleth.sso/SAML/POST" index="5"/> |
| 87 | <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" Location="https://casshib.alaska.edu/Shibboleth.sso/SAML/Artifact" index="6"/> |
| 88 | </md:SPSSODescriptor> |
| 89 | </md:EntityDescriptor> |
| 90 | }}} |
| 91 | |
| 92 | 4. Submit the modified metadata to the IdP [[br]] Refer to the https://iam.alaska.edu/shib/wiki/SetupSpRelyParty article for more info. |
| 93 | |
| 94 | 5. Request the eduPersonPrincipalName and eduPersonEntitlement attributes and configured the Shibboleth Logical SP attribute map.[[br]] See the https://iam.alaska.edu/shib/wiki/SetupSpAttrRelease wiki article for more information on releasing attributes. |
| 95 | {{{ |
| 96 | [sxjpm@alligator shibboleth]$ vi /etc/shibboleth/attribute-map.xml |
| 97 | ... |
| 98 | <Attribute name="urn:mace:dir:attribute-def:eduPersonPrincipalName" id="shibattr-eppn"> |
| 99 | <Attribute name="urn:oid:1.3.6.1.4.1.5923.1.1.1.6" id="shibattr-eppn"> |
| 100 | <AttributeDecoder xsi:type="ScopedAttributeDecoder"/> |
| 101 | </Attribute> |
| 102 | ... |
| 103 | <Attribute name="urn:mace:dir:attribute-def:eduPersonEntitlement" id="entitlement"/> |
| 104 | <Attribute name="urn:oid:1.3.6.1.4.1.5923.1.1.1.7" id="entitlement"/> |
| 105 | ... |
| 106 | }}} |
| 107 | |
| 108 | 6. Setup the Apple iTunesU transfer script[[br]] The iTunesU base transfer script can be downloaded from Apple here: http://images.apple.com/support/itunes_u/docs/iTunes_U_Code_Samples.zip The support center can provide the correct values for the $siteURL, $debugSuffix, and $sharedSecret values. The $ENV values come from the attribute mapping in the Shibboleth Logical SP. |
| 109 | {{{ |
| 110 | [sxjpm@alligator shibboleth]$ cp ~/CodeSamples/Perl/ITunesU.pl /var/www/html/itunesu/index.pl |
| 111 | [sxjpm@alligator shibboleth]$ vi /var/www/html/itunesu/index.pl |
| 112 | ... |
| 113 | # Define your site's information. Replace these |
| 114 | # values with ones appropriate for your site. |
| 115 | my $siteURL = "http://deimos3.apple.com/WebObjects/Core.woa/Browse/alaska.edu"; |
| 116 | my $debugSuffix = "/sun245"; |
| 117 | my $sharedSecret = "V8J3LE8YK8V55Y3LCWEPFG9FXXHCP3SM"; |
| 118 | ... |
| 119 | # additional credentials and the iTunes U access they provide. |
| 120 | my $displayName = $ENV{shibattr_eppn}; |
| 121 | my $emailAddress = $ENV{shibattr_eppn}; |
| 122 | my $username = $ENV{shibattr_eppn}; |
| 123 | my $userIdentifier = $ENV{shibattr_eppn}; |
| 124 | ... |
| 125 | # turn the array of credentials into a semicolon delimited string |
| 126 | my $credentials = $ENV{entitlement}; |
| 127 | ... |
| 128 | }}} |