All Downloads are FREE. Search and download functionalities are using the official Maven repository.

brooklyn.entity.proxy.ProxySslConfig Maven / Gradle / Ivy

package brooklyn.entity.proxy;

import java.io.Serializable;

import com.google.common.base.Objects;

public class ProxySslConfig implements Serializable {

    /** 
     * url's for the SSL certificates required at the server
     * 

* nginx settings: * ssl on; * ssl_certificate www.example.com.crt; * ssl_certificate_key www.example.com.key; *

* okay (in nginx) for key to be null if certificate contains both as per setup at * http://nginx.org/en/docs/http/configuring_https_servers.html *

* proxy object can be set on nginx instance to apply site-wide, * and to put multiple servers in the certificate file *

* the brooklyn entity will install the certificate/key(s) on the server. * (however it will not currently merge multiple certificates. * if conflicting certificates are attempted to be installed nginx will complain.) */ String certificateSourceUrl; String keySourceUrl; /** * Sets the ssl_certificate path to be used within the generated LoadBalancer configuration. If set to null, * Brooklyn will use an auto generated path. * * If certificateSourceUrl, then Brooklyn will copy the certificate the certificateDestination. * * Setting this field is useful if there is a certificate on the nginx machine you want to make use of. */ String certificateDestination; /** * Sets the ssl_certificate_key path to be used within the generated LoadBalancer configuration. If set to null, * Brooklyn will use an auto generated path. * * If keySourceUrl, then Brooklyn will copy the certificate the keyDestination. * * Setting this field is useful if there is a certificate_key on the nginx machine you want to make use of. */ String keyDestination; /** whether the downstream server (if mapping) also expects https; default false */ boolean targetIsSsl = false; /** whether to reuse SSL validation in the server (performance). * corresponds to nginx setting: proxy_ssl_session_reuse on|off */ boolean reuseSessions = false; public String getCertificateSourceUrl() { return certificateSourceUrl; } public void setCertificateSourceUrl(String certificateSourceUrl) { this.certificateSourceUrl = certificateSourceUrl; } public String getKeySourceUrl() { return keySourceUrl; } public void setKeySourceUrl(String keySourceUrl) { this.keySourceUrl = keySourceUrl; } public String getCertificateDestination() { return certificateDestination; } public void setCertificateDestination(String certificateDestination) { this.certificateDestination = certificateDestination; } public String getKeyDestination() { return keyDestination; } public void setKeyDestination(String keyDestination) { this.keyDestination = keyDestination; } public boolean getTargetIsSsl() { return targetIsSsl; } public void setTargetIsSsl(boolean targetIsSsl) { this.targetIsSsl = targetIsSsl; } public boolean getReuseSessions() { return reuseSessions; } public void setReuseSessions(boolean reuseSessions) { this.reuseSessions = reuseSessions; } // autogenerated hash code and equals; nothing special required @Override public int hashCode() { return Objects.hashCode(certificateSourceUrl, keySourceUrl, certificateDestination, keyDestination, reuseSessions, targetIsSsl); } @Override public boolean equals(Object obj) { if (obj == null) return false; if (getClass() != obj.getClass()) return false; ProxySslConfig other = (ProxySslConfig) obj; return Objects.equal(certificateSourceUrl, other.certificateSourceUrl) && Objects.equal(certificateDestination, other.certificateDestination) && Objects.equal(keyDestination, other.keyDestination) && Objects.equal(keySourceUrl, other.keySourceUrl) && Objects.equal(reuseSessions, other.reuseSessions) && Objects.equal(targetIsSsl, other.targetIsSsl); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy