Class InfluxdbSecurityConfig


  • public class InfluxdbSecurityConfig
    extends java.lang.Object
    Describes security settings needed on the client to connect with the InfluxDB server.
    See Also:
    InfluxdbSystemHistorianConfig
    • Constructor Summary

      Constructors 
      Constructor Description
      InfluxdbSecurityConfig​(java.lang.Boolean https, com.elastisys.scale.commons.net.ssl.BasicCredentials auth, java.lang.Boolean verifyCert, java.lang.Boolean verifyHost)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      com.elastisys.scale.commons.net.ssl.BasicCredentials getAuth()
      Basic (username/password) credentials to use if the InfluxDB server requires user authentication.
      int hashCode()  
      boolean shouldVerifyCert()
      Set to true to enable server certificate verification on SSL connections.
      boolean shouldVerifyHost()
      Enables/disables hostname verification during SSL handshakes.
      java.lang.String toString()  
      boolean useHttps()
      If the InfluxDB server runs with HTTPS enabled, this option is true.
      void validate()
      Validates the configuration.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • InfluxdbSecurityConfig

        public InfluxdbSecurityConfig​(java.lang.Boolean https,
                                      com.elastisys.scale.commons.net.ssl.BasicCredentials auth,
                                      java.lang.Boolean verifyCert,
                                      java.lang.Boolean verifyHost)
        Parameters:
        https - If the InfluxDB server runs with HTTPS enabled, this option is true. A value of false or null means that the server runs plain HTTP.
        auth - Basic (username/password) credentials to use if the InfluxDB server requires user authentication. May be null, indicating no client authentication.
        verifyCert - Set to true to enable server certificate verification on SSL connections. If disabled, the server peer will not be verified, which is similar to using the --insecure flag in curl.

        This option is only relevant when the server runs HTTPS.

        verifyHost - Enables/disables hostname verification during SSL handshakes. If verification is enabled, the SSL handshake will only succeed if the URL's hostname and the server's identification hostname match.

        This option is only relevant when the server runs HTTPS.

    • Method Detail

      • useHttps

        public boolean useHttps()
        If the InfluxDB server runs with HTTPS enabled, this option is true. A value of false means that the server runs plain HTTP.
        Returns:
      • getAuth

        public com.elastisys.scale.commons.net.ssl.BasicCredentials getAuth()
        Basic (username/password) credentials to use if the InfluxDB server requires user authentication. May be null, indicating no client authentication.
        Returns:
      • shouldVerifyCert

        public boolean shouldVerifyCert()
        Set to true to enable server certificate verification on SSL connections. If disabled, the server peer will not be verified, which is similar to using the --insecure flag in curl.

        This option is only relevant when the server runs HTTPS.

        Returns:
      • shouldVerifyHost

        public boolean shouldVerifyHost()
        Enables/disables hostname verification during SSL handshakes. If verification is enabled, the SSL handshaeake will only succeed if the URL's hostname and the server's identification hostname match.

        This option is only relevant when the server runs HTTPS.

        Returns:
      • validate

        public void validate()
                      throws java.lang.IllegalArgumentException
        Validates the configuration. Throws an IllegalArgumentException if validation fails.
        Throws:
        java.lang.IllegalArgumentException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object