|
| 1 | +--- |
| 2 | +## |
| 3 | +## The following is an example inventory file of the configuration required for setting up Confluent Platform with RBAC over mTLS. |
| 4 | +## Sets RBAC on a cluster which talks to already running Centralized MDS server |
| 5 | +## Principals extracted from certs are given role bindings. |
| 6 | + |
| 7 | +all: |
| 8 | + vars: |
| 9 | + ansible_connection: ssh |
| 10 | + ansible_user: ec2-user |
| 11 | + ansible_become: true |
| 12 | + ansible_ssh_private_key_file: /home/ec2-user/guest.pem |
| 13 | + ansible_python_interpreter: /usr/bin/python3 |
| 14 | + |
| 15 | + ## TLS Configuration |
| 16 | + ssl_enabled: true |
| 17 | + # 3 ways to handle ssl |
| 18 | + # Self Signed Certs (Default) Not recommended for production clusters |
| 19 | + # Custom Certs |
| 20 | + # Set ssl_custom_certs, ssl_ca_cert_filepath, ssl_signed_cert_filepath, ssl_key_filepath, ssl_key_password & ssl_custom_certs_remote_src(optional) |
| 21 | + # Provided Keystore Truststore |
| 22 | + # Set ssl_provided_keystore_and_truststore, ssl_keystore_and_truststore_custom_password, ssl_keystore_filepath, ssl_keystore_key_password, ssl_keystore_store_password, ssl_keystore_alias, ssl_truststore_filepath, ssl_truststore_password, ssl_truststore_ca_cert_alias and ssl_provided_keystore_and_truststore_remote_src (optional) |
| 23 | + |
| 24 | + rbac_enabled: true |
| 25 | + auth_mode: mtls # MDS server will use mTLS certs for authentication, no user store like ldap/oauth will be setup on server |
| 26 | + |
| 27 | + # Centralized MDS server configuration |
| 28 | + external_mds_enabled: true # This is for cluster to talk to remote MDS server |
| 29 | + mds_broker_bootstrap_servers: mds-kafka-broker1:9093,mds-kafka-broker2:9093,mds-kafka-broker3:9093 |
| 30 | + mds_bootstrap_server_urls: https://mds-kafka-broker1:8090,https://mds-kafka-broker2:8090 |
| 31 | + mds_broker_listener: |
| 32 | + ssl_enabled: true |
| 33 | + ssl_mutual_auth_enabled: true |
| 34 | + sasl_protocol: none |
| 35 | + |
| 36 | + # This should be a superuser cert. In cases of LDAP/OAuth based setup we only needed user names or client id of super user inside this cluster to give role bindings to all components like SR/RP/Connect. Here we need a certificate whose principal is super user in MDS. |
| 37 | + mds_super_user_external_cert_path: <cert path> |
| 38 | + mds_super_user_external_key_path: <key path> |
| 39 | + |
| 40 | + create_mds_certs: false |
| 41 | + token_services_public_pem_file: /home/ec2-user/keys/public.pem |
| 42 | + token_services_private_pem_file: /home/ec2-user/keys/tokenKeypair.pem |
| 43 | + |
| 44 | + # ssl_mutual_auth_enabled: true Deprecated in 7.8.x |
| 45 | + ssl_client_authentication: required # <required/requested/none> |
| 46 | + # Sets mTLS on kafka broker listeners |
| 47 | + |
| 48 | + mds_ssl_client_authentication: requested # <required/requested/none> |
| 49 | + # This decides clients behaviour when talking to Centralized MDS server. |
| 50 | + # Must be defined in all section as all components need to know its value for assigning role bindings |
| 51 | + # Default value is none |
| 52 | + |
| 53 | + # When set to required clients must send certs to server |
| 54 | + # When set to requested sending certs is optional given there is another mechanism like ldap/oauth which is sending principal |
| 55 | + # requested mode is used for upgrade scenarios where all clients might not be sending certs to server |
| 56 | + # Once all clients start sending certs to server this requested should be changed to required |
| 57 | + |
| 58 | + principal_mapping_rules: |
| 59 | + - "RULE:.*CN=([a-zA-Z0-9.-_]*).*$/$1/" |
| 60 | + - "DEFAULT" |
| 61 | + |
| 62 | +kafka_controller: |
| 63 | + hosts: |
| 64 | + ec2-34-219-110-48.us-west-2.compute.amazonaws.com: |
| 65 | + ec2-18-237-72-224.us-west-2.compute.amazonaws.com: |
| 66 | + ec2-35-161-39-212.us-west-2.compute.amazonaws.com: |
| 67 | + |
| 68 | +kafka_broker: |
| 69 | + hosts: |
| 70 | + ec2-34-211-33-32.us-west-2.compute.amazonaws.com: |
| 71 | + ec2-35-89-77-112.us-west-2.compute.amazonaws.com: |
| 72 | + ec2-35-163-80-4.us-west-2.compute.amazonaws.com: |
| 73 | + |
| 74 | +schema_registry: |
| 75 | + hosts: |
| 76 | + ec2-34-212-49-238.us-west-2.compute.amazonaws.com: |
| 77 | + |
| 78 | +kafka_connect: |
| 79 | + hosts: |
| 80 | + ec2-35-93-21-143.us-west-2.compute.amazonaws.com: |
| 81 | + |
| 82 | +kafka_rest: |
| 83 | + hosts: |
| 84 | + ec2-34-222-41-249.us-west-2.compute.amazonaws.com: |
| 85 | + |
| 86 | +control_center: |
| 87 | + hosts: |
| 88 | + ec2-35-87-151-33.us-west-2.compute.amazonaws.com: |
0 commit comments