Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a krb5 config file to run the tests locally #14251

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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