Skip to content

Commit 9a21fa9

Browse files
committed
adding hpcs-server spiffeID configuration to server
1 parent af4f6c2 commit 9a21fa9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

server/app.py

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
timeout_in_seconds=None,
4545
)
4646

47+
if configuration["spire-agent"].get("hpcs-server-spiffeid"):
48+
spire_interactions.hpcs_server_spiffeid = configuration["spire-agent"].get(
49+
"hpcs-server-spiffeid"
50+
)
51+
4752
if configuration["spire-server"].get("pre-command"):
4853
spire_interactions.pre_command = configuration["spire-server"]["pre-command"]
4954
if configuration["spire-server"]["pre-command"] == '""':

server/lib/spire_interactions.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
jwt_workload_api = None
12+
hpcs_server_spiffeid = "spiffe://hpcs/hpcs-server/workload"
1213

1314

1415
def token_generate(spiffeID: SpiffeId) -> subprocess.CompletedProcess:
@@ -73,7 +74,7 @@ def get_server_identity_JWT() -> JwtSvid:
7374
# Perform an api fetch using pyspiffe
7475
SVID = jwt_workload_api.fetch_svid(
7576
audiences=["TESTING"],
76-
subject=SpiffeId("spiffe://lumi-sd-dev/lumi-sd-server"),
77+
subject=SpiffeId(f"{hpcs_server_spiffeid}"),
7778
)
7879
return SVID
7980

0 commit comments

Comments
 (0)