Changeset 95 for dataportal


Ignore:
Timestamp:
25/02/05 14:31:53 (16 years ago)
Author:
nbennett
Message:

* empty log message *

Location:
dataportal/trunk/acmnerc/src/uk/ac/cclrc/authorisation
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • dataportal/trunk/acmnerc/src/uk/ac/cclrc/authorisation/ACGen.java

    r94 r95  
    11package uk.ac.cclrc.authorisation; 
    22 
    3  
    4 import java.io.*; 
     3//import java.io.*; 
     4//import org.apache.xml.security.*; 
     5//import uk.ac.cclrc.authorisation.util.*; 
    56import java.security.*; 
    67import java.security.cert.*; 
     
    1112import org.apache.log4j.*; 
    1213import java.util.*; 
    13  
    1414import org.apache.xml.security.utils.*; 
    1515import org.apache.xml.security.signature.*; 
    1616import org.apache.xml.security.transforms.*; 
    17 import org.apache.xml.security.*; 
    1817import ac.dl.xml.*; 
    19  
    20 import uk.ac.cclrc.authorisation.util.*; 
    2118 
    2219 
  • dataportal/trunk/acmnerc/src/uk/ac/cclrc/authorisation/AttributeList.java

    r91 r95  
    77package uk.ac.cclrc.authorisation; 
    88 
     9//import org.jdom.input.*; 
     10//import org.jdom.output.*; 
     11//import java.io.*; 
     12//import java.util.*; 
     13//import java.sql.*; 
    914import org.jdom.*; 
    10 import org.jdom.input.*; 
    11 import org.jdom.output.*; 
    12 import java.io.*; 
    13 import java.util.*; 
    1415import ac.dl.xml.*; 
    15 import java.sql.*; 
    1616import org.apache.log4j.*; 
    1717import java.util.*; 
  • dataportal/trunk/acmnerc/src/uk/ac/cclrc/authorisation/client/TokenReader.java

    r94 r95  
    77 
    88package uk.ac.cclrc.authorisation.client; 
    9 import uk.ac.cclrc.authorisation.Config; 
    10 import java.io.IOException; 
    11 import java.io.PrintStream; 
     9//import uk.ac.cclrc.authorisation.Config; 
     10//import java.io.IOException; 
     11//import java.io.PrintStream; 
     12//import org.globus.gsi.CertUtil; 
     13//import org.globus.gsi.OpenSSLKey; 
     14//import org.globus.gsi.bc.BouncyCastleOpenSSLKey; 
     15//import uk.ac.cclrc.authorisation.util.*; 
     16//import org.globus.util.Base64; 
     17//import org.apache.xml.security.c14n.*; 
    1218import java.security.*; 
    1319import java.security.cert.*; 
    1420import java.security.interfaces.*; 
    15 import org.globus.gsi.CertUtil; 
    16 import org.globus.gsi.OpenSSLKey; 
    17 import org.globus.gsi.bc.BouncyCastleOpenSSLKey; 
    1821import uk.ac.cclrc.authorisation.*; 
    19 import uk.ac.cclrc.authorisation.util.*; 
    2022import org.apache.log4j.*; 
    2123import org.jdom.*; 
     
    2426import java.util.*; 
    2527import java.io.*; 
    26 import org.globus.util.Base64; 
    2728import ac.dl.xml.*; 
    28  
    2929import org.apache.xml.security.utils.*; 
    3030import org.apache.xml.security.signature.*; 
     
    3232import org.apache.xml.security.samples.utils.resolver.OfflineResolver; 
    3333import org.apache.xml.security.keys.KeyInfo; 
    34 import org.apache.xml.security.c14n.*; 
    3534 
    3635 
  • dataportal/trunk/acmnerc/src/uk/ac/cclrc/authorisation/server/ACServer.java

    r94 r95  
    99import uk.ac.cclrc.authorisation.*; 
    1010import uk.ac.cclrc.authorisation.client.*; 
    11  
    1211import uk.ac.cclrc.authorisation.util.*; 
    13  
    1412import org.globus.gsi.GlobusCredential; 
    1513import org.globus.gsi.gssapi.GlobusGSSCredentialImpl; 
    1614import org.ietf.jgss.GSSCredential; 
    17 import org.ietf.jgss.GSSName; 
    18 import org.gridforum.jgss.ExtendedGSSManager; 
    19  
    20 import org.globus.gsi.CertUtil; 
    21 import org.globus.gsi.OpenSSLKey; 
    22 import org.globus.gsi.bc.BouncyCastleOpenSSLKey; 
    23 import java.security.cert.X509Certificate; 
    24  
    2515import java.security.*; 
    26 import java.security.InvalidKeyException; 
    2716import java.security.interfaces.*; 
    2817import java.security.cert.*; 
    29 import java.sql.SQLException; 
    30 import java.lang.ClassNotFoundException; 
    31  
    3218import java.io.*; 
    33 import java.net.*; 
    3419import ac.dl.xml.*; 
    3520import org.jdom.*; 
     
    3722import org.jdom.output.*; 
    3823import java.sql.*; 
    39 import org.globus.util.Base64; 
    4024import org.apache.log4j.*; 
    4125import java.util.*; 
    42  
    43 import org.apache.xml.security.utils.*; 
    44  
     26//import org.ietf.jgss.GSSName; 
     27//import org.gridforum.jgss.ExtendedGSSManager; 
     28//import org.globus.gsi.CertUtil; 
     29//import org.globus.gsi.OpenSSLKey; 
     30//import org.globus.gsi.bc.BouncyCastleOpenSSLKey; 
     31//import java.security.cert.X509Certificate; 
     32//import java.security.InvalidKeyException; 
     33//import java.sql.SQLException; 
     34//import java.lang.ClassNotFoundException; 
     35//import java.net.*; 
     36//import org.globus.util.Base64; 
     37//import org.apache.xml.security.utils.*; 
    4538 
    4639/** 
     
    360353                if( authTokenProvenance.equals("mapped") ) 
    361354                { 
     355                    /* 
    362356                    if( issuerName.equalsIgnoreCase( facility ) ) 
    363357                    { 
    364358                        System.out.println("**********************************************"); 
    365359                        System.out.println("The user is passing in a mapped token that was issued by this data centre." ); 
    366                         System.out.println("This token can be used itself and a new mapped token does not need to be generated"); 
     360                        System.out.println("An updated token will now be generated"); 
    367361                        System.out.println("//////////////////////////////////////////////"); 
    368362                        System.out.println(""); 
    369363                        System.out.println(""); 
    370364                         
    371                         return extAuthToken; 
     365                        //return extAuthToken; 
     366                        doc = createMappedAuthorisationToken( proxyCertString, extAuthToken ); 
    372367                    } 
    373368                    else 
    374369                    { 
     370                     */ 
    375371                        throw new InvalidAuthorisationTokenException( "Mapped Authorisation Tokens can not be used to generate further Authorisation Tokens - only Original Authorisation Tokens for affiliated institutions can be." ); 
    376                     } 
     372                    //} 
    377373                } 
    378374                else 
     
    12321228        //System.out.println(globusCredential.getIdentityCertificate().getSubjectDN().toString()); 
    12331229 
    1234         GSSCredential userCredential = new GlobusGSSCredentialImpl(globusCredential,GSSCredential.INITIATE_AND_ACCEPT); 
     1230        GSSCredential userCredential = null; 
     1231         
     1232        try 
     1233        { 
     1234            userCredential = new GlobusGSSCredentialImpl(globusCredential,GSSCredential.INITIATE_AND_ACCEPT); 
     1235        } 
     1236        catch( Exception e ) 
     1237        { 
     1238            System.out.println("**********************************************"); 
     1239            System.out.println("The user's proxy certificate is invalid meaning that a DN can not be extracted"); 
     1240            System.out.println("//////////////////////////////////////////////"); 
     1241            System.out.println(""); 
     1242            System.out.println(""); 
     1243            log.error( "The user's proxy certificate is invalid meaning that a DN can not be extracted", e ); 
     1244            throw e; 
     1245        } 
    12351246        //user globus dns for User dn 
    12361247        //X509Certificate cert = globusCredential.getIdentityCertificate(); 
     
    15191530            catch( Exception e ) 
    15201531            { 
    1521                 log.error("Lifetime of authorisation token not specified in config file correctly",e); 
     1532                log.error("Lifetime of authorisation token not specified in config file correctly so default used instead; " + 
     1533                    "the lifetime of the token has been set to the remaining lifetime of the proxy certificate.",e); 
    15221534                //throw e; 
    15231535            } 
  • dataportal/trunk/acmnerc/src/uk/ac/cclrc/authorisation/unittest/TestACServer_3.java

    r94 r95  
    4242             
    4343            //load in cert 
    44             //URL url1 = new URL("file:///D:/Neil/X509up_u_sas27"); 
    45             URL url1 = new URL("file:///D:/Neil/X509up_u_ndb23"); 
     44            URL url1 = new URL("file:///D:/Neil/X509up_u_sas27"); 
     45            //URL url1 = new URL("file:///D:/Neil/X509up_u_ndb23"); 
    4646            //http://dmgdev1.esc.rl.ac.uk:9080/sessionmanager/services/SessionManager      // System.out.println(url); 
    4747            URLConnection con = url1.openConnection(); 
     
    7272            org.w3c.dom.Element xml  = acs.getAuthorisationTokenInDOM(cert3, foreignToken ); 
    7373     
    74 //            org.w3c.dom.Element xml  = acs.getAuthorisationTokenInDOM( cert3 ); 
     74  //          org.w3c.dom.Element xml  = acs.getAuthorisationTokenInDOM( cert3 ); 
    7575             
    7676            if( xml == null ) 
    7777            { 
    7878                System.out.println("**********************************************"); 
    79                 System.out.println("No token returned.  This is because when we tried to generate a token " + 
     79                System.out.println("No token returned, i.e. getAuthorisationTokenInDOM returns null.  This is because when we tried to generate a token " + 
    8080                    "no relevant roles were retrieved from the database"); 
    8181                System.out.println("//////////////////////////////////////////////"); 
Note: See TracChangeset for help on using the changeset viewer.