@@ -44,13 +44,29 @@ func (w withCredFile) Apply(o *internal.DialSettings) {
44
44
// WithCredentialsFile returns a ClientOption that authenticates
45
45
// API calls with the given service account or refresh token JSON
46
46
// credentials file.
47
+ //
48
+ // Important: If you accept a credential configuration (credential
49
+ // JSON/File/Stream) from an external source for authentication to Google
50
+ // Cloud Platform, you must validate it before providing it to any Google
51
+ // API or library. Providing an unvalidated credential configuration to
52
+ // Google APIs can compromise the security of your systems and data. For
53
+ // more information, refer to [Validate credential configurations from
54
+ // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
47
55
func WithCredentialsFile (filename string ) ClientOption {
48
56
return withCredFile (filename )
49
57
}
50
58
51
59
// WithServiceAccountFile returns a ClientOption that uses a Google service
52
60
// account credentials file to authenticate.
53
61
//
62
+ // Important: If you accept a credential configuration (credential
63
+ // JSON/File/Stream) from an external source for authentication to Google
64
+ // Cloud Platform, you must validate it before providing it to any Google
65
+ // API or library. Providing an unvalidated credential configuration to
66
+ // Google APIs can compromise the security of your systems and data. For
67
+ // more information, refer to [Validate credential configurations from
68
+ // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
69
+ //
54
70
// Deprecated: Use WithCredentialsFile instead.
55
71
func WithServiceAccountFile (filename string ) ClientOption {
56
72
return WithCredentialsFile (filename )
@@ -59,6 +75,14 @@ func WithServiceAccountFile(filename string) ClientOption {
59
75
// WithCredentialsJSON returns a ClientOption that authenticates
60
76
// API calls with the given service account or refresh token JSON
61
77
// credentials.
78
+ //
79
+ // Important: If you accept a credential configuration (credential
80
+ // JSON/File/Stream) from an external source for authentication to Google
81
+ // Cloud Platform, you must validate it before providing it to any Google
82
+ // API or library. Providing an unvalidated credential configuration to
83
+ // Google APIs can compromise the security of your systems and data. For
84
+ // more information, refer to [Validate credential configurations from
85
+ // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
62
86
func WithCredentialsJSON (p []byte ) ClientOption {
63
87
return withCredentialsJSON (p )
64
88
}
0 commit comments