Skip to content

Allows to use GCE service credentials to sign blobs (#141) #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 12, 2018
Merged

Allows to use GCE service credentials to sign blobs (#141) #150

merged 10 commits into from
Jul 12, 2018

Conversation

dtretyakov
Copy link
Contributor

This change allows to use GCE service credentials to get a signature.

@googlebot
Copy link

Thanks for your pull request. t looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

@dtretyakov
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@nbali
Copy link

nbali commented May 24, 2018

@jadekler any estimation when will this be checked/merged?

@jeanbza
Copy link
Contributor

jeanbza commented May 24, 2018

Hi @nbali; we're unfortunately critically short staffed at the moment, and my cycles are being spent elsewhere. I'll see if I can find an appropriate reviewer for this; I'm happy to release it after review.

@@ -69,7 +70,7 @@ public int hashCode() {
/**
* Returns the service account associated with the signer.
*/
String getAccount();
String getAccount() throws IOException;

This comment was marked as spam.

This comment was marked as spam.

import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.http.HttpStatusCodes;
import com.google.api.client.http.*;

This comment was marked as spam.

This comment was marked as spam.

@@ -57,13 +59,16 @@
*
* <p>Fetches access tokens from the Google Compute Engine metadata server.
*/
public class ComputeEngineCredentials extends GoogleCredentials {
public class ComputeEngineCredentials extends GoogleCredentials implements ServiceAccountSigner {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

dtretyakov and others added 2 commits May 28, 2018 10:48
* Don't change ServiceAccountSigner method signatures
* Use complete list of imports in ComputeEngineCredentials
@garrettjonesgoogle
Copy link
Member

@vchudnov-g could you take a look?

@nbali
Copy link

nbali commented Jun 20, 2018

@vchudnov-g ping?

@oss92
Copy link

oss92 commented Jul 2, 2018

Any updates regarding whether this PR will ever be merged?

@chingor13 chingor13 self-assigned this Jul 2, 2018
Copy link
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality looks great!

We've added several failure cases that don't have tests for. Can we add a few more test cases here and we'll get this merged?

@@ -53,6 +46,8 @@
import java.util.List;
import java.util.Map;

import static org.junit.Assert.*;

This comment was marked as spam.


private static final Logger LOGGER = Logger.getLogger(ComputeEngineCredentials.class.getName());

// Note: the explicit IP address is used to avoid name server resolution issues.
static final String DEFAULT_METADATA_SERVER_URL = "http://169.254.169.254";

static final String IAM_API_ROOT_URL = "https://iam.googleapis.com/v1";

This comment was marked as spam.

Copy link
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@chingor13 chingor13 merged commit 8964e7c into googleapis:master Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants