maguro 2005/03/26 21:04:41
Modified: modules/core/src/java/org/openejb/corba/security/config/css
CSSCompoundSecMechConfig.java CSSSASMechConfig.java
Added: modules/core/src/java/org/openejb/corba/security/config/css
CSSGSSUPMechConfig.java CSSNULLTransportConfig.java
Log:
Updated to use the default Sun ORB.
Revision Changes Path
1.2 +6 -5
openejb/modules/core/src/java/org/openejb/corba/security/config/css/CSSCompoundSecMechConfig.java
Index: CSSCompoundSecMechConfig.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/security/config/css/CSSCompoundSecMechConfig.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CSSCompoundSecMechConfig.java 8 Mar 2005 04:08:33 -0000 1.1
+++ CSSCompoundSecMechConfig.java 27 Mar 2005 02:04:41 -0000 1.2
@@ -51,12 +51,13 @@
import org.omg.CORBA.Any;
import org.omg.CORBA.UserException;
-import org.omg.CSI.EstablishContext;
-import org.omg.CSI.SASContextBody;
-import org.omg.CSI.SASContextBodyHelper;
import org.omg.IOP.SecurityAttributeService;
import org.omg.IOP.ServiceContext;
+import org.apache.geronimo.interop.CSI.EstablishContext;
+import org.apache.geronimo.interop.CSI.SASContextBody;
+import org.apache.geronimo.interop.CSI.SASContextBodyHelper;
+
import org.openejb.corba.security.config.tss.TSSCompoundSecMechConfig;
import org.openejb.corba.util.Util;
@@ -117,7 +118,7 @@
EstablishContext msg = new EstablishContext();
msg.client_context_id = 0;
- msg.client_authentication_token = new byte[0];
+ msg.client_authentication_token = as_mech.encode();
msg.authorization_token = sas_mech.encodeAuthorizationElement();
msg.identity_token = sas_mech.encodseIdentityToken();
1.2 +8 -7
openejb/modules/core/src/java/org/openejb/corba/security/config/css/CSSSASMechConfig.java
Index: CSSSASMechConfig.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/security/config/css/CSSSASMechConfig.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CSSSASMechConfig.java 8 Mar 2005 04:08:33 -0000 1.1
+++ CSSSASMechConfig.java 27 Mar 2005 02:04:41 -0000 1.2
@@ -50,12 +50,13 @@
import java.io.Serializable;
import java.util.ArrayList;
-import org.omg.CSI.ITTAbsent;
-import org.omg.CSI.ITTPrincipalName;
-import org.omg.CSI.AuthorizationElement;
-import org.omg.CSI.IdentityToken;
-import org.omg.CSIIOP.DelegationByClient;
-import org.omg.CSIIOP.IdentityAssertion;
+
+import org.apache.geronimo.interop.CSI.ITTAbsent;
+import org.apache.geronimo.interop.CSI.ITTPrincipalName;
+import org.apache.geronimo.interop.CSI.AuthorizationElement;
+import org.apache.geronimo.interop.CSI.IdentityToken;
+import org.apache.geronimo.interop.CSIIOP.DelegationByClient;
+import org.apache.geronimo.interop.CSIIOP.IdentityAssertion;
import org.openejb.corba.security.config.tss.TSSSASMechConfig;
import org.openejb.corba.security.config.tss.TSSServiceConfigurationConfig;
1.1
openejb/modules/core/src/java/org/openejb/corba/security/config/css/CSSGSSUPMechConfig.java
Index: CSSGSSUPMechConfig.java
===================================================================
/**
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. The name "OpenEJB" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of The OpenEJB Group. For written permission,
* please contact [EMAIL PROTECTED]
*
* 4. Products derived from this Software may not be called "OpenEJB"
* nor may "OpenEJB" appear in their names without prior written
* permission of The OpenEJB Group. OpenEJB is a registered
* trademark of The OpenEJB Group.
*
* 5. Due credit should be given to the OpenEJB Project
* (http://openejb.sf.net/).
*
* THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2005 (C) The OpenEJB Group. All Rights Reserved.
*
* $Id: CSSGSSUPMechConfig.java,v 1.1 2005/03/27 02:04:41 maguro Exp $
*/
package org.openejb.corba.security.config.css;
import org.openejb.corba.security.config.tss.TSSASMechConfig;
import org.openejb.corba.security.config.tss.TSSGSSUPMechConfig;
import org.openejb.corba.util.Util;
/**
* @version $Revision: 1.1 $ $Date: 2005/03/27 02:04:41 $
*/
public class CSSGSSUPMechConfig implements CSSASMechConfig {
private final String username;
private final String password;
private final String domain;
private transient byte[] encoding;
public CSSGSSUPMechConfig(String username, String password, String
domain) {
this.username = username;
this.password = password;
this.domain = domain;
}
public short getSupports() {
return 0;
}
public short getRequires() {
return 0;
}
public boolean canHandle(TSSASMechConfig asMech) {
if (asMech instanceof TSSGSSUPMechConfig) return true;
if (asMech.getRequires() == 0) return true;
return false;
}
public byte[] encode() {
if (encoding == null) {
encoding = Util.encodeGSSUPToken(Util.getORB(), Util.getCodec(),
username, password.toCharArray(), domain);
if (encoding == null) encoding = new byte[0];
}
byte[] junk = new byte[10];
System.arraycopy(encoding, 0, junk, 0, junk.length);
return encoding;
}
}
1.1
openejb/modules/core/src/java/org/openejb/corba/security/config/css/CSSNULLTransportConfig.java
Index: CSSNULLTransportConfig.java
===================================================================
/**
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. The name "OpenEJB" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of The OpenEJB Group. For written permission,
* please contact [EMAIL PROTECTED]
*
* 4. Products derived from this Software may not be called "OpenEJB"
* nor may "OpenEJB" appear in their names without prior written
* permission of The OpenEJB Group. OpenEJB is a registered
* trademark of The OpenEJB Group.
*
* 5. Due credit should be given to the OpenEJB Project
* (http://openejb.sf.net/).
*
* THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2005 (C) The OpenEJB Group. All Rights Reserved.
*
* $Id: CSSNULLTransportConfig.java,v 1.1 2005/03/27 02:04:41 maguro Exp $
*/
package org.openejb.corba.security.config.css;
import org.openejb.corba.security.config.tss.TSSTransportMechConfig;
/**
* @version $Revision: 1.1 $ $Date: 2005/03/27 02:04:41 $
*/
public class CSSNULLTransportConfig implements CSSTransportMechConfig {
private short supports;
private short requires;
public short getSupports() {
return supports;
}
public short getRequires() {
return requires;
}
public boolean canHandle(TSSTransportMechConfig transMech) {
if ((supports & transMech.getRequires()) != transMech.getRequires())
return false;
if ((requires & transMech.getSupports()) != requires) return false;
return true;
}
}