Skip to content

Commit f475d31

Browse files
committed
fixup
Signed-off-by: Paolo Insogna <paolo@cowtech.it>
1 parent 96796a6 commit f475d31

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Install dependencies
4343
run: pnpm install --frozen-lockfile
4444
- name: Start Kafka (${{ matrix.confluent-kafka-version }}) Cluster
45-
run: docker compose up -d --wait
45+
run: docker compose up --build --force-recreate -d --wait || (ls -l tmp && ls -l tmp/kerberos && docker compose logs && exit 1)
4646
env:
4747
KAFKA_VERSION: ${{ matrix.confluent-kafka-version }}
4848
- name: Run Tests

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
services:
22
kdc:
3-
image: alpine:latest
3+
image: plt-kafka-kdc:latest
4+
pull_policy: never
5+
build:
6+
context: ./docker/kerberos
47
container_name: kdc
58
ports:
69
- '8000:88/tcp'

docker/kerberos/init.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,25 @@ set -e
33

44
# Setup KDC if needed
55
if [ ! -f /var/lib/krb5kdc/principal ]; then
6-
echo "Setting up KDC ..."
6+
chown -R ubuntu:ubuntu /data
7+
chmod -R 755 /data
78

8-
apk add --no-cache krb5-server krb5
9+
echo "Setting up KDC ..."
910
kdb5_util create -s -P password
1011

1112
# # ACL file
12-
echo "*/admin@EXAMPLE.COM *" > /var/lib/krb5kdc/kadm5.acl
13+
echo "*/admin@EXAMPLE.COM *" > /etc/krb5kdc/kadm5.acl
1314

1415
# Create principals
1516
kadmin.local -q "addprinc -pw admin admin@EXAMPLE.COM" # Main administrator
1617
kadmin.local -q "addprinc -randkey broker/broker-sasl-kerberos@EXAMPLE.COM" # Kafka broker
1718
kadmin.local -q "addprinc -randkey admin-keytab@EXAMPLE.COM" # Client with keytab
1819
kadmin.local -q "addprinc -pw admin admin-password@EXAMPLE.COM" # Client with password
1920

20-
# Genera keytab
21+
# Generate keytabs
2122
kadmin.local -q "ktadd -k /data/broker.keytab broker/broker-sasl-kerberos@EXAMPLE.COM"
22-
kadmin.local -q "ktadd -k /data/admin.keytab admin-keytab@EXAMPLE.COM"
23+
kadmin.local -q "ktadd -k /data/admin.keytab admin-keytab@EXAMPLE.COM"
24+
chown -R ubuntu:ubuntu /data
2325
fi
2426

2527
krb5kdc

test/fixtures/kerberos-authenticator.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ function performChallenge (
9494
return
9595
}
9696

97-
// Altrimenti continua normalmente
9897
performChallenge(connection, authenticate, client, response.authBytes.toString('base64'), callback)
9998
})
10099
})

0 commit comments

Comments
 (0)