Class Security

java.lang.Object
com.progress.open4gl.dynamicapi.Security

public class Security extends Object
This class is responsible for communicating security related information between the OpenClient proxy and the broker layer. The security information is related to the security settings when using http/https to communicate with an AppServer.
  • Constructor Details

    • Security

      public Security()
  • Method Details

    • setProxyHost

      public static void setProxyHost(String host) throws Open4GLException

      The setProxyHost() method will indicate that the HTTP protocol tunneling will take place through this HTTP proxy server. If a specific network port has not been set through the setProxyPort() method, the default HTTP port (80) will be used. If not specified, a HTTP proxy is not configured and used.


      Parameters:
      host - is a String object specifying the DNS-name or dot-formatted IP address of the HTTP proxy server
      Throws:
      Open4GLException
    • setProxyPort

      public static void setProxyPort(int port) throws Open4GLException

      The setProxyPort() method will set the IP port number to use in conjunction with the proxy host name that was set with the setProxyHost() method.

      NOTE: This parameter will be ignored until the setProxyHost() method has been called.


      Parameters:
      port - is a postive int in the range of 3 to 65536
      Throws:
      Open4GLException
    • setCertificateStore

      public static void setCertificateStore(String certStoreList) throws Open4GLException

      The setCertificateStore() method will set the path used to locate the Root Digital Certificates used by the HTTP/S protocol for validating the HTTP/S server's identity. This path is a comma separated list that may contain one or more entries of:

      • a binary certificate with a .cer or .crt file extension
      • a PEM encoded certificate with a .pem or .0 file extension
      • a disk directory that contains files with a .pem, .0, .cer, or .crt file extensions
      • a JAR file with a .jar file extension
      • a ZIP file with a .zip file extension
      • a manifest file with a .mf file extension as a CLASSPATH resource only

      The path search will take each entry and determine if it is a file (or directory). If it is, the file is loaded from disk. If not, the JVM CLASSPATH will be used to search for the entry, and if found it will be loaded as a resource.

      Rules:

      • Path entries may include absolute or relative paths to the current working directory or the CLASSPATH entries
      • All entries are first examined to be a reference to a disk file or directory. If that fails, the entry will be examined as a CLASSPATH resource
      • If an entry is a disk directory, only those files with .cer, .crt, .pem, and .0 file extensions will be loaded
      • If an entry is a manifest file with a .mf file extension, it will only load the specified files as CLASSPATH resources

      If this method is not called, the default is to search the CLASSPATH for the manifest file provided in the standard certificate distribution stores provided by Progress.

      Parameters:
      certStoreList - is a String object holding the search path entries. If a null or zero length string is passed, any previous entry will be removed and the default applied.
      Throws:
      Open4GLException
    • getProxyHost

      public static String getProxyHost()

      The getProxyHost() method will return the HTTP proxy server used for http and http/s tunneling.


      Returns:
      String this string may be null in which case it indicates that a HTTP proxy host has not been specified for use
    • getProxyPort

      public static int getProxyPort()

      The getProxyPort() method will return the IP port of the HTTP proxy server to use during http and http/s tunneling.


      Returns:
      int is the IP port of the proxy server. If no proxy host has been set, a default port of 80 will be returned.
    • getCertificateStore

      public static String getCertificateStore()

      The getCertificateStore() method will return the path used to search for Root Digital Certificates when using the http/s tunneling mode.


      Returns:
      String will contain the search path to use. If a path has not been specified, a null will be returned.
    • getNoHostVerify

      public static boolean getNoHostVerify()
      Returns:
      true if host verification for SSL is disabled
    • setNoHostVerify

      public static void setNoHostVerify(boolean trueFalseState) throws Open4GLException

      Set the HTTPS server domain checking option on or off


      Parameters:
      trueFalseState - is a boolean holding the new state option
      Throws:
      Open4GLException
    • setProxyUserId

      public static void setProxyUserId(String userId) throws Open4GLException

      The setProxyUserId() method will provide HTTP Basic logon authentication to a HTTP proxy server. If the corresponding setProxyPassword() method is not called, a blank ( "\0" ) password will be used.


      Parameters:
      userId - is the user account to authenticate to on the HTTP proxy server
      Throws:
      Open4GLException
    • setProxyPassword

      public static void setProxyPassword(String pwd) throws Open4GLException

      The setProxyPassword() method will set password to use with the authentication user-id for the HTTP proxy server.

      NOTE: This parameter will be defaulted to blank ( "\0" )


      Parameters:
      pwd - is a String object. If supplied as null, a null terminated blank string will be inserted.
      Throws:
      Open4GLException
    • getProxyUserId

      public static String getProxyUserId()

      The getProxyUserId() method will return the user-id to use when connecting through a HTTP proxy server.


      Returns:
      String this string may be null in which case it indicates that a no authentication user id is present for HTTP proxy host use.
    • getProxyPassword

      public static String getProxyPassword()

      The getProxyPort() method will return the password to send to the HTTP proxy server when connecting through one.


      Returns:
      String this value may be blank if it has not been set.