Skip to content

Commit

Permalink
Add a fix to the error raised when using empty spiffeID in fetch_jwt_…
Browse files Browse the repository at this point in the history
…svid

Signed-off-by: telliere <[email protected]>
  • Loading branch information
telliere committed Mar 5, 2024
1 parent 364118b commit efa99d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pyspiffe/workloadapi/default_workload_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,13 @@ def fetch_jwt_svid(
if not audiences:
raise ArgumentError('Parameter audiences cannot be empty')

if subject != None:
subject = str(subject)

response = self._spiffe_workload_api_stub.FetchJWTSVID(
request=workload_pb2.JWTSVIDRequest(
audience=audiences,
spiffe_id=str(subject),
spiffe_id=subject,
)
)

Expand Down

0 comments on commit efa99d4

Please sign in to comment.