diff options
-rwxr-xr-x | scripts/get-metadata.sh | 45 | ||||
-rw-r--r-- | swamid-2.0/jira-test.its.umu.se-shibboleth.xml | 53 | ||||
-rw-r--r-- | swamid-sp-2.0.mxml | 1 |
3 files changed, 94 insertions, 5 deletions
diff --git a/scripts/get-metadata.sh b/scripts/get-metadata.sh index 88938b61..efc73c7d 100755 --- a/scripts/get-metadata.sh +++ b/scripts/get-metadata.sh @@ -22,6 +22,13 @@ EOF exit 1 fi +script_cwd=`dirname "$0"` +if test -d swamid-2.0 ; then + echo "Moving into swamid-2.0/" + cd swamid-2.0 + echo "$script_cwd" | grep -q ^/ || script_cwd=../$script_cwd +fi + if echo "$metadataurl" | grep -qE '^http://|^https://' ; then metadata=`curl -s -k -f "$metadataurl"` elif echo "$metadataurl" | grep -qE '^reep:' ; then @@ -48,19 +55,47 @@ entityid=`echo "$metadata" | sed -n 's/.*entityID=['\''"]\([^"]*\)['\''"].*/\1/p entityidfn=`echo "$entityid" | sed 's;https*://;;' | tr 'A-Z' 'a-z' | sed 's;/$;;' | sed 's/[^a-z0-9_.-]/-/g' | sed 's/\.xml$//;s/$/.xml/'` [ -n "$entityidfn" ] || error "Failed to generate filename from entityid $entityid" -if [ -r "$entityidfn" ] ; then - echo -n "Replace $entityidfn with metadata [Y/n]? " -else +[ -r "$entityidfn" ] && new=false || new=true +if $new ; then echo -n "Save metadata into $entityidfn [Y/n]? " +else + echo -n "Replace $entityidfn with metadata [Y/n]? " fi read x case $x in Y|y|"") + if $new ; then + echo -n "Add swamid-2.0/$entityidfn to swamid-sp-2.0.mxml [Y/n]? " + read x + case $x in + Y|y|"") + sed -i "s;^</md:EntitiesDescriptor>; <xi:include href=\"swamid-2.0/$entityidfn\"/>\n&;" ../swamid-sp-2.0.mxml + echo -- + tail -n 10 ../swamid-sp-2.0.mxml | sed 's/^/ /' + echo -- + ;; + *) + echo "Not added" + ;; + esac + fi + echo "$metadata" > $entityidfn tmp=`mktemp` - xsltproc `dirname $0`/../xslt/clean-entitydescriptor.xsl ${entityidfn} > ${tmp} && mv ${tmp} ${entityidfn} + xsltproc $script_cwd/../xslt/clean-entitydescriptor.xsl ${entityidfn} > ${tmp} && mv ${tmp} ${entityidfn} - echo $entityidfn + if $new ; then + echo -n "Add swamid-2.0/$entityidfn to git [Y/n]? " + read x + case $x in + Y|y|"") + git add $entityidfn + ;; + *) + echo "Not added" + ;; + esac + fi ;; *) echo "Nothing done" diff --git a/swamid-2.0/jira-test.its.umu.se-shibboleth.xml b/swamid-2.0/jira-test.its.umu.se-shibboleth.xml new file mode 100644 index 00000000..3ff19eca --- /dev/null +++ b/swamid-2.0/jira-test.its.umu.se-shibboleth.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +This is example metadata only. Do *NOT* supply it as is without review, +and do *NOT* provide it in real time to your partners. + --> +<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://jira-test.its.umu.se/shibboleth"> + <md:Extensions xmlns:alg="urn:oasis:names:tc:SAML:metadata:algsupport"> + <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"/> + <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha384"/> + <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> + <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha224"/> + <alg:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> + <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"/> + <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"/> + <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> + <alg:SigningMethod Algorithm="http://www.w3.org/2009/xmldsig11#dsa-sha256"/> + <alg:SigningMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> + <alg:SigningMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/> + <mdattr:EntityAttributes xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute"> + <samla:Attribute xmlns:samla="urn:oasis:names:tc:SAML:2.0:assertion" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" Name="http://macedir.org/entity-category"> + <samla:AttributeValue>http://www.swamid.se/category/hei-service</samla:AttributeValue> + <samla:AttributeValue>http://www.swamid.se/category/research-and-education</samla:AttributeValue> + </samla:Attribute> + </mdattr:EntityAttributes> + </md:Extensions> + <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"> + <md:Extensions> + <init:RequestInitiator xmlns:init="urn:oasis:names:tc:SAML:profiles:SSO:request-init" Binding="urn:oasis:names:tc:SAML:profiles:SSO:request-init" Location="https://jira-test.its.umu.se/Shibboleth.sso/DS/ds.swamid.se"/> + <idpdisc:DiscoveryResponse xmlns:idpdisc="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol" Binding="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol" Location="https://jira-test.its.umu.se/Shibboleth.sso/DS/ds.swamid.se" index="1"/> + <init:RequestInitiator xmlns:init="urn:oasis:names:tc:SAML:profiles:SSO:request-init" Binding="urn:oasis:names:tc:SAML:profiles:SSO:request-init" Location="https://jira-test.its.umu.se/Shibboleth.sso/Login"/> + <mdui:UIInfo xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui"> + <mdui:DisplayName xml:lang="sv">Jira test, ITS, Umeå universitet</mdui:DisplayName> + <mdui:DisplayName xml:lang="en">Jira test, ITS, Umeå University</mdui:DisplayName> + <mdui:Description xml:lang="sv">Jira test, ITS, IT-stöd och systemutveckling, Umeå universitet</mdui:Description> + <mdui:Description xml:lang="en">Jira test, ITS, ICT Services and System Development, Umeå University</mdui:Description> + </mdui:UIInfo> + </md:Extensions> + <md:ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://jira-test.its.umu.se/Shibboleth.sso/Artifact/SOAP" index="1"/> + <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://jira-test.its.umu.se/Shibboleth.sso/SLO/SOAP"/> + <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://jira-test.its.umu.se/Shibboleth.sso/SLO/Redirect"/> + <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://jira-test.its.umu.se/Shibboleth.sso/SLO/POST"/> + <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://jira-test.its.umu.se/Shibboleth.sso/SLO/Artifact"/> + <md:ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://jira-test.its.umu.se/Shibboleth.sso/NIM/SOAP"/> + <md:ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://jira-test.its.umu.se/Shibboleth.sso/NIM/Redirect"/> + <md:ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://jira-test.its.umu.se/Shibboleth.sso/NIM/POST"/> + <md:ManageNameIDService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://jira-test.its.umu.se/Shibboleth.sso/NIM/Artifact"/> + <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://jira-test.its.umu.se/Shibboleth.sso/SAML2/POST" index="1"/> + <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://jira-test.its.umu.se/Shibboleth.sso/SAML2/Artifact" index="3"/> + <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS" Location="https://jira-test.its.umu.se/Shibboleth.sso/SAML2/ECP" index="4"/> + <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post" Location="https://jira-test.its.umu.se/Shibboleth.sso/SAML/POST" index="5"/> + <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" Location="https://jira-test.its.umu.se/Shibboleth.sso/SAML/Artifact" index="6"/> + </md:SPSSODescriptor> +</md:EntityDescriptor> diff --git a/swamid-sp-2.0.mxml b/swamid-sp-2.0.mxml index 519bfc92..962ad9a8 100644 --- a/swamid-sp-2.0.mxml +++ b/swamid-sp-2.0.mxml @@ -645,4 +645,5 @@ <xi:include href="swamid-2.0/student.utb2.ladok.se-student-sp.xml"/> <xi:include href="swamid-2.0/www.utb2.ladok.se-gui-sp.xml"/> <xi:include href="swamid-2.0/eduroamkonto.kau.se.xml"/> + <xi:include href="swamid-2.0/jira-test.its.umu.se-shibboleth.xml"/> </md:EntitiesDescriptor> |