Comments (4)
OK interesting. I am using Cloud Run which must be setup differently to GCE VMs (but it still has a local metadata sidecar). Yeah I found the flag override and everything is working with that.
Thanks for the emulator its great for testing.
from gce_metadata_server.
I see you have jus the email scope set. I am pretty sure the default behavior of metadata server includes https://www.googleapis.com/auth/cloud-platform
from gce_metadata_server.
The named default
scopes (atleast generated by the cli) include a couple of others but not cloud-platform
itself:
https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes
you get cloud-platform
if you enable (on the ui) all apis
.
I kept the minimal scopes here just to fulfill the /identity
endpoint capabilities.
You could override the scopes w/ the flag which bootstraps the default credentials:
https://github.com/salrashid123/gce_metadata_server/blob/master/main.go#L404
from gce_metadata_server.
glad its helpful!. FWIW, the metadata servers between GCE and Run are slightly different. eg, in Cloud Run you can even specify non-Cloud API scopes:
curl "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token?scopes=[SCOPES]" -H "Metadata-Flavor: Google"
( i suppose i can add that into this metadata server implementation too)
from gce_metadata_server.
Related Issues (9)
- Token refresh causes concurrent access crash
- Support generating required material to operate HOT 5
- Implement a way to capture remote ssh output to an instance
- Implement 301 redirect for paths missing trailing /
- static string after refactor HOT 4
- Container crash "Unable to verify OIDC token oidc: expected audience..." HOT 6
- Idea: Support for Workload Identity Federation HOT 3
- Support curl --data-urlencode HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gce_metadata_server.