From aab254a9894c8d04679e7aeffcab22f35eeadf7d Mon Sep 17 00:00:00 2001 From: Markus Krogh Date: Mon, 2 Oct 2017 14:20:48 +0200 Subject: Rearange template files. Start on templating --- idp/Dockerfile | 7 +- idp/shib-entrypoint.sh | 20 +- idp/template-config/README.md | 5 - idp/template-config/attribute-filter.xml | 283 ---------------------- idp/template-config/attribute-resolver.xml | 223 ----------------- idp/template-config/edupersontargetdid.xml.add | 16 -- idp/template-config/logback.xml | 199 ---------------- idp/template-config/metadata-providers.xml | 57 ----- idp/templates/config/README.md | 5 + idp/templates/config/attribute-filter.xml | 283 ++++++++++++++++++++++ idp/templates/config/attribute-resolver.xml | 223 +++++++++++++++++ idp/templates/config/edupersontargetdid.xml.add | 16 ++ idp/templates/config/logback.xml | 199 ++++++++++++++++ idp/templates/config/metadata-providers.xml | 57 +++++ idp/templates/edit-webapp/css/NORDUnet.css | 302 ++++++++++++++++++++++++ idp/templates/edit-webapp/images/nordunet.png | Bin 0 -> 20823 bytes idp/templates/views/layout.vm | 32 +++ idp/templates/views/login.vm | 116 +++++++++ 18 files changed, 1255 insertions(+), 788 deletions(-) delete mode 100644 idp/template-config/README.md delete mode 100644 idp/template-config/attribute-filter.xml delete mode 100644 idp/template-config/attribute-resolver.xml delete mode 100644 idp/template-config/edupersontargetdid.xml.add delete mode 100644 idp/template-config/logback.xml delete mode 100644 idp/template-config/metadata-providers.xml create mode 100644 idp/templates/config/README.md create mode 100644 idp/templates/config/attribute-filter.xml create mode 100644 idp/templates/config/attribute-resolver.xml create mode 100644 idp/templates/config/edupersontargetdid.xml.add create mode 100644 idp/templates/config/logback.xml create mode 100644 idp/templates/config/metadata-providers.xml create mode 100644 idp/templates/edit-webapp/css/NORDUnet.css create mode 100644 idp/templates/edit-webapp/images/nordunet.png create mode 100644 idp/templates/views/layout.vm create mode 100644 idp/templates/views/login.vm diff --git a/idp/Dockerfile b/idp/Dockerfile index ce4c0a9..b110812 100644 --- a/idp/Dockerfile +++ b/idp/Dockerfile @@ -7,7 +7,7 @@ COPY install.properties /opt/ COPY nordu-ldap.properties /opt/ COPY shibboleth-identity-provider-${IDP_VERSION}.tar.gz.sha256 /opt/ COPY shibboleth-identity-provider-${IDP_VERSION}.tar.gz /opt/ -COPY template-config/ /opt/template-config +COPY templates /opt/templates WORKDIR /opt RUN echo $(id) && apk --no-cache add bash apache-ant curl && \ #curl -O https://shibboleth.net/downloads/identity-provider/${IDP_VERSION}/shibboleth-identity-provider-${IDP_VERSION}.tar.gz && \ @@ -15,9 +15,12 @@ RUN echo $(id) && apk --no-cache add bash apache-ant curl && \ tar xf shibboleth-identity-provider-$IDP_VERSION.tar.gz && \ mv shibboleth-identity-provider-$IDP_VERSION shibboleth-identity-provider && \ ./shibboleth-identity-provider/bin/install.sh -propertyfile install.properties && \ + cp -a /opt/templates/edit-webapp/* /opt/shibboleth-idp/edit-webapp/ && \ + ./shibboleth-idp/bin/build.sh && \ apk --no-cache del apache-ant && \ cp -a /opt/shibboleth-idp/conf /opt/org-conf && \ - cp /opt/template-config/*.xml /opt/shibboleth-idp/conf && \ + cp /opt/templates/config/*.xml /opt/shibboleth-idp/conf && \ + cp -a /opt/templates/views/* /opt/shibboleth-idp/views/ && \ sed -i '/p:postAuthenticationFlows=/ s/p:postAuthenticationFlows="attribute-release" //' /opt/shibboleth-idp/conf/relying-party.xml && \ rm -rf shibboleth-identity-provider* install.properties nordu-ldap.properties ADD https://mds.swamid.se/md/md-signer2.crt /opt/shibboleth-idp/credentials/ diff --git a/idp/shib-entrypoint.sh b/idp/shib-entrypoint.sh index 7803c11..56ce16c 100755 --- a/idp/shib-entrypoint.sh +++ b/idp/shib-entrypoint.sh @@ -48,13 +48,15 @@ if [ -n "$IDP_PERSISTENTID_SALT" ]; then -e "/idp.persistentId.salt/ s/changethistosomethingrandom/$IDP_PERSISTENTID_SALT/" /opt/shibboleth-idp/conf/saml-nameid.properties # add xml conf to attribute-resolver if ! grep "%{idp.persistentId.sourceAttribute}" /opt/shibboleth-idp/conf/attribute-resolver.xml ; then - sed -i '//r /opt/template-config/edupersontargetdid.xml.add' /opt/shibboleth-idp/conf/attribute-resolver.xml + sed -i '//r /opt/templates/config/edupersontargetdid.xml.add' /opt/shibboleth-idp/conf/attribute-resolver.xml fi fi if [ -n "$IDP_DEBUG" ]; then - echo "idp.loglevel.messages=DEBUG" >> $IDP_PROPERTIES - echo "idp.loglevel.encryption=DEBUG" >> $IDP_PROPERTIES + if ! grep "idp.loglevel.messages=DEBUG" $IDP_PROPERTIES ; then + echo "idp.loglevel.messages=DEBUG" >> $IDP_PROPERTIES + echo "idp.loglevel.encryption=DEBUG" >> $IDP_PROPERTIES + fi fi DATADIR=/opt/data @@ -64,8 +66,20 @@ if [ -f ${DATADIR}/credentials/idp-signing.key -a -f ${DATADIR}/credentials/idp- cp ${DATADIR}/credentials/idp-signing.crt /opt/shibboleth-idp/credentials/idp-signing.crt fi +if [ -e ${DATADIR}/messages ]; then + cp $DATADIR/messages/* /opt/shibboleth-idp/messages/ +fi + if [ $IDP_DEBUG ]; then sed -i -e '/idp.loglevel.messages/ s/INFO/DEBUG/' -e '/idp.loglevel.encryption/ s/INFO/DEBUG/' /opt/shibboleth-idp/conf/logback.xml fi +# Styling/view properties +IDP_MESSAGES=/opt/shibboleth-idp/messages/messages.properties +if [ -n "$IDP_FOOTER" ]; then + if ! grep "idp.footer" $IDP_PROPERTIES; then + echo "idp.footer=$IDP_FOOTER" >> $IDP_PROPERTIES + fi +fi + /docker-entrypoint.sh java -jar /usr/local/jetty/start.jar $JAVA_OPTIONS diff --git a/idp/template-config/README.md b/idp/template-config/README.md deleted file mode 100644 index 6002238..0000000 --- a/idp/template-config/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# IDP config templates - -This directory contains the files which are being replaced after running install. - -Dockerfile should install these after running install. diff --git a/idp/template-config/attribute-filter.xml b/idp/template-config/attribute-filter.xml deleted file mode 100644 index 3514282..0000000 --- a/idp/template-config/attribute-filter.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/idp/template-config/attribute-resolver.xml b/idp/template-config/attribute-resolver.xml deleted file mode 100644 index 92fb1bb..0000000 --- a/idp/template-config/attribute-resolver.xml +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - urn:x-ldapgroup:ndn-sysadmin - cn=ndn-sysadmin,ou=groups,dc=nordu,dc=net - - - urn:x-ldapgroup:ndn-netadmin - cn=ndn-netadmin,ou=groups,dc=nordu,dc=net - - - urn:x-ldapgroup:ndn-secadmin - cn=ndn-secadmin,ou=groups,dc=nordu,dc=net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - memberOf - - - - - NORDUnet A/S - - - nordu.net - - - urn:schac:homeOrganizationType:int:NREN - - - NORDUNet - - - urn:mace:dir:entitlement:common-lib-terms - urn:mace:terena.org:tcs:escience-user - urn:mace:terena.org:tcs:personal-user - urn:mace:rediris.es:entitlement:wiki:tfemc2 - urn:mace:swami.se:gmai:sunet-baas:admin - urn:mace:swami.se:gmai:sunet-iaas:admin - urn:mace:swami.se:gmai:sunet-iaas:user - - - - - - diff --git a/idp/template-config/edupersontargetdid.xml.add b/idp/template-config/edupersontargetdid.xml.add deleted file mode 100644 index 8601da6..0000000 --- a/idp/template-config/edupersontargetdid.xml.add +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - diff --git a/idp/template-config/logback.xml b/idp/template-config/logback.xml deleted file mode 100644 index 6afa4ef..0000000 --- a/idp/template-config/logback.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${idp.logfiles}/idp-process.log - - - ${idp.logfiles}/idp-process-%d{yyyy-MM-dd}.log.gz - ${idp.loghistory:-180} - - - - UTF-8 - %date{ISO8601} - %level [%logger:%line] - %msg%n%ex{short} - - - - - - - VelocityStatusMatcher - ResourceManager : unable to find resource 'status.vm' in any resource loader. - - VelocityStatusMatcher.matches(formattedMessage) - - DENY - - - - - - 0 - - - - - - WARN - - - ${idp.logfiles}/idp-warn.log - - - ${idp.logfiles}/idp-warn-%d{yyyy-MM-dd}.log.gz - ${idp.loghistory:-180} - - - - UTF-8 - %date{ISO8601} - %level [%logger:%line] - %msg%n%ex{short} - - - - - - - VelocityStatusMatcher - ResourceManager : unable to find resource 'status.vm' in any resource loader. - - VelocityStatusMatcher.matches(formattedMessage) - - DENY - - - - - - ${idp.logfiles}/idp-audit.log - - - ${idp.logfiles}/idp-audit-%d{yyyy-MM-dd}.log.gz - ${idp.loghistory:-180} - - - - UTF-8 - %msg%n - - - - - - ${idp.logfiles}/idp-consent-audit.log - - - ${idp.logfiles}/idp-consent-audit-%d{yyyy-MM-dd}.log.gz - ${idp.loghistory:-180} - - - - UTF-8 - %msg%n - - - - - - ${idp.home}/logs/idp-audit-fticks.log - - ${idp.home}/logs/idp-audit-fticks%d{yyyy-MM-dd}.log.gz - 180 - - - UTF-8 - %msg%n - - - - - ${idp.fticks.loghost:-localhost} - ${idp.fticks.logport:-514} - AUTH - [%thread] %logger %msg - - - - - - - - - - - - - - - - - - - - - diff --git a/idp/template-config/metadata-providers.xml b/idp/template-config/metadata-providers.xml deleted file mode 100644 index d813c06..0000000 --- a/idp/template-config/metadata-providers.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - md:SPSSODescriptor - - - - - - - diff --git a/idp/templates/config/README.md b/idp/templates/config/README.md new file mode 100644 index 0000000..6002238 --- /dev/null +++ b/idp/templates/config/README.md @@ -0,0 +1,5 @@ +# IDP config templates + +This directory contains the files which are being replaced after running install. + +Dockerfile should install these after running install. diff --git a/idp/templates/config/attribute-filter.xml b/idp/templates/config/attribute-filter.xml new file mode 100644 index 0000000..3514282 --- /dev/null +++ b/idp/templates/config/attribute-filter.xml @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/idp/templates/config/attribute-resolver.xml b/idp/templates/config/attribute-resolver.xml new file mode 100644 index 0000000..92fb1bb --- /dev/null +++ b/idp/templates/config/attribute-resolver.xml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + urn:x-ldapgroup:ndn-sysadmin + cn=ndn-sysadmin,ou=groups,dc=nordu,dc=net + + + urn:x-ldapgroup:ndn-netadmin + cn=ndn-netadmin,ou=groups,dc=nordu,dc=net + + + urn:x-ldapgroup:ndn-secadmin + cn=ndn-secadmin,ou=groups,dc=nordu,dc=net + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + memberOf + + + + + NORDUnet A/S + + + nordu.net + + + urn:schac:homeOrganizationType:int:NREN + + + NORDUNet + + + urn:mace:dir:entitlement:common-lib-terms + urn:mace:terena.org:tcs:escience-user + urn:mace:terena.org:tcs:personal-user + urn:mace:rediris.es:entitlement:wiki:tfemc2 + urn:mace:swami.se:gmai:sunet-baas:admin + urn:mace:swami.se:gmai:sunet-iaas:admin + urn:mace:swami.se:gmai:sunet-iaas:user + + + + + + diff --git a/idp/templates/config/edupersontargetdid.xml.add b/idp/templates/config/edupersontargetdid.xml.add new file mode 100644 index 0000000..8601da6 --- /dev/null +++ b/idp/templates/config/edupersontargetdid.xml.add @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/idp/templates/config/logback.xml b/idp/templates/config/logback.xml new file mode 100644 index 0000000..6afa4ef --- /dev/null +++ b/idp/templates/config/logback.xml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${idp.logfiles}/idp-process.log + + + ${idp.logfiles}/idp-process-%d{yyyy-MM-dd}.log.gz + ${idp.loghistory:-180} + + + + UTF-8 + %date{ISO8601} - %level [%logger:%line] - %msg%n%ex{short} + + + + + + + VelocityStatusMatcher + ResourceManager : unable to find resource 'status.vm' in any resource loader. + + VelocityStatusMatcher.matches(formattedMessage) + + DENY + + + + + + 0 + + + + + + WARN + + + ${idp.logfiles}/idp-warn.log + + + ${idp.logfiles}/idp-warn-%d{yyyy-MM-dd}.log.gz + ${idp.loghistory:-180} + + + + UTF-8 + %date{ISO8601} - %level [%logger:%line] - %msg%n%ex{short} + + + + + + + VelocityStatusMatcher + ResourceManager : unable to find resource 'status.vm' in any resource loader. + + VelocityStatusMatcher.matches(formattedMessage) + + DENY + + + + + + ${idp.logfiles}/idp-audit.log + + + ${idp.logfiles}/idp-audit-%d{yyyy-MM-dd}.log.gz + ${idp.loghistory:-180} + + + + UTF-8 + %msg%n + + + + + + ${idp.logfiles}/idp-consent-audit.log + + + ${idp.logfiles}/idp-consent-audit-%d{yyyy-MM-dd}.log.gz + ${idp.loghistory:-180} + + + + UTF-8 + %msg%n + + + + + + ${idp.home}/logs/idp-audit-fticks.log + + ${idp.home}/logs/idp-audit-fticks%d{yyyy-MM-dd}.log.gz + 180 + + + UTF-8 + %msg%n + + + + + ${idp.fticks.loghost:-localhost} + ${idp.fticks.logport:-514} + AUTH + [%thread] %logger %msg + + + + + + + + + + + + + + + + + + + + + diff --git a/idp/templates/config/metadata-providers.xml b/idp/templates/config/metadata-providers.xml new file mode 100644 index 0000000..d813c06 --- /dev/null +++ b/idp/templates/config/metadata-providers.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + md:SPSSODescriptor + + + + + + + diff --git a/idp/templates/edit-webapp/css/NORDUnet.css b/idp/templates/edit-webapp/css/NORDUnet.css new file mode 100644 index 0000000..f7c3ef2 --- /dev/null +++ b/idp/templates/edit-webapp/css/NORDUnet.css @@ -0,0 +1,302 @@ +#wrapper { + width: 100%; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + color: #000; + // background: #fff url('images/pipes_back.jpg') repeat-y top left; +} + +#top { + display: block; + width: 100%; + background: #00B2E4 url('images/top_back.gif') repeat-x bottom left; + overflow: hidden; + +} +#top_table { + margin:0; + padding:0; + margin-top: 33px; + width: 900px; + border-collapse: collapse; + margin-bottom: -1px; + + +} + +#top_table td { + vertical-align:bottom; +} + +#top_table td img { + margin-bottom: 20px; + display: block; + padding-right:10px; + +} + +#main_nav { + margin:0; + padding:0; + list-style:none; + color: #fff; + height: 40px; + display: block; + +} + +#main_nav li { + display: block; + float: left; + background: url('images/main_nav_left.gif') no-repeat bottom left; + padding: 0 0 0 11px; + +} +#main_nav li#selectedPage { + background: url('images/main_nav_left_selected.gif') no-repeat bottom left; +} +#main_nav li a { + display: block; + float: left; + padding: 0 11px 0 0; + height: 40px; + color: #fff; + text-decoration: none; + outline: 0; + background: url('images/main_nav_back.gif') no-repeat bottom right; +} + +#main_nav li#selectedPage a { + background: url('images/main_nav_back_selected.jpg') no-repeat bottom right; + color: #000; + +} +#main_nav li a span { + vertical-align: middle; + display: block; + padding-top: 10px; + +} + +#left { + clear: both; + background: #fff url('images/left_back.gif') repeat-y top left; + width: 200px; + float: left; +} + +#search_form { + padding-left: 8px; + width: 200px; + margin: 10px 0 20px 0; +} + +#search_form .input_image { + + vertical-align: middle; +} + +#nav { + + width: 200px; + font-size: 12px; + clear: both; +} + +#nav #intro { + width: 179px; + background: #fff url('images/intro_top.jpg') no-repeat top left; + padding: 15px 10px 1px 10px; +} + +#nav #intro_footer { + width: 199px; + height:27px; + background: #fff url('images/intro_bottom.jpg') no-repeat top left; +} + + +#nav ul.site_tree, +#nav ul.site_tree ul, +#nav ul.site_tree li { + margin: 0; + padding: 0; + list-style: none; + +} +#nav ul.site_tree { + background: transparent url(images/subnavback.gif) no-repeat bottom left; + padding-bottom:2px; +} + +#nav ul.site_tree a { + color: #4F4E4E; + text-decoration: none; + display: block; +} + +#nav ul.site_tree a:hover { + text-decoration: none; +} + +#nav ul.site_tree strong.level1 { + color: #000; + display: block; + background-color: #59BAE7; +} + +#nav ul.site_tree li.level2 { + background: transparent url(images/subnavback.gif) no-repeat top left; +} + + +#nav ul.site_tree a.level1, +#nav ul.site_tree strong.level1 { + padding:5px 0 5px 10px; + +} + +#nav ul.site_tree li.level2 { + display:block; + padding: 5px 0 2px 15px; +} + +#nav ul.site_tree a.level2 { + +} + +#nav #nav_pic { + display: block; + margin: 0; + padding: 0; +} + + +h1 { + font-size: 20px; + color: #004788; +} + +h2 { + font-size: 18px; + color: #004788; +} + +h3 { + font-size: 16px; + color: #004788; +} + +h4 { + font-size: 14px; + color: #004788; +} + +h5 { + font-size: 12px; + color: #004788; +} + +p { + font-size: 12px; + color: #004788; + +} + +ul { + font-size: 12px; + color: #004788; + +} + +#content { + margin-left: 200px; + padding: 20px; + width: auto; + line-height: 1.5em; +} + +#content table { + border-collapse: collapse; +} + +#content th { + background-color: #f0f0f0; + padding: 5px; + color: #036; +} + +#content td { + vertical-align: middle; + padding: 5px; +} + +*html #content table { width:99%; } + +#footer { + clear: both; + width: 100%; + height: 35px; + background-color: #D8D8D8; + border-top: 1px solid #989898; + border-bottom: 1px solid #989898; +} + +#footer p { + vertical-align: middle; + margin: 12px 10px 10px 200px; + font-size: 10px; + color: #848484; +} + +#footer img { + float: left; + margin: 0px 0px 0px 2px; +} + +hr { + border: 0; + color: #696969; + background-color:#696969; + height: 1px; +} + + +#intro img{ + padding-top: 5px; + border: none; +} + +/* Open trouble tickets */ +#opentickets { + margin-left: 200px; + padding: 0 20px 20px 20px; + width: auto; +} + +.blue { +background:#004788 none repeat scroll 0 0; +} + +.text { + font-size: 12px; + color: #004788; +} + +.group_heading { +color:#004788; +font-size:12px; +font-weight:bolder; +} + +.list_info { +background-color:#D9EFFA; +color:#004788; +padding:0.6em; +} + +.whitebold { +color:#FFFFFF; +font-size:12px; +font-weight:bold; +} diff --git a/idp/templates/edit-webapp/images/nordunet.png b/idp/templates/edit-webapp/images/nordunet.png new file mode 100644 index 0000000..9948f66 Binary files /dev/null and b/idp/templates/edit-webapp/images/nordunet.png differ diff --git a/idp/templates/views/layout.vm b/idp/templates/views/layout.vm new file mode 100644 index 0000000..7dca3b5 --- /dev/null +++ b/idp/templates/views/layout.vm @@ -0,0 +1,32 @@ +#macro(layout) + + + + + + $title - $titleSuffix + + + + +
+
+
+ #springMessageText( + #if ($titleSuffix) +

