com.wrq.vhi.sconfig
Interface IAADSConnection


public interface IAADSConnection

Interface class for connecting to a VHI AADS and for managing certificates. Use the ServerConfig.newAADSConnection() methods to create instances of this interface.


Method Summary
 boolean compareCertificate(SCCertificate scc, java.lang.String fingerprint)
          Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication
 void connect()
          Make a connection to an AADS server for the potential purpose of obtaining a list of servers and/or domains.
 boolean deleteCertificate(java.lang.String AADSName)
          Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication
 void disconnect()
          disconnect from the AADS server, if we are connected.
 java.lang.String getAADSName()
          Get the name of the AADS for this instance.
 SCCertificate getCertificate(java.lang.String AADSName)
          Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication
 SCCertificate getCertificateFromAADS(java.lang.String AADSName)
          Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication
 void loadKeystore(java.lang.String keystoreFile)
          Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication
 void saveKeystore(java.lang.String keystoreFile)
          Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication
 void storeCertificate(SCCertificate scc)
          Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication
 

Method Detail

getCertificateFromAADS

@Deprecated
SCCertificate getCertificateFromAADS(java.lang.String AADSName)
                                     throws SCException
Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication

Obtain a current certificate directly from an AADS. For optimal security, the following is recommended: Do not use this method to obtain fresh certificates from AADS's each time the maintenance API is used. This method is intended to be invoked once for each new AADS installation and used to build a local keystore map. Once the keystore map is built, it should be saved to a local disk file and reused. After a keystore map file is established, it should be loaded from disk when an instance of this object is constructed or by calling the loadKeystore() method. The keystore map is a static member of the AADSConnection class and only needs to be loaded once in order for all instances to access it.

Parameters:
AADSName - Name of AADS.
Returns:
Certificate container object.
Throws:
SCException - if there is a failure getting the certificate from the AADS.

compareCertificate

@Deprecated
boolean compareCertificate(SCCertificate scc,
                                      java.lang.String fingerprint)
Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication

Calculate a fingerprint for a certificate and compare it to a fingerprint string. An algorithm is applied to the certificate data to generate a fingerprint string of the same form as displayed in VHI setup and various VHI components when registering with an AADS. This string is then compared with a reference fingerprint to see if the strings match.

Parameters:
scc - Reference to a certificate.
fingerprint - Reference to a fingerprint string of the form: C4:9C:C0:B5:8B:A4:B7:84:FC:4F:EB:79:72:5B:03:99:C9:E0:D9:D1
Returns:
flag indicating that calculated fingerprint string matches the string provided.
Throws:
java.lang.IllegalArgumentException - is thrown if arguments are not valid.

storeCertificate

@Deprecated
void storeCertificate(SCCertificate scc)
Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication

Add an AADS certificate to our local keystore map. Note: Adding a certificate to the local keystore map does not automatically write those changes to a local keystore file on disk. This method is used to build a keystore map, using the return values from the getCertificateFromAADS() method. Once certificates have been acquired for all of the AADS servers of interest, the keystore map can be saved to a local disk file.

Parameters:
scc - Reference to the certificate to be stored.

getCertificate

@Deprecated
SCCertificate getCertificate(java.lang.String AADSName)
Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication

Get a certificate from our local keystore map. This method is used to obtain a certificate from our local keystore map. This map will have been populated either by loading a keystore map file from disk, or by calling the storeCertificate() method. This method is used internally to obtain certificates for authentication.

Parameters:
AADSName - Name of the AADS server for which the certificate is to be obtained.
Returns:
Reference to an SCCertificate container, or null if the there is no certificate for the named AADS in the local keystore.

deleteCertificate

@Deprecated
boolean deleteCertificate(java.lang.String AADSName)
Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication

Remove a certificate from our local keystore map. Note: Removing a certificate from the local keystore map does not automatically write changes to a local keystore file on disk.

Parameters:
AADSName - Name of the AADS server for which the certificate is to be removed.
Returns:
Flag indicating that the certificate was found and removed from the local keystore.

loadKeystore

@Deprecated
void loadKeystore(java.lang.String keystoreFile)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException,
                         java.io.FileNotFoundException
Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication

Read our AADS keystore map from a local disk file. The keystore map is a file containing zero or more AADS certificates.

Parameters:
keystoreFile - Name of the local disk file from which the keystore information is to be read.
Throws:
java.io.IOException - if there is an error opening or reading the file.
java.io.FileNotFoundException - if there is an error opening the keystore file.
java.lang.ClassNotFoundException - if the keystore file contents are not recognized to be valid.

saveKeystore

@Deprecated
void saveKeystore(java.lang.String keystoreFile)
                  throws java.io.IOException
Deprecated. AADS is now replaced by the ManagementServer and a certificate is no longer necessary for encrypted communication

Write our AADS keystore map to a local disk file.

Parameters:
keystoreFile - Name of the local disk file to which the keystore information is to be written.
Throws:
java.io.IOException - if there is an error opening or writing the file.

connect

void connect()
             throws SCException
Make a connection to an AADS server for the potential purpose of obtaining a list of servers and/or domains. If this instance is already connected to an AADS server, the current session is disconnected first.

Throws:
SCException - is thrown if the certificate for the specified AADS is not present, or there is an error connecting to the AADS server.

disconnect

void disconnect()
disconnect from the AADS server, if we are connected.


getAADSName

java.lang.String getAADSName()
Get the name of the AADS for this instance.

Returns:
Name of the AADS to which this instance is assigned.