File tree Expand file tree Collapse file tree 5 files changed +15
-13
lines changed
Expand file tree Collapse file tree 5 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ def resolve_credentials(f):
313313 default = None ,
314314 is_flag = True ,
315315 envvar = "CLOUDSMITH_OIDC_DISCOVERY_DISABLED" ,
316- help = "Disable OIDC auto-discovery in CI/CD environments ." ,
316+ help = "Disable OIDC auto-discovery." ,
317317 )
318318 @click .pass_context
319319 @functools .wraps (f )
Original file line number Diff line number Diff line change 1- """CI/CD environment detectors for OIDC token retrieval."""
1+ """Environment detectors for OIDC token retrieval."""
22
33from __future__ import annotations
44
@@ -27,7 +27,7 @@ def detect_environment(
2727 try :
2828 if detector .detect ():
2929 if context .debug :
30- logger .debug ("Detected CI/CD environment: %s" , detector .name )
30+ logger .debug ("Detected OIDC environment: %s" , detector .name )
3131 return detector
3232 except Exception : # pylint: disable=broad-exception-caught
3333 logger .debug (
@@ -38,5 +38,5 @@ def detect_environment(
3838 continue
3939
4040 if context .debug :
41- logger .debug ("No CI/CD environment detected for OIDC " )
41+ logger .debug ("No supported OIDC environment detected" )
4242 return None
Original file line number Diff line number Diff line change 1- """Base class and utilities for CI/CD environment OIDC detectors."""
1+ """Base class and utilities for OIDC environment detectors."""
22
33from __future__ import annotations
44
99
1010
1111class EnvironmentDetector :
12- """Base class for CI/CD environment detectors."""
12+ """Base class for OIDC environment detectors."""
1313
1414 name : str = "base"
1515
1616 def __init__ (self , context : CredentialContext ):
1717 self .context = context
1818
1919 def detect (self ) -> bool :
20- """Return True if running in this CI/CD environment."""
20+ """Return True if running in a supported OIDC environment."""
2121 raise NotImplementedError
2222
2323 def get_token (self ) -> str :
Original file line number Diff line number Diff line change 11"""Cloudsmith OIDC token exchange.
22
3- Exchanges a vendor CI/CD OIDC JWT for a short-lived Cloudsmith API token
3+ Exchanges a vendor OIDC JWT for a short-lived Cloudsmith API token
44via the POST /openid/{org}/ endpoint.
55
66References:
Original file line number Diff line number Diff line change 1- """OIDC credential provider for CI/CD environments ."""
1+ """OIDC credential provider."""
22
33from __future__ import annotations
44
1010
1111
1212class OidcProvider (CredentialProvider ):
13- """Resolves credentials via OIDC auto-discovery in CI/CD environments .
13+ """Resolves credentials via OIDC auto-discovery.
1414
1515 Requires CLOUDSMITH_ORG and CLOUDSMITH_SERVICE_SLUG to be set (via env
16- vars or click options). Auto-detects the CI/CD environment, fetches the
17- vendor OIDC JWT, and exchanges it for a short-lived Cloudsmith API token.
16+ vars or click options). Auto-detects the environment, fetches the vendor
17+ OIDC JWT, and exchanges it for a short-lived Cloudsmith API token.
1818 """
1919
2020 name = "oidc"
@@ -61,7 +61,9 @@ def resolve( # pylint: disable=too-many-return-statements
6161 detector = detect_environment (context = context )
6262 if detector is None :
6363 if context .debug :
64- logger .debug ("OidcProvider: No CI/CD environment detected, skipping" )
64+ logger .debug (
65+ "OidcProvider: No supported OIDC environment detected, skipping"
66+ )
6567 return None
6668
6769 try :
You can’t perform that action at this time.
0 commit comments