com.edustructures.sifworks
Class HttpsProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by com.edustructures.sifworks.ADKProperties
                  extended by com.edustructures.sifworks.TransportProperties
                      extended by com.edustructures.sifworks.HttpProperties
                          extended by com.edustructures.sifworks.HttpsProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class HttpsProperties
extends HttpProperties

Properties for the HTTPS transport protocol.

To set default HTTPS properties, call the Agent.getDefaultHttpsProperties method to obtain the agent's default properties for this transport protocol. The defaults are used by all zones that do not explicitly set their own transport properties. Alternatively, you may set the default value of a property by calling the System.setProperty method, or by using the -D option on the Java command-line. Property names follow the naming convention adk.transport.https.property (e.g. adk.transport.https.port).

No default HTTP or HTTPS port is assigned to push mode agents by the class framework. It is the developer's responsibility to assign a default port. To do so, use one of the following methods:

Version:
ADK 1.0
See Also:
Serialized Form

Constructor Summary
HttpsProperties()
          Constructor
HttpsProperties(HttpProperties parent)
          Constructs an HttpsProperties object that inherits values from a parent
 
Method Summary
 java.lang.String getHostnameVerifier()
          Gets the Hostname Verifier used by the class framework when establishing a connection to the ZIS.
 java.lang.String getKeyStore()
          Gets the path to the keystore where the agent's certificate is stored.
 java.lang.String getKeyStorePassword()
          Gets the passphrase used to open the keystore
 java.lang.String getPassword()
           
 java.lang.String getProtocol()
          Gets the name of the transport protocol associated with these properties
 boolean getRequireClientAuth()
          Determines if Client Authentication is required when the ZIS establishes a connection with this agent in Push mode.
 java.lang.String getTrustStore()
           
 java.lang.String getTrustStorePassword()
           
 void setHostnameVerifier(java.lang.String verifier)
          Sets the Hostname Verifier used by the class framework when establishing an HTTPS connection to the ZIS.
 void setKeyStore(java.lang.String keyStore)
          Sets the path to the keystore where the agent's certificate is stored.
 void setKeyStorePassword(java.lang.String keyStorePass)
          Sets the passphrase used to open the keystore
 void setPassword(java.lang.String pass)
           
 void setRequireClientAuth(boolean auth)
          Determines if Client Authentication is required when the ZIS establishes a connection with this agent in Push mode.
 void setTrustStore(java.lang.String trustStore)
           
 void setTrustStorePassword(java.lang.String pwd)
           
 
Methods inherited from class com.edustructures.sifworks.HttpProperties
getHost, getPort, getPushHost, getPushPort, setHost, setPort, setPushHost, setPushPort
 
Methods inherited from class com.edustructures.sifworks.TransportProperties
defaults
 
Methods inherited from class com.edustructures.sifworks.ADKProperties
getParent, getProperty, getProperty, getProperty, getProperty, setProperty, setProperty, setProperty
 
Methods inherited from class java.util.Properties
list, list, load, loadFromXML, propertyNames, save, store, storeToXML, storeToXML
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpsProperties

public HttpsProperties()
Constructor


HttpsProperties

public HttpsProperties(HttpProperties parent)
Constructs an HttpsProperties object that inherits values from a parent

Parameters:
parent - The Http or HttpsProperties object from which properties will be inherited if not explicitly defined by this object
Method Detail

getProtocol

public java.lang.String getProtocol()
Gets the name of the transport protocol associated with these properties

Overrides:
getProtocol in class HttpProperties
Returns:
The protocol name ("https")

getKeyStore

public java.lang.String getKeyStore()
Gets the path to the keystore where the agent's certificate is stored.

Returns:
The path to the agent keystore, or null if the default Java system keystore is used. (The location of that keystore is OS-dependent but in most cases is in the user's home directory in a file named ".keystore")

setKeyStore

public void setKeyStore(java.lang.String keyStore)
Sets the path to the keystore where the agent's certificate is stored.

Parameters:
keyStore - The fully-qualified path to a Java keystore file in JKS format.

getKeyStorePassword

public java.lang.String getKeyStorePassword()
Gets the passphrase used to open the keystore

Returns:
The passphrase used to open the keystore file (the default is "changeit")

setKeyStorePassword

public void setKeyStorePassword(java.lang.String keyStorePass)
Sets the passphrase used to open the keystore

Parameters:
keyStorePass - The passphrase used to open the keystore file

getTrustStore

public java.lang.String getTrustStore()

setTrustStore

public void setTrustStore(java.lang.String trustStore)

getTrustStorePassword

public java.lang.String getTrustStorePassword()

setTrustStorePassword

public void setTrustStorePassword(java.lang.String pwd)

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String pass)

getRequireClientAuth

public boolean getRequireClientAuth()
Determines if Client Authentication is required when the ZIS establishes a connection with this agent in Push mode. When Client Authentication is enabled, the certificate presented by the ZIS must include a CN= attribute that evaluates to the IP address of the ZIS.

Client Authentication is only used when the agent is operating in a server role (i.e. push mode). It does not apply to outbound HTTPS connections or to plain HTTP connections.

Returns:
The Client Authentication value returned by the HttpProperties object passed to the constructor

setRequireClientAuth

public void setRequireClientAuth(boolean auth)
Determines if Client Authentication is required when the ZIS establishes a connection with this agent in Push mode. When Client Authentication is required, the certificate presented by the ZIS must include a CN= attribute that evaluates to the IP address of the ZIS. The agent will refuse to accept the connection if this is not the case. When disabled, the ZIS may still present a certificate but it is not required.

Client Authentication is only used when the agent is operating in a server role (that is, in Push mode). It does not apply to outbound HTTPS connections or to plain HTTP connections.

Parameters:
auth - true to require Client Authentication, false to disable it.

setHostnameVerifier

public void setHostnameVerifier(java.lang.String verifier)
Sets the Hostname Verifier used by the class framework when establishing an HTTPS connection to the ZIS.

Parameters:
verifier - To disable hostname verification (the default), pass a value of null to this method. To enable the default hostname verification employed by Java's Secure Socket Extensions, pass a value of "JSSE". To provide your own hostname verifier implementation, pass the fully-qualified name of a class that implements the com.sun.net.ssl.HostnameVerifier interface.

getHostnameVerifier

public java.lang.String getHostnameVerifier()
Gets the Hostname Verifier used by the class framework when establishing a connection to the ZIS.

Returns:
The value of the hostnameVerifier property. If hostname verification should be disabled (the default), a value of null is returned. If the default hostname verification offered by the Java Secure Socket Extensions (JSSE) should be used, a value of "JSSE" is returned. If the agent uses its own implementation of the com.sun.net.ssl.HostnameVerifier interface, the fully-qualified classname of that implementation is returned.


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.