Endpoint Security
Information about CGE's SSL encryption, certificates and key store.
- SSL encryption
- User authentication
SSL Encryption
When enabled, SSL provides encryption of communications between the client and the SPARQL server. Note that Communications between the SPARQL server and the database server are always encrypted regardless of whether this is enabled. By enabling this feature you gain complete end to end encryption from the client all the way to the database server.SSL Certificates and the Key Store
In order to enable this feature you will need to provide a suitable SSL certificate. Obtaining an SSL certificate is covered elsewhere in the documentation and you should refer to that for more detail.
$ keytool -import-v -trustcacerts -alias cge -file server.cer -keystore ~/.cge/keystore
In this example we import a certificate from the server.cer file to the key store located at ~/.cge/keystore.
Note that each certificate must have a unique alias within the key store. Key stores are protected by a password for which the user will be prompted. If the key store does not yet exist, the user will be prompted for a new password and a new file will be created.
In order for the server to pick up the correct certificate, the key store file should ideally contain only the certificate to be used for SSL. If it contains multiple certificates, the SSL may fail to function.
$ cge-cli generate keystore --alias cge --importserver.cer --keystore ~/.cge/keystore
Locating the key store
For the server to access the key store, it must be provided with the location of the key store and the password to access it. The location can be provided explicitly using the --keystore option. if this is not specified, then it tries to locate a key store as follows:- If the located configuration file contains a
cge.cli.server.ssl.keystoreproperty, use the file specified by that. - Otherwise search for a file named keystore in any of the specified configuration directories. As with other configurations files only the first one found will be used. If the key store and/or the certificate itself require passwords then these must be provided in the configuration file using the following properties:
To avoid storing the password in plain text it may be stored in obfuscated form as supported by Jetty.Table 1. Key store Properties Property Description cge.cli.server.ssl.passwordPassword for the key store cge.cli.server.ssl.key-passwordPassword for the certificate
Enabling SSL
Assuming the appropriate certificate is in place in the key store, and the properties file is configured with any necessary passwords then, enable SSL using the --ssl option, as shown in the following example:$ cge-cli fe --sslThis will start the server configured for SSL Communications i.e. It will only respond to
https:// URLs. Communication with the server will not be possible without an appropriate certificate.Enabling Lax SSL
The default configurations for SSL only permits strong cipher suites and cryptographic protocols to be used. Some older tools may encounter difficulties when trying to communicate with the server if they do not support appropriate cipher suites and/or cryptographic protocols. In this case you may want to enable Lax SSL mode. For example:$ cge-cli fe --ssl --ssl-lax