Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ohf.ihe.common.atna
Class ConfigurationManager

    java.lang.Object
      org.eclipse.ohf.ihe.common.atna.ConfigurationManager

    public class ConfigurationManager

extends java.lang.Object

Thread safe repository of configurations used by the ATNA Agent plugin org.eclipse.ohf.ihe.atna.agent
This class is a singleton, all methods are static methods against the singleton instance. No user initiated initialization is required.

When the class is loaded, it will examine the System environment looking for the standard SSL/TLS environment variarbles. If present, they will be use to create a default SecurityDomain

- javax.net.ssl.keyStore
- javax.net.ssl.keyStorePassword

Optional settings
- javax.net.ssl.trustStore
- javax.net.ssl.trustStorePassword
- http.ciphersuites=XXX list of suites to use. IHE recommends TLS_RSA_WITH_NULL_SHA and TLS_RSA_WITH_AES_CBC_SHA
- javax.net.debug
  This class also provides the control point to force TLS NOT TO BE USED for any connection. This is done with the `setTLSEnabled(boolean)` method. Unless set, the default is to allow TLS.

  Since:
    OHF 1.0.0
  Author:
    Glenn Deen glenn@almaden.ibm.com

  Method Summary
  `static java.util.Set` | `getRegisteredSecurityDomains()` Returns the names of the registered security domains.
  `static SecurityDomain` | `getSecurityDomain(java.lang.String name)` Returns the security domain with the given name.
  `static SecurityDomain` | `getSecurityDomain(java.net.URI uri)` Returns the SecurityDomain object registered as associated with the URI.
  `static boolean` | `isNonTLSConnectionsPermitted()` Global setting which overrides the ability for protocols like mllp and http to make unsecure connections.
  `static boolean` | `isTLSEnabled()` Get the value of the global override for TLS use.
  `static void` | `registerDefaultSecurityDomain(SecurityDomain securityDomain)` Registers the properies file to be used as the default security domain.
  `static void` | `registerSecurityDomain(SecurityDomain securityDomain)` Registers the SecurityDomain object with the ConfigurationManager.
  `static void` | `registerURItoSecurityDomain(java.net.URI uri, java.lang.String name)` Registers the association of the given URI to the named security domain.
  `static void` | `setNonTLSConnectionsPermitted(boolean nonTLSConnectionsPermitted)` Global setting which overrides the ability for protocols like mllp and http to make unsecure connections.
  `static void` | `setTLSEnabled(boolean enabletls)` Global setting which overrides the behaviour of the use of TLS in network communications.
  `static void` | `unregisterURItoSecurityDomain(java.net.URI uri)` Removes the URI from registered set of URI's

  Methods inherited from class java.lang.Object
  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  Method Detail

  ### registerSecurityDomain

      public static void registerSecurityDomain(SecurityDomain securityDomain)

    Registers the SecurityDomain object with the ConfigurationManager.

    About the Security Domain name
    The security domain name SecurityDomain#getName() is used as a key by subsequent calls such as {@link #registerURItoSecurityDomain(URI, String)} to associate the security properties registered here.

    - The name DEFAULT is a special name name which specifies the name which will be used for a URI in the absence of a explicit name registered the URI
    - Other than DEFAULT any other name is allowed, and is up to the calling application to choose.

    Parameters:
      `securityDomain` - domain to add to the configuration manager

  ### registerDefaultSecurityDomain

      public static void registerDefaultSecurityDomain(SecurityDomain securityDomain)

    Registers the properies file to be used as the default security domain. The security domain object is also registered under its given name taken from the `SecurityDomain.getName()` method.

    About the Security Domain name
    The security domain name is used as a key by subsequent calls such as `registerURItoSecurityDomain(URI, String)` to associate the security properties registered here.

    - The name DEFAULT is a special domain name which specifies the domain which will be used for a URI in the absence of a explicit domain registered the URI
    - Other than DEFAULT any other name is allowed, and is up to the calling application to choose.

    Parameters:
      `properties` -

  ### registerURItoSecurityDomain

      public static void registerURItoSecurityDomain(java.net.URI uri,
                                                     java.lang.String name)
                                              throws NoSecurityDomainException

    Registers the association of the given URI to the named security domain. Registration is only needed when a URI needs to use a security domain other than the default domain.
    If the URI was previously registered with another domain that association is replaced with this new one.

    Parameters:
      `uri` - URI to register, may not be null
      `name` - of SecurityDomain to associate
    Throws:
      `{@link` - IllegalArgumentException If the specified domain doesn't exist, or if the URI is null
      `NoSecurityDomainException`

  ### unregisterURItoSecurityDomain

      public static void unregisterURItoSecurityDomain(java.net.URI uri)

    Removes the URI from registered set of URI's

    Parameters:
      `uri` -

  ### getSecurityDomain

      public static SecurityDomain getSecurityDomain(java.lang.String name)

    Returns the security domain with the given name. Returns null if so matching domain could be found.

    Parameters:
      `name` -
    Returns:

  ### getSecurityDomain

      public static SecurityDomain getSecurityDomain(java.net.URI uri)
                                              throws NoSecurityDomainException

    Returns the SecurityDomain object registered as associated with the URI.
    If no association has been registered for the URI, then the DEFAULT SecurityDomain is returned, if a DEFAULT domain has been registered.

    Parameters:
      `uri` -
    Returns:
      SecurityDomain associated with the URI
    Throws:
      `NoSecurityDomainException` - if no security name has been associated with the URI

  ### getRegisteredSecurityDomains

      public static java.util.Set getRegisteredSecurityDomains()

    Returns the names of the registered security domains.
    The returned set is a read only unmodifiable set

    Returns:
      set

  ### isTLSEnabled

      public static boolean isTLSEnabled()

    Get the value of the global override for TLS use. See `setTLSEnabled(boolean)`

    Returns:

  ### setTLSEnabled

      public static void setTLSEnabled(boolean enabletls)

    Global setting which overrides the behaviour of the use of TLS in network communications. By default TLS is enabled, but this can be overriden by setting this method to False

    Parameters:
      `enabletls` - - true = (default) tls enabled, false = TLS WILL BE DISABLED for all connections

  ### isNonTLSConnectionsPermitted

      public static boolean isNonTLSConnectionsPermitted()

    Global setting which overrides the ability for protocols like mllp and http to make unsecure connections. If true this is premitted. if False all connections will be forces to the TLS.

    Returns:

  ### setNonTLSConnectionsPermitted

      public static void setNonTLSConnectionsPermitted(boolean nonTLSConnectionsPermitted)

    Global setting which overrides the ability for protocols like mllp and http to make unsecure connections. If true this is premitted. if False all connections will be forces to the TLS.

    Parameters:
      `nonTLSConnectionsPermitted` -

  Overview | Package | Class | Use | Tree | Deprecated | Index | Help
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD