googleapis / googleapis/google-cloud-java
[google-auth-library-java] add validation to ensure ImpersonatedCredential can only be SA or User Credentials
Open
priority: p3
type: bug
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 1.2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 154
Description
This line in javadoc specifies ImpersonatedCredential can only be SA or User Credentials in this `create()` method, but it is not enforced.
https://github.com/googleapis/google-auth-library-java/blob/a8d466f3951686ddf0f6a7ae429cab505b337c54/oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java#L120
For context: https://github.com/googleapis/google-auth-library-java/pull/1566#discussion_r1882521720
Contributor guide
Assessment
This issue has not been assessed yet.