geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r105973 - in geronimo/trunk/modules/security/src/test/org/apache/geronimo/security: jaas network/protocol
Date Sat, 20 Nov 2004 15:34:45 GMT
Author: adc
Date: Sat Nov 20 07:34:44 2004
New Revision: 105973

Modified:
   geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
   geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginKerberosTest.java
   geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
   geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
   geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/network/protocol/SubjectCarryingProtocolTest.java
Log:
Minor fixes

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
Sat Nov 20 07:34:44 2004
@@ -138,8 +138,8 @@
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
         gbean.setAttribute("serverSide", new Boolean(true));
         Properties props = new Properties();
-        props.put("usersURI", new File(new File("."), "src/test-data/data/users.properties").toString());
-        props.put("groupsURI", new File(new File("."), "src/test-data/data/groups.properties").toString());
+        props.put("usersURI", new File(new File("."), "src/test-data/data/users.properties").toURI().toString());
+        props.put("groupsURI", new File(new File("."), "src/test-data/data/groups.properties").toURI().toString());
         gbean.setAttribute("options", props);
         kernel.loadGBean(testCE, gbean);
 

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginKerberosTest.java
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginKerberosTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginKerberosTest.java
Sat Nov 20 07:34:44 2004
@@ -17,15 +17,17 @@
 
 package org.apache.geronimo.security.jaas;
 
-import java.util.Properties;
 import javax.management.ObjectName;
 import javax.security.auth.Subject;
+import javax.security.auth.kerberos.KerberosPrincipal;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
+import java.util.Properties;
 
 import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.security.AbstractTest;
 import org.apache.geronimo.security.ContextManager;
+import org.apache.geronimo.security.IdentificationPrincipal;
 import org.apache.geronimo.security.RealmPrincipal;
 
 
@@ -55,7 +57,7 @@
         kerberosRealm = new ObjectName("geronimo.security:type=SecurityRealm,realm=TOOLAZYDOGS.COM");
         gbean.setAttribute("realmName", "TOOLAZYDOGS.COM");
         props = new Properties();
-        props.setProperty("LoginModule.1.REQUIRED","geronimo.security:type=LoginModule,name=TOOLAZYDOGS.COM");
+        props.setProperty("LoginModule.1.REQUIRED", "geronimo.security:type=LoginModule,name=TOOLAZYDOGS.COM");
         gbean.setAttribute("loginModuleConfiguration", props);
         kernel.loadGBean(kerberosRealm, gbean);
         kernel.startGBean(kerberosLM);
@@ -83,8 +85,10 @@
 
             assertTrue("expected non-null server-side subject", subject != null);
             assertTrue("id of server-side subject should be non-null", ContextManager.getSubjectId(subject)
!= null);
-            assertEquals("server-side subject should have two principals", 2, subject.getPrincipals().size());
+            assertEquals("server-side subject should have three principals", 3, subject.getPrincipals().size());
             assertEquals("server-side subject should have one realm principal", 1, subject.getPrincipals(RealmPrincipal.class).size());
+            assertEquals("server-side subject should have one identification principal",
1, subject.getPrincipals(IdentificationPrincipal.class).size());
+            assertEquals("server-side subject should have one kerberos principal", 1, subject.getPrincipals(KerberosPrincipal.class).size());
             RealmPrincipal principal = (RealmPrincipal) subject.getPrincipals(RealmPrincipal.class).iterator().next();
             assertTrue("id of principal should be non-zero", principal.getId() != 0);
 

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
Sat Nov 20 07:34:44 2004
@@ -83,8 +83,8 @@
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
         gbean.setAttribute("serverSide", new Boolean(true));
         props = new Properties();
-        props.put("usersURI", new File(new File("."), "src/test-data/data/users.properties").toString());
-        props.put("groupsURI", new File(new File("."), "src/test-data/data/groups.properties").toString());
+        props.put("usersURI", new File(new File("."), "src/test-data/data/users.properties").toURI().toString());
+        props.put("groupsURI", new File(new File("."), "src/test-data/data/groups.properties").toURI().toString());
         gbean.setAttribute("options", props);
         kernel.loadGBean(testCE, gbean);
 

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
Sat Nov 20 07:34:44 2004
@@ -106,8 +106,8 @@
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
         gbean.setAttribute("serverSide", new Boolean(true));
         Properties props = new Properties();
-        props.put("usersURI", new File(new File("."), "src/test-data/data/users.properties").toString());
-        props.put("groupsURI", new File(new File("."), "src/test-data/data/groups.properties").toString());
+        props.put("usersURI", new File(new File("."), "src/test-data/data/users.properties").toURI().toString());
+        props.put("groupsURI", new File(new File("."), "src/test-data/data/groups.properties").toURI().toString());
         gbean.setAttribute("options", props);
         kernel.loadGBean(testCE, gbean);
 

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/network/protocol/SubjectCarryingProtocolTest.java
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/network/protocol/SubjectCarryingProtocolTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/network/protocol/SubjectCarryingProtocolTest.java
Sat Nov 20 07:34:44 2004
@@ -282,8 +282,8 @@
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
         gbean.setAttribute("serverSide", new Boolean(true));
         Properties props = new Properties();
-        props.put("usersURI", new File(new File("."), "src/test-data/data/users.properties").toString());
-        props.put("groupsURI", new File(new File("."), "src/test-data/data/groups.properties").toString());
+        props.put("usersURI", new File(new File("."), "src/test-data/data/users.properties").toURI().toString());
+        props.put("groupsURI", new File(new File("."), "src/test-data/data/groups.properties").toURI().toString());
         gbean.setAttribute("options", props);
         kernel.loadGBean(testCE, gbean);
 

Mime
View raw message