{"repo":"salrashid123/gce_metadata_server","free":true,"listed":false,"github":"https://github.com/salrashid123/gce_metadata_server","clone":"git clone https://github.com/salrashid123/gce_metadata_server.git","description":"Simple emulator for the Google Compute Engine Metadata Server","language":"Go","stars":107,"topics":["gcp","golang","kubernetes","authentication","emulator","google-cloud-run","google-compute-engine"],"license":"Apache-2.0","category":"auth-billing-email","readme_excerpt":"GCE Metadata Server Emulator This script acts as a GCE's internal metadata server. It returns a live access token that can be used directly by Application Default Credentials from any SDK library or return any GCE metadata key-value pairs and attributes. For example, you can call ADC using default credentials or specifically with ComputeCredentials and also recall any GCE project or instance attribute. To use, first run the emulator: Note the credentials for the server can be sourced from a service account key, workload federation, Trusted Platform Module (TPM) or statically provided as environment variable. The example above uses a key. Then in a new window, export some env vars google SDK's understands and run any application using ADC: You can also launch the metadata server directly from your app or use in unit tests: The metadata server supports additional endpoints that simulate other instance attributes normally only visible inside a GCE instance like instance id , disks , network-interfaces and so on. For more information on the request-response characteristics: GCE Metadata Server Predefined metadata keys Set and remove custom metadata The script performs the following: returns the access token and id token provided by either the serviceAccount JSON file you specify. workload identity federation configuration service account impersonation statically from a provided environment variable service account RSA key on HSM or Trusted Platform Module (TPM) return project att","default_branch":null,"files":null,"tree":[],"storefront":"/r/salrashid123","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/salrashid123/gce_metadata_server/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}