This document is in response to GEODE-420.
The current SSL configuration options in Geode have problems and are difficult to use.
For instance, if you implement SSL communications for client/server but do not do so in the server cluster the client will not be able to communicate with the locator using SSL because there is no option to have both SSL and non-SSL communications in the locator.
To simplify this we propose that
there is a single set of configuration options for SSL keystore, truststore, protocols and cipher-suites
a new "locator" component be added to the mix of cluster, server, http and gateway components for SSL configuration
SSL can be enabled for all components or for selected components
Each component can be assigned an alias for certificate lookup in the key store. If an alias is not assigned to a component it will use the default certificate in the key store.
This simplifies things by only requiring one keystore and one truststore for a server. Today this is only possible if all of the components in the server use the same certificate, which is likely to be the case but not a given.
The locator component can now be configured independently of the server cluster. This allows a server cluster to run with non-SSL communications, except for initial contact with the locator, while client/server and gateway can use SSL communications.
Note for people used to GemFire: GemFire cluster members periodically contacted the locator to renew discovery information. This is not the case with Geode where, since the implementation of a new group membership service (see GEODE-77) the locator is only used at startup.
Basic Settings:
Except for the first two settings these are all of the same character as the current cluster-ssl settings. The only difference here is that they apply to all SSL connections.
SSL is either enabled for all components or for specific components. Specifying that SSL is enabled for a component applies to the server-socket side and the client-socket side. That is, if you have a locator with SSL enabled then any process that is going to communicate with that locator must have SSL enabled for the locator component. There are some examples further down in this document showing how to do this.
ssl-enabled-components=[all, cluster, server, gateway, locator, http, jmx]
all = any component being used will have SSL enabled
cluster = p2p communications
server = communication between client and server
gateway = communication between WAN gateways
locator = communication between locators
http = hypertext transport protocol communication
jmx = java management extension communications
Using component names like this is extensible so we will have minimal configuration changes if we add a new component.
ssl-require-authentication-components=[all, cluster, server, gateway, locator, http, jmx] (default "all")
ssl-certificate-alias=[empty,string] (default - use first cert in keystore)
ssl-certificate-password=[empty,string]
ssl-protocols=space separated list (default "any")
ssl-ciphers=space separated list (default "any")
ssl-keystore=path
ssl-keystore-password=string
ssl-truststore=path
ssl-truststore-password=string
Alias overrides:
These allow you to configure different certificates for each component. They override ssl-certificate-alias and ssl-certificate-password for the component.
ssl-<component name>-certificate-alias=string
ssl-<component name>-certificate-password=string
Example: secure communications throughout
Each process needs to set these properties:
ssl-enabled-components=all
ssl-keystore=secure/keystore.dat
ssl-keystore-password=changeit
ssl-truststore=secure/truststore.dat
ssl-truststore-password=changeit
If the key store has multiple certificates you may want to specify the alias of the one you wish to use for each process. For instance,
ssl-certificate-alias=Hiroki
ssl-certificate-password=changeit
Example: non-secure cluster communications, secure client/server
server:
ssl-enabled-components=server,locator NOTE: cluster SSL not enabled
ssl-server-certificate-alias=server
ssl-keystore=secure/keystore.dat
ssl-keystore-password=changeit
ssl-truststore=secure/truststore.dat
ssl-truststore-password=changeit
locator:
ssl-enabled-components=locator NOTE: cluster SSL not enabled
ssl-locator-certificate-alias=locator
ssl-keystore=secure/keystore.dat
ssl-keystore-password=changeit
ssl-truststore=secure/truststore.dat
ssl-truststore-password=changeit
client:
ssl-enabled-components=server,locator
ssl-keystore=secret/keystore.dat
ssl-keystore-password=changeit
ssl-truststore=secret/truststore.dat
ssl-truststore-password=changeit
The client's trust store must trust both locator and server certificates.
Since the client did not specify a certificate alias SSL will use the default certificate in its key store.
Issues:
Should each component have an option to enable/disable ssl-require-authentication? Most HTTP services, for instance, don't require client authentication.
Resolution: new settings added.