Skip to content

Commit 317474d

Browse files
authored
fix: Include security warning in ExternalAccount and ImpersonatedServiceAccount credentials (#551)
1 parent 4c31b17 commit 317474d

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

lib/googleauth/external_account.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ class Credentials
4040

4141
# Create a ExternalAccount::Credentials
4242
#
43+
# @note Warning:
44+
# This method does not validate the credential configuration. A security
45+
# risk occurs when a credential configuration configured with malicious urls
46+
# is used.
47+
# When the credential configuration is accepted from an
48+
# untrusted source, you should validate it before using with this method.
49+
# See https://cloud.google.com/docs/authentication/external/externally-sourced-credentials
50+
# for more details.
51+
#
4352
# @param options [Hash] Options for creating credentials
4453
# @option options [IO] :json_key_io (required) An IO object containing the JSON key
4554
# @option options [String,Array,nil] :scope The scope(s) to access

lib/googleauth/impersonated_service_account.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ class ImpersonatedServiceAccountCredentials
7272
# and request short-lived credentials for a service account
7373
# that has the authorization that your use case requires.
7474
#
75+
# @note Warning:
76+
# This method does not validate the credential configuration. A security
77+
# risk occurs when a credential configuration configured with malicious urls
78+
# is used.
79+
# When the credential configuration is accepted from an
80+
# untrusted source, you should validate it before using with this method.
81+
# See https://cloud.google.com/docs/authentication/external/externally-sourced-credentials
82+
# for more details.
83+
#
7584
# @param options [Hash] A hash of options to configure the credentials.
7685
# @option options [Object] :base_credentials (required) The authenticated principal.
7786
# It will be used as following:

0 commit comments

Comments
 (0)