Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Add extra scopes #634

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add extra scopes #634

wants to merge 1 commit into from

Conversation

jen-obyrne
Copy link

@jen-obyrne jen-obyrne commented Jul 22, 2019

After trying to deploy this project with remote search enabled I encountered permissions errors when trying to run the gddo server.

I have tried granting the service account different roles (App Engine Admin, Cloud Datastore Owner, Storage Admin, Owner role) but whenever you start the gddo server it returns a 401 error - error creating server:open database: unable to contact server: bad response 401; body: "You must be logged in as an administrator to access this.\n"

I think this is happening because the Default client is missing these two scopes

@googlebot
Copy link

Thanks for your pull request. It 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

ℹ️ Googlers: Go here for more info.

Adding missing scopes when creating an instance of the default client.

Now that these are added, we can run the server with the service account without getting a permissions error
@jen-obyrne
Copy link
Author

Signed the CLA ✔️

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@gopherbot
Copy link

This PR (HEAD: 288d53a) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/gddo/+/187097 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/187097.
After addressing review feedback, remember to publish your drafts!

@jen-obyrne
Copy link
Author

This scopes are being suggested to use when configuring the remote api locally - https://cloud.google.com/appengine/docs/standard/go/tools/remoteapi/ so for consistency it would be great if this pull request could be merged

@gopherbot
Copy link

Message from Andrew Bonventre:

Patch Set 1:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/187097.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Jen O'Byrne:

Patch Set 1:

Hey Andrew

Sorry the issue link wasn't clear enough! Here is the issue I raised: #631 and another issue I commented on
#531 (comment)

I have given the service account all of the permissions as arnottcr said to give it but it doesn't work. I have given it the owner role, editor role and it still has the "must be an admin" error.

I made these changes locally, and then I was able to start the GDDO server as it had the extra scopes that it was missing.


Please don’t reply on this GitHub thread. Visit golang.org/cl/187097.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Go Bot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/187097.
After addressing review feedback, remember to publish your drafts!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants