We need some custom setup for this module. This will start the ccm cluster with basic ssl connectivity, and client authentication if needed.
(client_auth=False)
| 67 | |
| 68 | |
| 69 | def setup_cluster_ssl(client_auth=False): |
| 70 | """ |
| 71 | We need some custom setup for this module. This will start the ccm cluster with basic |
| 72 | ssl connectivity, and client authentication if needed. |
| 73 | """ |
| 74 | |
| 75 | use_single_node(start=False) |
| 76 | ccm_cluster = get_cluster() |
| 77 | ccm_cluster.stop() |
| 78 | |
| 79 | # Configure ccm to use ssl. |
| 80 | config_options = {'client_encryption_options': {'enabled': True, |
| 81 | 'keystore': SERVER_KEYSTORE_PATH, |
| 82 | 'keystore_password': DEFAULT_PASSWORD}} |
| 83 | |
| 84 | if(client_auth): |
| 85 | client_encyrption_options = config_options['client_encryption_options'] |
| 86 | client_encyrption_options['require_client_auth'] = True |
| 87 | client_encyrption_options['truststore'] = SERVER_TRUSTSTORE_PATH |
| 88 | client_encyrption_options['truststore_password'] = DEFAULT_PASSWORD |
| 89 | |
| 90 | ccm_cluster.set_configuration_options(config_options) |
| 91 | start_cluster_wait_for_up(ccm_cluster) |
| 92 | |
| 93 | |
| 94 | def validate_ssl_options(**kwargs): |
no test coverage detected