Update the cts_keytab field in order to get the hostname of the server
- This change is required for the following issue. Authentication is required for importing composes to the CTS and finding generic keytabs in different servers. JIRA: RHELCMP-8930 Signed-off-by: Ozan Unsal <ounsal@redhat.com>
This commit is contained in:
parent
c4aa45beab
commit
895b3982d7
@ -24,6 +24,7 @@ import time
|
|||||||
import tempfile
|
import tempfile
|
||||||
import shutil
|
import shutil
|
||||||
import json
|
import json
|
||||||
|
import socket
|
||||||
|
|
||||||
import kobo.log
|
import kobo.log
|
||||||
import kobo.tback
|
import kobo.tback
|
||||||
@ -98,6 +99,8 @@ def get_compose_info(
|
|||||||
authentication = get_authentication(conf)
|
authentication = get_authentication(conf)
|
||||||
if cts_keytab:
|
if cts_keytab:
|
||||||
environ_copy = dict(os.environ)
|
environ_copy = dict(os.environ)
|
||||||
|
if "$HOSTNAME" in cts_keytab:
|
||||||
|
cts_keytab = cts_keytab.replace("$HOSTNAME", socket.gethostname())
|
||||||
os.environ["KRB5_CLIENT_KTNAME"] = cts_keytab
|
os.environ["KRB5_CLIENT_KTNAME"] = cts_keytab
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user