#springMessageText("idp.title", "Web Login Service") - $titleSuffix

+ #end +
+
+ $!bodyContent +
+
+
+ +
+
+ + +#end diff --git a/idp/templates/views/login.vm b/idp/templates/views/login.vm new file mode 100644 index 0000000..b4f02d0 --- /dev/null +++ b/idp/templates/views/login.vm @@ -0,0 +1,116 @@ +## +## Velocity Template for DisplayUsernamePasswordPage view-state +## +## Velocity context will contain the following properties +## flowExecutionUrl - the form action location +## flowRequestContext - the Spring Web Flow RequestContext +## flowExecutionKey - the SWF execution key (this is built into the flowExecutionUrl) +## profileRequestContext - root of context tree +## authenticationContext - context with authentication request information +## authenticationErrorContext - context with login error state +## authenticationWarningContext - context with login warning state +## ldapResponseContext - context with LDAP state (if using native LDAP) +## rpUIContext - the context with SP UI information from the metadata +## extendedAuthenticationFlows - collection of "extended" AuthenticationFlowDescriptor objects +## passwordPrincipals - contents of the shibboleth.authn.Password.PrincipalOverride bean +## encoder - HTMLEncoder class +## request - HttpServletRequest +## response - HttpServletResponse +## environment - Spring Environment object for property resolution +## custom - arbitrary object injected by deployer +## +#set ($rpContext = $profileRequestContext.getSubcontext('net.shibboleth.idp.profile.context.RelyingPartyContext')) +#set ($username = $authenticationContext.getSubcontext('net.shibboleth.idp.authn.context.UsernamePasswordContext', true).getUsername()) +#set ($passwordEnabled = false) +#if (!$passwordPrincipals or $passwordPrincipals.isEmpty() or $authenticationContext.isAcceptable($passwordPrincipals)) + #set ($passwordEnabled = true) +#end +## +#parse("layout.vm") + +#@layout() +
+ #parse("login-error.vm") + +
+ + #set ($serviceName = $rpUIContext.serviceName) + #if ($serviceName && !$rpContext.getRelyingPartyId().contains($serviceName)) + + #springMessageText("idp.login.loginTo", "Login to") $encoder.encodeForHTML($serviceName) + + #end + + #if ($passwordEnabled) +
+ + +
+ +
+ + +
+ +
+ + +
+ #end + +
+ + +
+ + #if ($passwordEnabled) +
+ +
+ #end + + #foreach ($extFlow in $extendedAuthenticationFlows) + #if ($authenticationContext.isAcceptable($extFlow) and $extFlow.apply(profileRequestContext)) +
+ +
+ #end + #end +
+ + #* + // + // SP Description & Logo (optional) + // These idpui lines will display added information (if available + // in the metadata) about the Service Provider (SP) that requested + // authentication. These idpui lines are "active" in this example + // (not commented out) - this extra SP info will be displayed. + // Remove or comment out these lines to stop the display of the + // added SP information. + // + *# + #set ($logo = $rpUIContext.getLogo()) + #if ($logo) + $encoder.encodeForHTMLAttribute($serviceName) + #end + #set ($desc = $rpUIContext.getServiceDescription()) + #if ($desc) + $encoder.encodeForHTML($desc) + #end + +
+
+ +
+#end -- cgit v1.1