Skip to content

Commit d3312d7

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

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-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
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/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM ubuntu:25.04
2+
RUN apt-get update && apt-get install -y krb5-kdc krb5-admin-server && rm -rf /var/lib/apt/lists/*

docker/kerberos/init.sh

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

44
# Setup KDC if needed
55
if [ ! -f /var/lib/krb5kdc/principal ]; then
6-
echo "Setting up KDC ..."
76

8-
apk add --no-cache krb5-server krb5
7+
echo "Setting up KDC ..."
98
kdb5_util create -s -P password
109

1110
# # ACL file
12-
echo "*/admin@EXAMPLE.COM *" > /var/lib/krb5kdc/kadm5.acl
11+
echo "*/admin@EXAMPLE.COM *" > /etc/krb5kdc/kadm5.acl
1312

1413
# Create principals
1514
kadmin.local -q "addprinc -pw admin admin@EXAMPLE.COM" # Main administrator
1615
kadmin.local -q "addprinc -randkey broker/broker-sasl-kerberos@EXAMPLE.COM" # Kafka broker
1716
kadmin.local -q "addprinc -randkey admin-keytab@EXAMPLE.COM" # Client with keytab
1817
kadmin.local -q "addprinc -pw admin admin-password@EXAMPLE.COM" # Client with password
1918

20-
# Genera keytab
19+
# Generate keytabs
2120
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"
21+
kadmin.local -q "ktadd -k /data/admin.keytab admin-keytab@EXAMPLE.COM"
22+
23+
# Allow other containers to read the keytab files
24+
chown -R ubuntu:ubuntu /data
25+
chmod -R 755 /data
2326
fi
2427

2528
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)