geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r700219 - in /geronimo/gshell/trunk: gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/ gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/auth/ gshell-remote/gs...
Date Mon, 29 Sep 2008 19:39:38 GMT
Author: jdillon
Date: Mon Sep 29 12:39:37 2008
New Revision: 700219

URL: http://svn.apache.org/viewvc?rev=700219&view=rev
Log:
Ripped out jaas stuff and related hacks
Moved CryptoContext to gshell-security
Starting to wire up some jsecurity bits to test how to make that stuff work

Added:
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/
      - copied from r700192, geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/crypto/
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/components.xml
  (with props)
Removed:
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/auth/
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/client.login.conf
    geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/crypto/
    geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/jaas/
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/auth/
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/server.login.conf
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContextAware.java
Modified:
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/ClientSessionContext.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml
    geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/LoginMessage.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContext.java
    geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContextImpl.java

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java
Mon Sep 29 12:39:37 2008
@@ -19,15 +19,14 @@
 
 package org.apache.geronimo.gshell.remote.client;
 
-import org.apache.geronimo.gshell.remote.client.auth.RemoteLoginModule;
 import org.apache.geronimo.gshell.remote.client.handler.ClientMessageHandler;
 import org.apache.geronimo.gshell.remote.client.handler.ClientSessionContext;
-import org.apache.geronimo.gshell.remote.crypto.CryptoContext;
-import org.apache.geronimo.gshell.remote.jaas.UsernamePasswordCallbackHandler;
+import org.apache.geronimo.gshell.security.crypto.CryptoContext;
 import org.apache.geronimo.gshell.remote.message.CloseShellMessage;
 import org.apache.geronimo.gshell.remote.message.ConnectMessage;
 import org.apache.geronimo.gshell.remote.message.EchoMessage;
 import org.apache.geronimo.gshell.remote.message.ExecuteMessage;
+import org.apache.geronimo.gshell.remote.message.LoginMessage;
 import org.apache.geronimo.gshell.remote.message.OpenShellMessage;
 import org.apache.geronimo.gshell.whisper.message.Message;
 import org.apache.geronimo.gshell.whisper.message.MessageHandler;
@@ -41,8 +40,7 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URI;
@@ -126,20 +124,26 @@
 
         ClientSessionContext context = ClientSessionContext.BINDER.lookup(session.getSession());
 
-        CallbackHandler callbackHandler = new UsernamePasswordCallbackHandler(username, password);
-        LoginContext loginContext = new LoginContext("RshClient", callbackHandler);
-
-        // HACK: Set and unset the transport for JAAS muck
-        RemoteLoginModule.setTransport(transport);
+        // Send the login message
+        Message response;
         try {
-            loginContext.login();
+            response = session.request(new LoginMessage(username, password));
         }
