com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface Class Reference

This class contains all the configuration required by the Nirvana Realm server to start and control the HTTPS interface. More...

#include <nHTTPSInterface.h>

Inheritance diagram for com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface:
com::pcbsys::nirvana::nAdminAPI::nHTTPInterface com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI com::pcbsys::nirvana::nAdminAPI::nInterface

Public Member Functions

virtual const std::string & getAlias ()
 Returns the certificate name/alias that this interface uses as its primary certificate. More...
 
virtual bool getCertRequired ()
 Returns whether this interface requires SSL client authentication or not. More...
 
virtual const std::string & getCRLFile ()
 Returns the Certificate revocation list that the server uses. More...
 
virtual const std::string & getCRLValidationClassName ()
 Any class that extends com.pcbsys.nirvana.server.api.nSSLCertficateValidator can be used by the server to perform CRL management. More...
 
virtual std::string * getEnabledCiphers (int &nCipher)
 Returns an array of strings which represent the current Ciphers enabled for use by this interface. More...
 
virtual const std::string & getKeyStore ()
 Returns the name of the keystore file that this interface uses to load the certificate from. More...
 
virtual const std::string & getProvider ()
 Get the name of the provider used by this SSL interface. More...
 
virtual const std::string & getRandomAlgorithm ()
 Returns the SecureRandom algorithm used for this interface. More...
 
virtual const std::string & getRandomProvider ()
 Returns the SecureRandom provider used by this interface. More...
 
virtual std::string * getSupportedCiphers (int &nCipher)
 Returns an array of ciphers this this interface can be configured for use by this interface. More...
 
virtual const std::string & getTrustStore ()
 Returns the current truststore file that this interface uses to validate the client certificate chain against. More...
 
 nHTTPSInterface (fHTTPSConfig *pCfg, nInterfaceManager *pIm)
 Creates a new HTTPS interface bound to the adapter and port supplied. More...
 
virtual void setAlias (const std::string &alias)
 Sets the certificate name/alias that this interface will use to select its certificate from a keystore with multiple entries. More...
 
virtual void setCertRequired (bool required)
 Specifies whether this interface requires SSL client authentication or not. More...
 
virtual void setCRLFile (const std::string &fileName)
 Sets the Certificate revocation list file name that the interface should use to check the incoming SSL connections. More...
 
virtual void setCRLValidationClassName (const std::string &className)
 Any class that extends com.pcbsys.nirvana.server.api.nSSLCertficateValidator can be used by the server to perform CRL management. More...
 
virtual void setEnabledCiphers (std::string *pCiphers, int nCipher)
 Specifies the names of the ciphers enabled for use by this interface. More...
 
virtual void setKeyStore (const std::string &keyStore)
 Sets the keystore file that this interface uses to load the certificate from. More...
 
virtual void setKeyStorePassword (const std::string &keyStorePassword)
 Sets the keystore password that this interface will use to access the keystore file specified. More...
 
virtual void setPrivateKeyPassword (const std::string &password)
 Sets the private key password so that the key can be loaded from the key store. More...
 
virtual void setProvider (const std::string &providerName)
 Set the name of the provider to use. More...
 
virtual void setRandomAlgorithm (const std::string &alg)
 Sets the SecureRandom algorithm to use for this interface. More...
 
virtual void setRandomProvider (const std::string &prov)
 Sets the SecureRandom provider to use for this interface. More...
 
virtual void setTrustStore (const std::string &trustStore)
 Sets the truststore file that this interface uses to validate the client certificate against. More...
 
virtual void setTrustStorePassword (const std::string &trustStorePassword)
 Changes the truststore's password that the server uses to access the trust store. More...
 
- Public Member Functions inherited from com::pcbsys::nirvana::nAdminAPI::nHTTPInterface
void enabled_HTTP_1_1 (bool flag)
 set the use of HTTP1.1 More...
 
