uk.ac.soton.itinnovation.grid.client.swing
Class KrbConfigHelpers

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.client.swing.KrbConfigHelpers

public class KrbConfigHelpers
extends Object

Author:
bmn

Constructor Summary
KrbConfigHelpers()
          Creates a new instance of KrbConfigHelpers
 
Method Summary
static void createKer5login(String cltConfigFolderPath, String cltConfigFolderName, String entryName, String useCache, String useTicketCache, String ticketCacheFile)
          create a ker5login.conf file
static void createKerberosProperties(String cltConfigFolderPath, String cltConfigFolderName, String krbIni, String stsUrl, String srvPrincipal, String srvPricipalName, String krb5LoginEntry)
          create a kerberos.properties file
static void createKrbConfigs(String parentConfFolder, String folderName, String krb5loginEntry, String stsUrl, String srvPrincipal, String srvPrincipalName, String winKrbIni, String tCache)
          create a set of kerberos config files: kerberos.properties, ker5login.conf, wsdd file, session key keystore and crypto file
static void createKrbCrypto(String cltConfigFolderPath, String cltConfigFolderName)
          create a krb.crypto file to store the session key in a krb.sessionkey.ks keystore
static void createWSDDFile(String cltConfigFolderPath, String cltConfigFolderName)
          create a wsdd file for the client to connect to the STS
static String getKrbIni(String folder)
          gets the krb5.ini path from the configurations in folder
static String getStsPrincipal(String folder)
          gets the sts principal from the configurations in folder
static String getStsPrincipalName(String folder)
          gets the sts principal name from the configurations in folder
static String getStsTicketCache(String folder)
          gets the kerberos ticketcache location from the configurations in folder
static String getStsUrl(String folder)
          gets the sts service url from the configurations in folder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KrbConfigHelpers

public KrbConfigHelpers()
Creates a new instance of KrbConfigHelpers

Method Detail

getStsUrl

public static String getStsUrl(String folder)
gets the sts service url from the configurations in folder

Parameters:
folder - the name of the folder in the classpath
Returns:
sts url

getStsPrincipal

public static String getStsPrincipal(String folder)
gets the sts principal from the configurations in folder

Parameters:
folder - the name of the folder in the classpath
Returns:
sts principal

getStsPrincipalName

public static String getStsPrincipalName(String folder)
gets the sts principal name from the configurations in folder

Parameters:
folder - the name of the folder in the classpath
Returns:
sts principal name

getKrbIni

public static String getKrbIni(String folder)
gets the krb5.ini path from the configurations in folder

Parameters:
folder - the name of the folder in the classpath
Returns:
krb5.ini path

getStsTicketCache

public static String getStsTicketCache(String folder)
gets the kerberos ticketcache location from the configurations in folder

Parameters:
folder - the name of the folder in the classpath
Returns:
ticketcache path

createKrbConfigs

public static void createKrbConfigs(String parentConfFolder,
                                    String folderName,
                                    String krb5loginEntry,
                                    String stsUrl,
                                    String srvPrincipal,
                                    String srvPrincipalName,
                                    String winKrbIni,
                                    String tCache)
create a set of kerberos config files: kerberos.properties, ker5login.conf, wsdd file, session key keystore and crypto file

Parameters:
parentConfFolder - the name of the folder in the classpath
folderName - a folder to be created in parentConfFolder to store the config files
krb5loginEntry - the jaas configuration entry name in krb5login.conf
stsUrl - kerberos sts url
srvPrincipal - the service principal
srvPrincipalName - the sts principal name
winKrbIni - the krb5.ini or krb5.conf file location
tCache - ticket cache location

createKerberosProperties

public static void createKerberosProperties(String cltConfigFolderPath,
                                            String cltConfigFolderName,
                                            String krbIni,
                                            String stsUrl,
                                            String srvPrincipal,
                                            String srvPricipalName,
                                            String krb5LoginEntry)
create a kerberos.properties file

Parameters:
cltConfigFolderPath - the name of the folder in the classpath
cltConfigFolderName - a folder to be created in parentConfFolder to store the config files
krbIni - the krb5.ini or krb5.conf file location
stsUrl - kerberos sts url
srvPrincipal - the service principal
srvPricipalName - the sts principal name
krb5LoginEntry - the jaas configuration entry name in ker5login.conf

createKer5login

public static void createKer5login(String cltConfigFolderPath,
                                   String cltConfigFolderName,
                                   String entryName,
                                   String useCache,
                                   String useTicketCache,
                                   String ticketCacheFile)
create a ker5login.conf file

Parameters:
cltConfigFolderPath - the name of the folder in the classpath
cltConfigFolderName - a folder to be created in parentConfFolder to store the config files
entryName - the jaas configuration entry name
useCache - the value of useCache entry: true or false
useTicketCache - the value of useTicketCache entry: true or false
ticketCacheFile - ticket cache location

createKrbCrypto

public static void createKrbCrypto(String cltConfigFolderPath,
                                   String cltConfigFolderName)
create a krb.crypto file to store the session key in a krb.sessionkey.ks keystore

Parameters:
cltConfigFolderPath - the name of the folder in the classpath
cltConfigFolderName - a folder to be created in parentConfFolder to store the config files

createWSDDFile

public static void createWSDDFile(String cltConfigFolderPath,
                                  String cltConfigFolderName)
create a wsdd file for the client to connect to the STS

Parameters:
cltConfigFolderPath - the name of the folder in the classpath
cltConfigFolderName - a folder to be created in parentConfFolder to store the config files


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.