Skip to content

Commit

Permalink
* fix issue with zkCli.sh not working with sasl
Browse files Browse the repository at this point in the history
* updated readme for sasl setup
* logging updates to dependent systesms likes splunk
  • Loading branch information
116davinder committed Feb 20, 2024
1 parent c228ea9 commit b2d37cf
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Splunk-Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[default]
host = $HOSTNAME
[monitor:///zookeeper/zookeeper-logs/*.out]
[monitor:///zookeeper/zookeeper-logs/*]
disabled = false
index = kafka
sourcetype = zookeeper
Expand Down
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ Vagrant.configure("2") do |config|
# SSH config to use your local ssh key for auth instead of username/password
config.ssh.insert_key = false
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"
config.vm.synced_folder '.', '/vagrant', disabled: true
end
12 changes: 6 additions & 6 deletions clusterMigrateToMtls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
name: configure
tasks_from: dynamicConfigs
vars:
- zookeeperConfigFile: zoo.cfg
- zookeeperSslQuorum: true
- zookeeperPortUnification: "true" # force true
zookeeperConfigFile: zoo.cfg
zookeeperSslQuorum: true
zookeeperPortUnification: "true" # force true

- name: MigrateToMtls | restarting zookeeper
ansible.builtin.import_role:
Expand Down Expand Up @@ -100,9 +100,9 @@
name: configure
tasks_from: dynamicConfigs
vars:
- zookeeperConfigFile: zoo.cfg
- zookeeperSslQuorum: true
- zookeeperPortUnification: "false" # force false
zookeeperConfigFile: zoo.cfg
zookeeperSslQuorum: true
zookeeperPortUnification: "false" # force false

- name: MigrateToMtls | restarting zookeeper
ansible.builtin.import_role:
Expand Down
10 changes: 5 additions & 5 deletions clusterMigrateToSasLAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
name: configure
tasks_from: dynamicConfigs
vars:
- zookeeperConfigFile: jaas.conf
zookeeperConfigFile: jaas.conf

- name: MigrateToSasL | regenerate java.env to enable jaas.conf
ansible.builtin.include_role:
name: configure
tasks_from: dynamicConfigs
vars:
- zookeeperConfigFile: java.env
- zookeeperQuorumAuthEnableSasl: true
zookeeperConfigFile: java.env
zookeeperQuorumAuthEnableSasl: true

- name: MigrateToSasL | enableSasl in zoo.cfg
ansible.builtin.lineinfile:
Expand Down Expand Up @@ -83,8 +83,8 @@
name: configure
tasks_from: dynamicConfigs
vars:
- zookeeperConfigFile: zoo.cfg
- zookeeperQuorumAuthEnableSasl: true
zookeeperConfigFile: zoo.cfg
zookeeperQuorumAuthEnableSasl: true

- name: MigrateToSasL | restarting zookeeper
ansible.builtin.import_role:
Expand Down
1 change: 1 addition & 0 deletions docs/migrate-to-mtls.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Read documentation here: https://zookeeper.apache.org/doc/r3.8.0/zookeeperAdmin.

### Step 0
Generate MTLS Certs, if you are testing with vagrant then you can use below-mentioned script else read above-mentioned documenations.
The following script generates certs in the directory from where you are running the script.

[vagrant-generate-tls-certs.sh](../files/vagrant-generate-tls-certs.sh)

Expand Down
8 changes: 8 additions & 0 deletions docs/vagrant-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Running on Windows

### Requires following plugins
```bash
vagrant plugin install vagrant-hosts
vagrant plugin install virtualbox_WSL2
vagrant plugin install vagrant-vbguest # optional
```
Empty file modified files/vagrant-generate-tls-certs.sh
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions roles/configure/templates/jaas.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,14 @@ QuorumLearner {
username="{{ zookeeperQuorumUsername }}"
password="{{ zookeeperQuorumPassword }}";
};

Server {
org.apache.zookeeper.server.auth.DigestLoginModule required
user_{{ zookeeperQuorumUsername }}="{{ zookeeperQuorumPassword }}";
};

Client {
org.apache.zookeeper.server.auth.DigestLoginModule required
username="{{ zookeeperQuorumUsername }}"
password="{{ zookeeperQuorumPassword }}";
};

0 comments on commit b2d37cf

Please sign in to comment.