-        finally {
-            RemoteLoginModule.unsetTransport();
+        catch (Exception e) {
+            throw new LoginException(e.getMessage());
         }
 
-        context.subject = loginContext.getSubject();
-        log.debug("Subject: {}", context.subject);
+        if (response instanceof LoginMessage.Success) {
+            context.identity = ((LoginMessage.Success)response).getToken();
+
+            log.debug("Client identity: {}", context.identity);
+        }
+        else if (response instanceof LoginMessage.Failure) {
+            LoginMessage.Failure failure = (LoginMessage.Failure)response;
+
+            // FIXME: Remove this jaas exception once we figure out how to use jsecurity
in this context
+            throw new LoginException("Login failed: " + failure.getReason());
+        }
     }
     
     public void echo(final String text) throws Exception {

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/ClientSessionContext.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/ClientSessionContext.java?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/ClientSessionContext.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/ClientSessionContext.java
Mon Sep 29 12:39:37 2008
@@ -21,9 +21,6 @@
 
 import java.security.PublicKey;
 
-import javax.security.auth.Subject;
-
-import org.apache.geronimo.gshell.remote.client.auth.ClientPrincipal;
 import org.apache.geronimo.gshell.whisper.util.SessionAttributeBinder;
 
 /**
@@ -38,18 +35,10 @@
     /** The server's public key. */
     public PublicKey pk;
 
-    /** The subject which the remote client has been authenticated as. */
-    public Subject subject;
-
-    public ClientPrincipal getClientPrincipal() {
-        return subject.getPrincipals(ClientPrincipal.class).iterator().next();
-    }
-
-    public Object getIdentityToken() {
-        return getClientPrincipal().getIdentityToken();
-    }
+    public Object identity;
 
-    public String getUsername() {
-        return getClientPrincipal().getName();
+    public void close() {
+        pk = null;
+        identity = null;
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml
Mon Sep 29 12:39:37 2008
@@ -25,11 +25,7 @@
        xsi:schemaLocation="
             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-    <bean id="jaasConfigurationLoader" class="org.apache.geronimo.gshell.remote.jaas.JaasConfigurationLoader">
-        <property name="resourceName" value="client.login.conf"/>
-    </bean>
-
-    <bean class="org.apache.geronimo.gshell.remote.client.RshClient" scope="prototype"
depends-on="jaasConfigurationLoader">
+    <bean class="org.apache.geronimo.gshell.remote.client.RshClient" scope="prototype">
         <constructor-arg>
             <list>
                 <bean class="org.apache.geronimo.gshell.remote.client.handler.EchoHandler"/>

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/LoginMessage.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/LoginMessage.java?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/LoginMessage.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/LoginMessage.java
Mon Sep 29 12:39:37 2008
@@ -36,11 +36,11 @@
     private final String username;
 
     @YarnStyle(omit=true)
-    private final char[] password;
+    private final String password;
 
     private final String realm;
     
-    public LoginMessage(final String username, final char[] password, final String realm)
{
+    public LoginMessage(final String username, final String password, final String realm)
{
         this.username = username;
         
         this.password = password;
@@ -48,7 +48,7 @@
         this.realm = realm;
     }
 
-    public LoginMessage(final String username, final char[] password) {
+    public LoginMessage(final String username, final String password) {
         this(username, password, null);
     }
 
@@ -60,7 +60,7 @@
         return username;
     }
 
-    public char[] getPassword() {
+    public String getPassword() {
         return password;
     }
 

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml
Mon Sep 29 12:39:37 2008
@@ -25,9 +25,8 @@
        xsi:schemaLocation="
             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-    <bean id="cryptoContext" class="org.apache.geronimo.gshell.remote.crypto.CryptoContextImpl">
-        <property name="transformation" value="RSA"/>
-        <property name="provider" value="default"/>
-    </bean>
+    <!--
+    TODO: Add some beans or drop this puppy.
+    -->
 
 </beans>
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java
Mon Sep 29 12:39:37 2008
@@ -19,7 +19,7 @@
 
 package org.apache.geronimo.gshell.remote.server.handler;
 
-import org.apache.geronimo.gshell.remote.crypto.CryptoContext;
+import org.apache.geronimo.gshell.security.crypto.CryptoContext;
 import org.apache.geronimo.gshell.remote.message.ConnectMessage;
 import org.apache.geronimo.gshell.remote.server.RshServer;
 import org.apache.geronimo.gshell.remote.server.timeout.TimeoutManager;

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
Mon Sep 29 12:39:37 2008
@@ -19,16 +19,12 @@
 
 package org.apache.geronimo.gshell.remote.server.handler;
 
-import org.apache.geronimo.gshell.remote.jaas.Identity;
-import org.apache.geronimo.gshell.remote.jaas.UsernamePasswordCallbackHandler;
 import org.apache.geronimo.gshell.remote.message.LoginMessage;
 import org.apache.geronimo.gshell.remote.server.timeout.TimeoutManager;
 import org.apache.geronimo.gshell.whisper.transport.Session;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import javax.security.auth.Subject;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
+import java.util.UUID;
 
 /**
  * Server handler for {@link LoginMessage} messages.
@@ -41,22 +37,10 @@
     @Autowired
     private TimeoutManager timeoutManager;
 
-    private String defaultRealm = "BogusLogin";
-
     public LoginHandler() {
         super(LoginMessage.class);
     }
 
-    public String getDefaultRealm() {
-        return defaultRealm;
-    }
-
-    public void setDefaultRealm(final String defaultRealm) {
-        assert defaultRealm != null;
-        
-        this.defaultRealm = defaultRealm;
-    }
-
     public void handle(final Session session, final ServerSessionContext context, final LoginMessage
message) throws Exception {
         assert session != null;
         assert context != null;
@@ -67,35 +51,37 @@
             log.warn("Aborting login processing; timeout has triggered");
         }
         else {
-            String realm = message.getRealm();
-            if (realm == null) {
-                realm = defaultRealm;
-            }
-
             String username = message.getUsername();
-            char[] password = message.getPassword();
+            String password = message.getPassword();
 
-            try {
-                LoginContext loginContext = new LoginContext(realm, new UsernamePasswordCallbackHandler(username,
password));
-                loginContext.login();
+            //
+            // HACK: Just accept anything that is not "bogus"
+            //
 
-                Subject subject = loginContext.getSubject();
-                context.identity = new Identity(subject);
+            log.debug("Processing login: username='{}', password='{}'", username, password);
 
-                log.debug("Username: {}, Identity: {}", context.getUsername(), context.identity);
+            if (username == null || username.equals("bogus")) {
+                String reason = "Invalid username";
+                log.debug("Login failed for user: {}, cause: {}", username, reason);
 
-                LoginMessage.Success reply = new LoginMessage.Success(context.identity.getToken());
+                LoginMessage.Failure reply = new LoginMessage.Failure(reason);
                 reply.setCorrelationId(message.getId());
                 session.send(reply);
             }
-            catch (LoginException e) {
-                String reason = e.toString();
+            else if (password == null || password.equals("bogus")) {
+                String reason = "Invalid password";
                 log.debug("Login failed for user: {}, cause: {}", username, reason);
 
                 LoginMessage.Failure reply = new LoginMessage.Failure(reason);
                 reply.setCorrelationId(message.getId());
                 session.send(reply);
             }
+            else {
+                UUID identity = UUID.randomUUID();
+                LoginMessage.Success reply = new LoginMessage.Success(identity);
+                reply.setCorrelationId(message.getId());
+                session.send(reply);
+            }
         }
     }
 

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java
Mon Sep 29 12:39:37 2008
@@ -21,13 +21,10 @@
 
 import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.remote.RemoteShell;
-import org.apache.geronimo.gshell.remote.jaas.Identity;
-import org.apache.geronimo.gshell.remote.jaas.UserPrincipal;
 import org.apache.geronimo.gshell.remote.server.RemoteIO;
 import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.apache.geronimo.gshell.whisper.util.SessionAttributeBinder;
 
-import javax.security.auth.Subject;
 import java.security.PublicKey;
 
 /**
@@ -41,8 +38,6 @@
 
     public PublicKey pk;
 
-    public Identity identity;
-
     public BeanContainer container;
 
     public RemoteIO io;
@@ -51,22 +46,6 @@
 
     public RemoteShell shell;
 
-    public Object getIdentityToken() {
-        return identity.getToken();
-    }
-
-    public Subject getSubject() {
-        return identity.getSubject();
-    }
-
-    public UserPrincipal getUserPrincipal() {
-        return getSubject().getPrincipals(UserPrincipal.class).iterator().next();
-    }
-
-    public String getUsername() {
-        return getUserPrincipal().getName();
-    }
-
     public void close() {
         shell.close();
         shell = null;
@@ -77,7 +56,6 @@
 
         io = null;
         variables = null;
-        identity = null;
         pk = null;
     }
 }

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml?rev=700219&r1=700218&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml
Mon Sep 29 12:39:37 2008
@@ -27,21 +27,15 @@
 
     <bean id="timeoutManager" class="org.apache.geronimo.gshell.remote.server.timeout.TimeoutManagerImpl"/>
 
-    <bean id="jaasConfigurationLoader" class="org.apache.geronimo.gshell.remote.jaas.JaasConfigurationLoader">
-        <property name="resourceName" value="server.login.conf"/>
-    </bean>
-
     <bean id="rshServer" class="org.apache.geronimo.gshell.remote.server.RshServer" scope="prototype">
         <constructor-arg>
             <list>
-                <bean class="org.apache.geronimo.gshell.remote.server.handler.CloseShellHandler"/>
                 <bean class="org.apache.geronimo.gshell.remote.server.handler.ConnectHandler"/>
-                <bean class="org.apache.geronimo.gshell.remote.server.handler.EchoHandler"/>
-                <bean class="org.apache.geronimo.gshell.remote.server.handler.ExecuteHandler"/>
-                <bean class="org.apache.geronimo.gshell.remote.server.handler.LoginHandler"
depends-on="jaasConfigurationLoader">
-                    <property name="defaultRealm" value="BogusLogin"/>
-                </bean>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.LoginHandler"/>
                 <bean class="org.apache.geronimo.gshell.remote.server.handler.OpenShellHandler"/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.ExecuteHandler"/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.CloseShellHandler"/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.EchoHandler"/>
             </list>
         </constructor-arg>
     </bean>

Modified: geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContext.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContext.java?rev=700219&r1=700192&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContext.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContext.java
Mon Sep 29 12:39:37 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.remote.crypto;
+package org.apache.geronimo.gshell.security.crypto;
 
 import java.security.Key;
 import java.security.PublicKey;

Modified: geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContextImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContextImpl.java?rev=700219&r1=700192&r2=700219&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContextImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-security/src/main/java/org/apache/geronimo/gshell/security/crypto/CryptoContextImpl.java
Mon Sep 29 12:39:37 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.remote.crypto;
+package org.apache.geronimo.gshell.security.crypto;
 
 import java.security.Key;
 import java.security.KeyFactory;
@@ -32,7 +32,7 @@
 import org.slf4j.LoggerFactory;
 
 /**
- * Default {@link CryptoContext} component.
+ * {@link CryptoContext} component.
  *
  * @version $Rev$ $Date$
  */

Added: geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/components.xml?rev=700219&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/components.xml
(added)
+++ geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/components.xml
Mon Sep 29 12:39:37 2008
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean id="cryptoContext" class="org.apache.geronimo.gshell.security.crypto.CryptoContextImpl">
+        <property name="transformation" value="RSA"/>
+        <property name="provider" value="default"/>
+    </bean>
+    
+    <bean id="securityManager" class="org.jsecurity.mgt.DefaultSecurityManager">
+        <property name="realms">
+            <list>
+                <ref bean="bogusRealm"/>    
+            </list>
+        </property>
+    </bean>
+
+    <bean id="bogusRealm" class="org.jsecurity.realm.text.TextConfigurationRealm">
+        <property name="userDefinitions">
+            <value>
+                test=test
+            </value>
+        </property>
+        <property name="roleDefinitions">
+            <value>
+                foo=bar,baz
+            </value>
+        </property>
+    </bean>
+
+    <!--
+    <bean id="lifecycleBeanPostProcessor" class="org.jsecurity.spring.LifecycleBeanPostProcessor"/>
+
+    <bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
depends-on="lifecycleBeanPostProcessor"/>
+
+    <bean class="org.jsecurity.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
+        <property name="securityManager" ref="securityManager"/>
+    </bean>
+    -->
+    
+    <!--
+    <bean id="secureRemoteInvocationExecutor" class="org.jsecurity.spring.remoting.SecureRemoteInvocationExecutor">
+        <property name="securityManager" ref="securityManager"/>
+    </bean>
+    -->
+
+</beans>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-security/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message