[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/messages/error-messages.properties idp-war/src...

noreply at shibboleth.net noreply at shibboleth.net
Fri Dec 19 19:37:23 EST 2014


Author: serac
Date: Fri Dec 19 19:37:23 2014
New Revision: 7202

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7202&view=rev
Log:
Add index page to prevent directory listing on root URI.

Added:
    trunk/idp-war/src/main/webapp/WEB-INF/spring.tld
    trunk/idp-war/src/main/webapp/index.jsp
      - copied, changed from r7189, trunk/idp-war/src/main/webapp/x509-prompt.jsp
Modified:
    trunk/idp-conf/src/main/resources/messages/error-messages.properties

Modified: trunk/idp-conf/src/main/resources/messages/error-messages.properties
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/messages/error-messages.properties?rev=7202&r1=7201&r2=7202&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/messages/error-messages.properties (original)
+++ trunk/idp-conf/src/main/resources/messages/error-messages.properties Fri Dec 19 19:37:23 2014
@@ -102,3 +102,7 @@
 
 error.title = Error
 error.message = An error occurred: $eventId
+
+root.title = Shibboleth IdP
+root.message = No services are available at this location.
+root.footer = Insert your footer text here.

Copied: trunk/idp-war/src/main/webapp/index.jsp (from r7189, trunk/idp-war/src/main/webapp/x509-prompt.jsp)
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-war/src/main/webapp/index.jsp?p2=trunk/idp-war/src/main/webapp/index.jsp&p1=trunk/idp-war/src/main/webapp/x509-prompt.jsp&r1=7189&r2=7202&rev=7202&view=diff
==============================================================================
--- trunk/idp-war/src/main/webapp/x509-prompt.jsp (original)
+++ trunk/idp-war/src/main/webapp/index.jsp Fri Dec 19 19:37:23 2014
@@ -1,38 +1,10 @@
-<!DOCTYPE html>
-
-<%@ taglib uri="urn:mace:shibboleth:2.0:idp:ui" prefix="idpui" %>
-<%@ page import="javax.servlet.http.Cookie" %>
-<%@ page import="org.opensaml.profile.context.ProfileRequestContext" %>
-<%@ page import="net.shibboleth.idp.authn.ExternalAuthentication" %>
-<%@ page import="net.shibboleth.idp.authn.context.AuthenticationContext" %>
-<%@ page import="net.shibboleth.idp.profile.context.RelyingPartyContext" %>
-<%@ page import="net.shibboleth.idp.ui.context.RelyingPartyUIContext" %>
-
-<%
-final Cookie[] cookies = request.getCookies();
-if (cookies != null) {
-    for (final Cookie cookie : cookies) {
-        if (cookie.getName().equals("x509passthrough")) {
-        	response.sendRedirect(request.getContextPath() + "/Authn/X509?"
-                + ExternalAuthentication.CONVERSATION_KEY + "="
-                + request.getParameter(ExternalAuthentication.CONVERSATION_KEY));
-        	return;
-        }
-    }
-}
-
-final String key = ExternalAuthentication.startExternalAuthentication(request);
-final ProfileRequestContext prc = ExternalAuthentication.getProfileRequestContext(key, request);
-final AuthenticationContext authnContext = prc.getSubcontext(AuthenticationContext.class);
-final RelyingPartyContext rpContext = prc.getSubcontext(RelyingPartyContext.class);
-final RelyingPartyUIContext rpUIContext = authnContext.getSubcontext(RelyingPartyUIContext.class);
-final boolean identifiedRP = rpUIContext != null && !rpContext.getRelyingPartyId().contains(rpUIContext.getServiceName());
-%>
+<%@ page pageEncoding="UTF-8" %>
+<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
 <!DOCTYPE html>
 <html>
   <head>
     <meta charset="utf-8">
-    <title>Example Login Page</title>
+    <title><spring:message code="${root.title}" text="Shibboleth IdP" /></title>
     <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/css/main.css">
   </head>
 
@@ -44,67 +16,13 @@
         </header>
     
         <div class="content">
-          <div class="column one">
-            <form id="loginform" action="<%= request.getContextPath() %>/Authn/X509" method="post">
-
-            <input type="hidden" name="<%= ExternalAuthentication.CONVERSATION_KEY %>"
-                value="<%= request.getParameter(ExternalAuthentication.CONVERSATION_KEY) %>">
-
-              <% if (identifiedRP) { %>
-                <legend>
-                  Log in to <idpui:serviceName uiContext="<%= rpUIContext %>"/>
-                </legend>
-              <% } %>
-              
-              <section>
-              Please make sure that your user certificate is properly configured in your web browser
-              and click on the <strong>Certificate Login </strong> button.
-              </section>
-
-              <section>
-                <input type="checkbox" name="x509passthrough" value="true" tabindex="2">
-                Do not show this page in the future.
-
-                <button class="form-element form-button" type="submit" name="login" value="1"
-                    tabindex="1" accesskey="l">Certificate Login</button>
-              </section>
-            </form>
-
-             <%
-              //
-              //    SP Description & Logo (optional)
-              //    These idpui lines will display added information (if available

[... 37 lines stripped ...]


More information about the commits mailing list