geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r471888 - in /geronimo/server/branches/1.1/applications/console-standard/src: java/org/apache/geronimo/console/securitymanager/realm/ webapp/WEB-INF/view/realmwizard/
Date Mon, 06 Nov 2006 21:44:23 GMT
Author: vamsic007
Date: Mon Nov  6 13:44:22 2006
New Revision: 471888

URL: http://svn.apache.org/viewvc?view=rev&rev=471888
Log:
GERONIMO-1592 Add NamedUPCredentialLoginModule to Console Realm Wizard

Modified:
    geronimo/server/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
    geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/advanced.jsp
    geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/configure.jsp
    geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/edit.jsp
    geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/selectType.jsp
    geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/showPlan.jsp
    geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testLogin.jsp
    geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testResults.jsp

Modified: geronimo/server/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java?view=diff&rev=471888&r1=471887&r2=471888
==============================================================================
--- geronimo/server/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
(original)
+++ geronimo/server/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
Mon Nov  6 13:44:22 2006
@@ -44,6 +44,7 @@
 import org.apache.geronimo.security.jaas.JaasLoginModuleChain;
 import org.apache.geronimo.security.jaas.LoginModuleSettings;
 import org.apache.geronimo.security.jaas.JaasLoginModuleUse;
+import org.apache.geronimo.security.jaas.NamedUPCredentialLoginModule;
 import org.apache.geronimo.security.realm.providers.FileAuditLoginModule;
 import org.apache.geronimo.security.realm.providers.GeronimoPasswordCredentialLoginModule;
 import org.apache.geronimo.security.realm.providers.RepeatedFailureLockoutLoginModule;
@@ -750,6 +751,16 @@
                 props.setProperty("lockoutDurationSecs", data.getLockoutDuration());
                 list.add(module);
             }
+            if (data.getCredentialName() != null) {
+                module = new LoginModuleDetails();
+                module.setClassName(NamedUPCredentialLoginModule.class.getName());
+                module.setControlFlag("OPTIONAL");
+                module.setLoginDomainName(data.getName() + "-NamedUPC");
+                module.setServerSide(true);
+                props = module.getOptions();
+                props.setProperty(NamedUPCredentialLoginModule.CREDENTIAL_NAME, data.getCredentialName());
+                list.add(module);
+            }
         } else {
             list.addAll(Arrays.asList(data.modules));
         }
@@ -774,6 +785,7 @@
         private boolean storePassword;
         private String abstractName; // used when editing existing realms
         private LoginModuleDetails[] modules;
