geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r470703 - in /geronimo/server/branches/1.1/modules: security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java security/src/java/org/apache/geronimo/security/deploy/RealmPrincipalInfo.java
Date Fri, 03 Nov 2006 07:38:05 GMT
Author: vamsic007
Date: Thu Nov  2 23:38:04 2006
New Revision: 470703

URL: http://svn.apache.org/viewvc?view=rev&rev=470703
Log:
GERONIMO-2274 realm-principal does not work in web app security

Modified:
    geronimo/server/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
    geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/deploy/RealmPrincipalInfo.java

Modified: geronimo/server/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java?view=diff&rev=470703&r1=470702&r2=470703
==============================================================================
--- geronimo/server/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
(original)
+++ geronimo/server/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
Thu Nov  2 23:38:04 2006
@@ -226,7 +226,7 @@
 
     //used from TSSConfigEditor
     public static RealmPrincipalInfo buildRealmPrincipal(GerRealmPrincipalType realmPrincipalType)
{
-        return new RealmPrincipalInfo(realmPrincipalType.getDomainName().trim(), realmPrincipalType.getRealmName().trim(),
realmPrincipalType.getClass1().trim(), realmPrincipalType.getName().trim(), realmPrincipalType.isSetDesignatedRunAs());
+        return new RealmPrincipalInfo(realmPrincipalType.getRealmName().trim(), realmPrincipalType.getDomainName().trim(),
realmPrincipalType.getClass1().trim(), realmPrincipalType.getName().trim(), realmPrincipalType.isSetDesignatedRunAs());
     }
 
     public static LoginDomainPrincipalInfo buildDomainPrincipal(GerLoginDomainPrincipalType
domainPrincipalType) {

Modified: geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/deploy/RealmPrincipalInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/deploy/RealmPrincipalInfo.java?view=diff&rev=470703&r1=470702&r2=470703
==============================================================================
--- geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/deploy/RealmPrincipalInfo.java
(original)
+++ geronimo/server/branches/1.1/modules/security/src/java/org/apache/geronimo/security/deploy/RealmPrincipalInfo.java
Thu Nov  2 23:38:04 2006
@@ -48,7 +48,7 @@
             if (text != null) {
                 String[] parts = text.split(",");
                 if (parts.length != 5) {
-                    throw new PropertyEditorException("Principal should have the form 'domain,realm,class,name,run-as'");
+                    throw new PropertyEditorException("Principal should have the form 'realm,domain,class,name,run-as'");
                 }
                 RealmPrincipalInfo principal = new RealmPrincipalInfo(parts[0], parts[1],
parts[2], parts[3], Boolean.valueOf(parts[4]).booleanValue());
                 setValue(principal);
@@ -62,7 +62,8 @@
             if (principal == null) {
                 return null;
             }
-            return principal.getPrincipalName() + "," + principal.getClassName() + "," +
principal.isDesignatedRunAs() + "," + principal.getDomain() + "," + principal.getRealm();
+            // output from getAsText() should match with the input expected by setAsText()
+            return principal.getRealm() + "," + principal.getDomain() + "," + principal.getClassName()
+ "," + principal.getPrincipalName() + "," + principal.isDesignatedRunAs();
         }
     }
 }



Mime
View raw message