void enabledWebSockets (bool flag)
 Sets the use of WebSockets. More...
 
longlong getAjaxLPActiveDelay ()
 Returns the time to wait (for additional events) before delivering to Long Poll style subscribers. More...
 
longlong getAjaxLPIdleDelay ()
 Returns the time to wait before returning from a Long Poll call if no events have been received. More...
 
std::list< nCustomHeader * > * getCustomHeaders ()
 Returns a List of nCustomHeader which will be sent to javascript clients. More...
 
std::string getInitialJavascript ()
 Returns the javascript code that will be sent to comet / iframe users on initialisation. More...
 
bool isHTTP_1_1_Enabled ()
 Returns true if HTTP 1.1 is enabled. More...
 
bool isNativeCometAllowed ()
 Returns whether this interface has javascript enabled or not. More...
 
bool isWebSocketEnabled ()
 Returns true if WebSockets are enabled. More...
 
 nHTTPInterface (fHTTPConfig *pCfg, nInterfaceManager *pIm)
 Creates a new HTTP interface. More...
 
void setAjaxLPActiveDelay (longlong ajaxLPActiveDelay)
 Sets the time to wait (for additional events) before delivering to Long Poll style subscribers. More...
 
void setAjaxLPIdleDelay (longlong ajaxLPIdleDelay)
 Set the time to wait before returning from a Long Poll call if no events have been received. More...
 
void setCustomHeaders (std::list< nCustomHeader * > *customHeaders)
 Sets the custom headers that will be sent to javascript clients. More...
 
void setInitialJavascript (std::string initialJavascript)
 Set the javascript code that will be sent to comet / iframe users on initialisation. More...
 
void setNativeCometAllowed (bool nativeCometAllowed)
 Sets whether javascript is enabled on the interface. More...
 
- Public Member Functions inherited from com::pcbsys::nirvana::nAdminAPI::nInterface
bool canAdvertise ()
 Will this interface be used by other realms to send client redirects to. More...
 
virtual bool Equals (const std::string &item)
 Compares the name of this interface with the string parameter. More...
 
virtual bool Equals (nInterface *pItem)
 Compares this nInterface object with another object. More...
 
virtual const std::string & getAdapaterAlias ()
 Returns the interfaces known alias's. More...
 
virtual const std::string & getAdapter ()
 Get the adapter that this interface will use. More...
 
virtual int getAuthTimeOut ()
 Returns the number of milliseconds that the remote client has to authenticate with the server before the server closes the communications with the client. More...
 
virtual int getBacklog ()
 The number of socket connect requests that the Operating System will queue before sending a reject to the remote client. More...
 
virtual const std::string & getName ()
 Get the name of this interface. More...
 
virtual int getPort ()
 Get the port that this interface will bind to at startup. More...
 
virtual const std::string & getProtocol ()
 Returns the protocol string used by this interface. More...
 
virtual int getRecvBufferSize ()
 Return the socket buffer size in bytes used by this interface when receiving data. More...
 
virtual int getSelectThreadSize ()
 Returns the number of select threads used by NIO. More...
 
virtual int getSendBufferSize ()
 Return the socket buffer size in bytes used by this interface when sending data. More...
 
virtual int getThreadCount ()
 Returns the current Thread Pool size that handles client socket connections. More...
 
virtual std::string getURL ()
 Get the URL that specifies this interface. More...
 
virtual nACLgetViaList ()
 Retrieves the interfaces Via list. More...
 
virtual bool isAllowNIO ()
 Returns whether NIO is enabled on this interface. More...
 
virtual bool isClientConnectionsAllowed ()
 Returns whether this interface can be used by clients to connect. More...
 
virtual bool isInterRealmAllow ()
 Returns whether this interface is allowed to be used in inter realm / cluster communication. More...
 
 nInterface (fDriverConfig *pCfg, nInterfaceManager *pIm)
 Creates a new nInterface object from the supplied fDriverConfig and nInterfaceManager. More...
 
