Skip to content

Commit

Permalink
Add a krb5 config file to run the tests locally (#14251)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentClarret authored Mar 28, 2023
1 parent 9f13a59 commit 9093016
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kafka_consumer/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from datadog_checks.dev import TempDir, WaitFor, docker_run
from datadog_checks.dev._env import e2e_testing
from datadog_checks.dev.ci import running_on_ci
from datadog_checks.kafka_consumer import KafkaCheck

from .common import (
Expand Down Expand Up @@ -122,7 +123,9 @@ def dd_environment():
DOCKER_IMAGE_PATH,
conditions=conditions,
env_vars={
"KRB5_CONFIG": f"{HERE}/docker/kerberos/kdc/krb5_agent.conf",
"KRB5_CONFIG": f"{HERE}/docker/kerberos/kdc/krb5_agent.conf"
if running_on_ci()
else f"{HERE}/docker/kerberos/kdc/krb5_local.conf",
"SECRET_DIR": secret_dir,
},
build=True,
Expand Down
20 changes: 20 additions & 0 deletions kafka_consumer/tests/docker/kerberos/kdc/krb5_local.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This is a separate file since kdc = localhost:88 is necessary to access the kdc from the Agent container
[libdefaults]
default_realm = TEST.CONFLUENT.IO
forwardable = true
rdns = false
dns_lookup_kdc = yes
dns_lookup_realm = yes

[realms]
TEST.CONFLUENT.IO = {
kdc = tcp/localhost:88
admin_server = tcp/localhost:749
default_domain = test.confluent.io
kpasswd_port = 464
}

[logging]
kdc = FILE:/var/log/kerberos/krb5kdc.log
admin_server = FILE:/var/log/kerberos/kadmin.log
default = FILE:/var/log/kerberos/krb5lib.log

0 comments on commit 9093016

Please sign in to comment.