geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r565989 - in /geronimo/server/trunk/modules: geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/ geronimo-security/src/main/java/org/apache/geronimo/security/ geronimo-security/src/test/java/org/apache/geronimo/security/jaas/
Date Wed, 15 Aug 2007 00:47:37 GMT
Author: djencks
Date: Tue Aug 14 17:47:35 2007
New Revision: 565989

URL: http://svn.apache.org/viewvc?view=rev&rev=565989
Log:
GERONIMO-3407 cleanup

Modified:
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java
    geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
    geronimo/server/trunk/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java?view=diff&rev=565989&r1=565988&r2=565989
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/InternalJAASJettyRealm.java
Tue Aug 14 17:47:35 2007
@@ -91,7 +91,7 @@
                 LoginContext loginContext = ContextManager.login(securityRealmName, callbackHandler);
                 callbackHandler.clear();
 
-                Subject subject = ContextManager.getServerSideSubject(loginContext.getSubject());
+                Subject subject = loginContext.getSubject();
                 ContextManager.setCallers(subject, subject);
 
                 //login success

Modified: geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java?view=diff&rev=565989&r1=565988&r2=565989
==============================================================================
--- geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
(original)
+++ geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
Tue Aug 14 17:47:35 2007
@@ -17,7 +17,6 @@
 
 package org.apache.geronimo.security;
 
-import java.io.Serializable;
 import java.security.AccessControlContext;
 import java.security.AccessControlException;
 import java.security.AccessController;
@@ -48,7 +47,6 @@
  */
 public class ContextManager {
 
-    private static ThreadLocal<Serializable> currentCallerId = new ThreadLocal<Serializable>();
     private static final ThreadLocal<Callers> callers = new ThreadLocal<Callers>();
     private static Map<Subject, Context> subjectContexts = new IdentityHashMap<Subject,
Context>();
     private static Map<SubjectId, Subject> subjectIds =  Collections.synchronizedMap(new
HashMap<SubjectId, Subject>());
@@ -85,38 +83,6 @@
         Subject subject = loginContext.getSubject();
         ContextManager.unregisterSubject(subject);
         loginContext.logout();
-    }
-
-
-    /**
-     * After a login, the client is left with a relatively empty Subject, while
-     * the Subject used by the server has more important contents.  This method
-     * lets a server-side component acting as an authentication client (such
-     * as Tocmat/Jetty) access the fully populated server-side Subject.
-     * @param clientSideSubject client simplification of actual subject
-     * @return full server side subject
-     */
-    public static Subject getServerSideSubject(Subject clientSideSubject) {
-        Set<IdentificationPrincipal> set = clientSideSubject.getPrincipals(IdentificationPrincipal.class);
-        if(set == null || set.size() == 0) {
-            return null;
-        }
-        IdentificationPrincipal idp = set.iterator().next();
-        return getRegisteredSubject(idp.getId());
-    }
-
-    public static void setCurrentCallerId(Serializable id) {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) sm.checkPermission(SET_CONTEXT);
-
-        currentCallerId.set(id);
-    }
-
-    public static Serializable getCurrentCallerId() {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) sm.checkPermission(GET_CONTEXT);
-
-        return currentCallerId.get();
     }
 
     public static void setCallers(Subject currentCaller, Subject nextCaller) {

Modified: geronimo/server/trunk/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java?view=diff&rev=565989&r1=565988&r2=565989
==============================================================================
--- geronimo/server/trunk/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
Tue Aug 14 17:47:35 2007
@@ -89,7 +89,6 @@
         ContextManager.logout(context);
 
         assertNull(ContextManager.getRegisteredSubject(idp.getId()));
-        assertNull(ContextManager.getServerSideSubject(clientSubject));
 
         assertTrue("id of subject should be null", ContextManager.getSubjectId(subject) ==
null);
 



Mime
View raw message