virtual void setAdapterAlias (const std::string &alias)
 Sets the interfaces alias. More...
 
virtual void setAdvertise (bool flag)
 Change the current advertise status for this interface. More...
 
virtual void setAllowClientConnections (bool clientconnections)
 Sets whether this interface can accept client connections or not. More...
 
virtual void setAllowNIO (bool allowNIO)
 Set whether NIO is enabled on the interface. More...
 
virtual void setAuthTimeOut (int timeout)
 Changes the number of milliseconds that the remote client has to authenticate with the server. More...
 
virtual void setAutostart (bool flag)
 Change the current Autostart status for this interface. More...
 
virtual void setBacklog (int backlog)
 Changes the number of connections to queue before the Operating System will send rejects to the remote client. More...
 
virtual void setInterRealmAllow (bool interealmAllow)
 Sets whether this interface is allowed to be used in inter realm / cluster communication. More...
 
virtual void setManager (nInterfaceManager *pIm)
 Set the Interface Manager. More...
 
virtual void setRecvBufferSize (int recvBufferSize)
 Set the socket buffer size in bytes used by this interface when receiving data. More...
 
virtual void setSelectThreadSize (int selectThreadSize)
 Sets the number of select threads used by NIO. More...
 
virtual void setSendBufferSize (int sendBufferSize)
 Set the socket buffer size in bytes used by this interface when sending data. More...
 
virtual void setThreadCount (int count)
 Changes the thread pool size handling the client connections. More...
 
virtual void setUseForProxyForward (bool useForproxyForward)
 Set if ProxyForwarding is to be used. More...
 
virtual void setViaList (nACL *pAcl)
 Commits the nACL object passed in with the Realm Server. More...
 
virtual std::string toString ()
 Return a string representation of the interface details. More...
 
virtual bool useForProxyForward ()
 Returns true if proxy forwarding is enabled. More...
 
virtual bool willAutostart ()
 Will this interface automatically be started when the Realm Server starts. More...
 

Detailed Description

This class contains all the configuration required by the Nirvana Realm server to start and control the HTTPS interface.

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::nHTTPSInterface ( fHTTPSConfig *  pCfg,
nInterfaceManager pIm 
)

Creates a new HTTPS interface bound to the adapter and port supplied.

Parameters
*pCfgconfiguration to use
*pIMinterface manager for this interface

Member Function Documentation

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getAlias ( )
virtual

Returns the certificate name/alias that this interface uses as its primary certificate.

Returns
the Name/Alias of the certificate as a String
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual bool com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getCertRequired ( )
virtual

Returns whether this interface requires SSL client authentication or not.

If this is set to false then this interface allows anonymous connections using SSL. Otherwise the client must have and present a valid certificate chain during the SSL handshake.

Returns
a boolean specifying the SSL client authentication setting
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getCRLFile ( )
virtual

Returns the Certificate revocation list that the server uses.

Returns
the CRL file name that the interface uses

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getCRLValidationClassName ( )
virtual

Any class that extends com.pcbsys.nirvana.server.api.nSSLCertficateValidator can be used by the server to perform CRL management.

The class name can be supplied per interface and then when a client connects a callout is issued to this class to validate the connection.

Returns
current class name of the CRL validation

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual std::string* com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getEnabledCiphers ( int &  nCipher)
virtual

Returns an array of strings which represent the current Ciphers enabled for use by this interface.

Returns
a string* containing the names of the ciphers enabled for use by this interface
See Also
nSSLInterface
nHTTPSInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getKeyStore ( )
virtual

Returns the name of the keystore file that this interface uses to load the certificate from.

Returns
The name of the keystore file to use as a String
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getProvider ( )
virtual

Get the name of the provider used by this SSL interface.

Returns
The name of the provider being used for the interface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getRandomAlgorithm ( )
virtual

