Skip to content

Commit 94b6fbd

Browse files
chore(gcp): update docstring of ADC credentials (#5879)
Co-authored-by: Sergio Garcia <[email protected]>
1 parent 3ce785a commit 94b6fbd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

prowler/providers/gcp/gcp_provider.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,17 @@ def test_connection(
417417
GCPTestConnectionError if an error occurs during the test connection
418418
419419
Usage:
420-
- Using static credentials:
420+
- Using ADC credentials from `/Users/<user>/.config/gcloud/application_default_credentials.json`:
421421
>>> GcpProvider.test_connection(
422422
... client_id="client_id",
423423
... client_secret="client_secret",
424424
... refresh_token="refresh_token"
425425
... )
426-
- Using a credentials file:
426+
- Using a Service Account credentials file path:
427427
>>> GcpProvider.test_connection(
428428
... credentials_file="credentials_file"
429429
... )
430-
- Using a service account to impersonate, authentication is required to impersonate a service account:
430+
- Using ADC credentials with a Service Account to impersonate:
431431
>>> GcpProvider.test_connection(
432432
... client_id="client_id",
433433
... client_secret="client_secret",
@@ -436,7 +436,7 @@ def test_connection(
436436
... )
437437
"""
438438
try:
439-
# Set the GCP credentials using the provided client_id, client_secret and refresh_token
439+
# Set the GCP credentials using the provided client_id, client_secret and refresh_token from ADC
440440
gcp_credentials = None
441441
if any([client_id, client_secret, refresh_token]):
442442
gcp_credentials = GcpProvider.validate_static_arguments(
@@ -738,7 +738,7 @@ def validate_static_arguments(
738738
client_id: str = None, client_secret: str = None, refresh_token: str = None
739739
) -> dict:
740740
"""
741-
Validate the static arguments client_id, client_secret and refresh_token
741+
Validate the static arguments client_id, client_secret and refresh_token of ADC credentials
742742
743743
Args:
744744
client_id: str
@@ -749,7 +749,7 @@ def validate_static_arguments(
749749
dict
750750
751751
Raises:
752-
GCPStaticCredentialsError if any of the static arguments is missing
752+
GCPStaticCredentialsError if any of the static arguments is missing from the ADC credentials
753753
754754
Usage:
755755
>>> GcpProvider.validate_static_arguments(client_id, client_secret, refresh_token)

0 commit comments

Comments
 (0)