Skip to content

Commit e7452c8

Browse files
docs: add warning about loading unvalidated credentials (googleapis#24696)
Co-authored-by: Yoshi Automation Bot <[email protected]>
1 parent 69956ce commit e7452c8

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

google-apis-core/lib/google/api_client/auth/storage.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ class Storage
3838
#
3939
# @param [Object] store
4040
# Storage object
41+
#
42+
# @note Warning: This class is part of a deprecated credentials flow.
43+
# Providing an unvalidated credential configuration to Google APIs can
44+
# compromise the security of your systems and data. Use
45+
# google-auth-library-ruby instead.
4146
def initialize(store)
4247
@store= store
4348
@authorization = nil

google-apis-core/lib/google/api_client/auth/storages/file_store.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ def initialize(path)
3737

3838
##
3939
# Attempt to read in credentials from the specified file.
40+
#
41+
# @note Warning: This method is part of a deprecated credentials flow.
42+
# Providing an unvalidated credential configuration to Google APIs can
43+
# compromise the security of your systems and data. Use
44+
# google-auth-library-ruby instead.
4045
def load_credentials
4146
open(path, 'r') { |f| JSON.parse(f.read) }
4247
rescue

google-apis-core/lib/google/api_client/auth/storages/redis_store.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ def initialize(redis, key = nil)
3737

3838
##
3939
# Attempt to read in credentials from redis.
40+
#
41+
# @note Warning: This method is part of a deprecated credentials flow.
42+
# Providing an unvalidated credential configuration to Google APIs can
43+
# compromise the security of your systems and data. Use
44+
# google-auth-library-ruby instead.
45+
#
4046
# @return [Hash]
4147
def load_credentials
4248
credentials = redis.get redis_credentials_key

0 commit comments

Comments
 (0)