Returns the SecureRandom algorithm used for this interface.

If it is null it uses the system default algorithm.

Returns
a String specifying the Random Algorithm used by this interface
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getRandomProvider ( )
virtual

Returns the SecureRandom provider used by this interface.

If it is null it uses the system default provider.

Returns
a String specifying the Secure Random provider used by this interface
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual std::string* com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getSupportedCiphers ( int &  nCipher)
virtual

Returns an array of ciphers this this interface can be configured for use by this interface.

If the cipher is not in this list then the interface can not support it.

Parameters
nCipherparameter to hold the number of ciphers
Returns
String[] of ciphers which can be configured for use by this interface
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::getTrustStore ( )
virtual

Returns the current truststore file that this interface uses to validate the client certificate chain against.

Returns
the Truststore file name as a String
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setAlias ( const std::string &  alias)
virtual

Sets the certificate name/alias that this interface will use to select its certificate from a keystore with multiple entries.

Parameters
aliasthe name/alias to use as a String
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setCertRequired ( bool  required)
virtual

Specifies whether this interface requires SSL client authentication or not.

If this is set to false then this interface allows anonymous connections using SSL. Otherwise the client must have and present a valid certificate chain during the SSL handshake.

Parameters
requireda boolean specifying if this interface will force client authentication
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setCRLFile ( const std::string &  fileName)
virtual

Sets the Certificate revocation list file name that the interface should use to check the incoming SSL connections.

Is only used when client certificates are required.

The file should be in a standard X.509 Certificate Revocation List (CRL)

Parameters
fileNamethe full path of the CRL file to use

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setCRLValidationClassName ( const std::string &  className)
virtual

Any class that extends com.pcbsys.nirvana.server.api.nSSLCertficateValidator can be used by the server to perform CRL management.

The class name can be supplied per interface and then when a client connects a callout is issued to this class to validate the connection.

Parameters
classNamethe class name of the certificate validator to use within this interface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setEnabledCiphers ( std::string *  pCiphers,
int  nCipher 
)
virtual

Specifies the names of the ciphers enabled for use by this interface.

Parameters
pCiphersa String* of ciphers enabled for use by this interface
nCipherthe number of ciphers
Exceptions
nAdminIllegalArgumentExceptionif an empty or null array is specified
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setKeyStore ( const std::string &  keyStore)
virtual

Sets the keystore file that this interface uses to load the certificate from.

Parameters
keyStorethe new keystore name as a String
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setKeyStorePassword ( const std::string &  keyStorePassword)
virtual

Sets the keystore password that this interface will use to access the keystore file specified.

Parameters
keyStorePasswordthe new password as a string
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setPrivateKeyPassword ( const std::string &  password)
virtual

Sets the private key password so that the key can be loaded from the key store.

Parameters
passwordfor the private key as a String
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setProvider ( const std::string &  providerName)
virtual

Set the name of the provider to use.

Parameters
providerNamethe name of the provider to use

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setRandomAlgorithm ( const std::string &  alg)
virtual

Sets the SecureRandom algorithm to use for this interface.

Parameters
algthe name of the new SecureRandom algorithm to use
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setRandomProvider ( const std::string &  prov)
virtual

Sets the SecureRandom provider to use for this interface.

Parameters
provthe name of the new SecureRandom provider to use
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setTrustStore ( const std::string &  trustStore)
virtual

Sets the truststore file that this interface uses to validate the client certificate against.

Parameters
trustStorethe name of the new truststore file to use
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.

virtual void com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface::setTrustStorePassword ( const std::string &  trustStorePassword)
virtual

Changes the truststore's password that the server uses to access the trust store.

Parameters
trustStorePasswordthe new password to use as a String
Exceptions
nAdminIllegalArgumentExceptionif an illegal argument is specified
See Also
nSSLInterface

Implements com::pcbsys::nirvana::nAdminAPI::nSSLInterfaceAPI.