+        private String credentialName;
 
         public void load(PortletRequest request) {
             name = request.getParameter("name");
@@ -794,6 +806,8 @@
             if (abstractName != null && abstractName.equals("")) abstractName = null;
             String test = request.getParameter("storePassword");
             storePassword = test != null && !test.equals("") && !test.equals("false");
+            credentialName = request.getParameter("credentialName");
+            if (credentialName != null && credentialName.equals("")) credentialName
= null;
             Map map = request.getParameterMap();
             for (Iterator it = map.keySet().iterator(); it.hasNext();) {
                 String key = (String) it.next();
@@ -884,6 +898,7 @@
             if (lockoutDuration != null) response.setRenderParameter("lockoutDuration", lockoutDuration);
             if (abstractName != null) response.setRenderParameter("abstractName", abstractName);
             if (storePassword) response.setRenderParameter("storePassword", "true");
+            if (credentialName != null) response.setRenderParameter("credentialName", credentialName);
             for (Iterator it = options.keySet().iterator(); it.hasNext();) {
                 String name = (String) it.next();
                 String value = (String) options.get(name);
@@ -950,6 +965,10 @@
 
         public boolean isLockoutEnabled() {
             return lockoutCount != null || lockoutWindow != null || lockoutDuration != null;
+        }
+
+        public String getCredentialName() {
+            return credentialName;
         }
 
         public String getAbstractName() {

Modified: geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/advanced.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/advanced.jsp?view=diff&rev=471888&r1=471887&r2=471888
==============================================================================
--- geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/advanced.jsp
(original)
+++ geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/advanced.jsp
Mon Nov  6 13:44:22 2006
@@ -97,6 +97,22 @@
           Subject.  This will allow access to the password later after the login process
has
           completed.  This is not normally required.</td>
       </tr>
+    <!-- ENTRY FIELD: Named UPC -->
+      <tr>
+        <th valign="top"><div align="right">Named Credential:</div></th>
+        <td valign="top">
+          <input type="checkbox" id="<portlet:namespace/>namedUPCCheckbox" name="namedUPC"<c:if
test="${!(empty realm.credentialName)}"> checked="checked"</c:if>
+          onclick="document.getElementById('<portlet:namespace/>namedUPCDiv').style.display=this.checked
? 'block' : 'none';document.getElementById('<portlet:namespace/>credentialName').value='';"/>
+          <div id="<portlet:namespace/>namedUPCDiv" style="display: <c:choose><c:when
test="${empty realm.credentialName}">none</c:when><c:otherwise>block</c:otherwise></c:choose>;">
+          Credential Name: <input type="text" id="<portlet:namespace/>credentialName"
name="credentialName" size="30" value="${realm.credentialName}" />
+          </div>
+        </td>
+      </tr>
+      <tr>
+        <td></td>
+        <td>If enabled, the realm will store each username and password in a private
credential in the
+          Subject under a specified credential name.</td>
+      </tr>
     <!-- SUBMIT BUTTON -->
       <tr>
         <td></td>

Modified: geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/configure.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/configure.jsp?view=diff&rev=471888&r1=471887&r2=471888
==============================================================================
--- geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/configure.jsp
(original)
+++ geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/configure.jsp
Mon Nov  6 13:44:22 2006
@@ -20,6 +20,7 @@
     <input type="hidden" name="lockoutWindow" value="${realm.lockoutWindow}" />
     <input type="hidden" name="lockoutDuration" value="${realm.lockoutDuration}" />
     <input type="hidden" name="storePassword" value="${realm.storePassword}" />
+    <input type="hidden" name="credentialName" value="${realm.credentialName}" />
     <input type="hidden" name="abstractName" value="${realm.abstractName}" />
     <input type="hidden" name="module-domain-0" value="${realm.modules[0].loginDomainName}"
/>
     <input type="hidden" name="module-class-0" value="${realm.modules[0].className}" />

Modified: geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/edit.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/edit.jsp?view=diff&rev=471888&r1=471887&r2=471888
==============================================================================
--- geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/edit.jsp
(original)
+++ geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/edit.jsp
Mon Nov  6 13:44:22 2006
@@ -29,6 +29,7 @@
     <input type="hidden" name="lockoutWindow" value="${realm.lockoutWindow}" />
     <input type="hidden" name="lockoutDuration" value="${realm.lockoutDuration}" />
     <input type="hidden" name="storePassword" value="${realm.storePassword}" />
+    <input type="hidden" name="credentialName" value="${realm.credentialName}" />
     <input type="hidden" name="abstractName" value="${realm.abstractName}" />
 
     <table border="0">

Modified: geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/selectType.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/selectType.jsp?view=diff&rev=471888&r1=471887&r2=471888
==============================================================================
--- geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/selectType.jsp
(original)
+++ geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/selectType.jsp
Mon Nov  6 13:44:22 2006
@@ -16,6 +16,7 @@
     <input type="hidden" name="lockoutWindow" value="${realm.lockoutWindow}" />
     <input type="hidden" name="lockoutDuration" value="${realm.lockoutDuration}" />
     <input type="hidden" name="storePassword" value="${realm.storePassword}" />
+    <input type="hidden" name="credentialName" value="${realm.credentialName}" />
     <input type="hidden" name="abstractName" value="${realm.abstractName}" />
     <input type="hidden" name="module-domain-0" value="${realm.modules[0].loginDomainName}"
/>
     <input type="hidden" name="module-class-0" value="${realm.modules[0].className}" />

Modified: geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/showPlan.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/showPlan.jsp?view=diff&rev=471888&r1=471887&r2=471888
==============================================================================
--- geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/showPlan.jsp
(original)
+++ geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/showPlan.jsp
Mon Nov  6 13:44:22 2006
@@ -18,6 +18,7 @@
     <input type="hidden" name="lockoutWindow" value="${realm.lockoutWindow}" />
     <input type="hidden" name="lockoutDuration" value="${realm.lockoutDuration}" />
     <input type="hidden" name="storePassword" value="${realm.storePassword}" />
+    <input type="hidden" name="credentialName" value="${realm.credentialName}" />
     <input type="hidden" name="abstractName" value="${realm.abstractName}" />
     <input type="hidden" name="module-domain-0" value="${realm.modules[0].loginDomainName}"
/>
     <input type="hidden" name="module-class-0" value="${realm.modules[0].className}" />

Modified: geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testLogin.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testLogin.jsp?view=diff&rev=471888&r1=471887&r2=471888
==============================================================================
--- geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testLogin.jsp
(original)
+++ geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testLogin.jsp
Mon Nov  6 13:44:22 2006
@@ -23,6 +23,7 @@
     <input type="hidden" name="lockoutWindow" value="${realm.lockoutWindow}" />
     <input type="hidden" name="lockoutDuration" value="${realm.lockoutDuration}" />
     <input type="hidden" name="storePassword" value="${realm.storePassword}" />
+    <input type="hidden" name="credentialName" value="${realm.credentialName}" />
     <input type="hidden" name="abstractName" value="${realm.abstractName}" />
     <input type="hidden" name="module-domain-0" value="${realm.modules[0].loginDomainName}"
/>
     <input type="hidden" name="module-class-0" value="${realm.modules[0].className}" />

Modified: geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testResults.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testResults.jsp?view=diff&rev=471888&r1=471887&r2=471888
==============================================================================
--- geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testResults.jsp
(original)
+++ geronimo/server/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/realmwizard/testResults.jsp
Mon Nov  6 13:44:22 2006
@@ -19,6 +19,7 @@
     <input type="hidden" name="lockoutWindow" value="${realm.lockoutWindow}" />
     <input type="hidden" name="lockoutDuration" value="${realm.lockoutDuration}" />
     <input type="hidden" name="storePassword" value="${realm.storePassword}" />
+    <input type="hidden" name="credentialName" value="${realm.credentialName}" />
     <input type="hidden" name="abstractName" value="${realm.abstractName}" />
     <input type="hidden" name="module-domain-0" value="${realm.modules[0].loginDomainName}"
/>
     <input type="hidden" name="module-class-0" value="${realm.modules[0].className}" />



Mime
View raw message