-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add Signer for impersonatied credentials #279
Add Signer for impersonatied credentials #279
Conversation
Codecov Report
@@ Coverage Diff @@
## master #279 +/- ##
===========================================
+ Coverage 78.21% 78.72% +0.5%
- Complexity 330 337 +7
===========================================
Files 21 21
Lines 1446 1490 +44
Branches 157 162 +5
===========================================
+ Hits 1131 1173 +42
- Misses 237 238 +1
- Partials 78 79 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this!
We have something similar in the ComputeEngineCredentials
class to implement the signing via the IAM credentials endpoints. Do you think it's possible to extract the shared implementation into a shared class?
Sure, i can do that (infact, i pretty much copied the code for however, if GCE someday has a native capability to sign (eg, metadata server), then this shared class will only be used by |
@chingor13 Does leaving it as independent implementations make sense? I also would like to keep it separate since my take is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can leave them as separate implementations for now. I may refactor it and the tests across the board to ensure the behavior is consistent across the board for the credentials signing across the implementations.
As for this PR, only a couple small nits, then I can merge it in.
oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java
Outdated
Show resolved
Hide resolved
oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java
Outdated
Show resolved
Hide resolved
oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java
Outdated
Show resolved
Hide resolved
…s.java Co-Authored-By: Jeff Ching <chingor@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixes googleapis/google-cloud-java#5043
Adds
Signer
capability toImpersonatedCredentials
. This will allow impersonated credentials to make signedURLs and basically, just sign bytes as thetarget_credential
sample usage