{"id":19601243,"url":"https://github.com/tonglil/iap-token-generator","last_synced_at":"2026-06-13T17:31:47.254Z","repository":{"id":73276623,"uuid":"148253717","full_name":"tonglil/iap-token-generator","owner":"tonglil","description":"Generate OAuth Bearer tokens for authenticating Service Accounts through GCP IAP","archived":false,"fork":false,"pushed_at":"2018-09-12T06:32:48.000Z","size":1536,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T15:37:02.671Z","etag":null,"topics":["google-cloud-platform","iap","oauth2","oidc"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/tonglil/iap-token-generator/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tonglil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-11T03:16:19.000Z","updated_at":"2018-09-12T06:32:50.000Z","dependencies_parsed_at":"2023-04-06T23:53:55.055Z","dependency_job_id":null,"html_url":"https://github.com/tonglil/iap-token-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tonglil/iap-token-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonglil%2Fiap-token-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonglil%2Fiap-token-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonglil%2Fiap-token-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonglil%2Fiap-token-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonglil","download_url":"https://codeload.github.com/tonglil/iap-token-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonglil%2Fiap-token-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34294408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-cloud-platform","iap","oauth2","oidc"],"created_at":"2024-11-11T09:17:41.641Z","updated_at":"2026-06-13T17:31:47.233Z","avatar_url":"https://github.com/tonglil.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IAP Token Generator\n\nGenerate OIDC tokens to use in HTTP requests for the `Authorization: Bearer` header to make authenticated requests to Cloud IAP-secured resources. \n\nImplements [this flow](https://cloud.google.com/iap/docs/authentication-howto#authenticating_from_a_service_account) outlined by the GCP documentation.\n\nThanks to https://github.com/b4b4r07/iap_curl for implementing the OAuth flow.\n\n## Options\n\n```\n$ iap-token-generator -h\nGenerate a Bearer token for making HTTP requests to IAP-protected apps\n\nUsage:\n  iap-token-generator [flags]\n\nFlags:\n  -c, --credentials string   The service account JSON credential [GOOGLE_APPLICATION_CREDENTIALS]\n  -f, --filename string      Write the token to a file\n  -h, --help                 help for iap-token-generator\n  -i, --id string            The IAP client ID [IAP_CLIENT_ID]\n  -r, --refresh duration     Refresh the token on a specified interval\n```\n\n## Usage\n\n1. Run as a sidecar container, refresh and output the token to a file that is read by the main application.  \n1. Run with refresh and consume the token from stdout.\n1. Run as a subcommand with `curl --header \"Authorization: Bearer $(iap-token-generator)\" ...`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonglil%2Fiap-token-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonglil%2Fiap-token-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonglil%2Fiap-token-generator/lists"}