{"id":17678076,"url":"https://github.com/babarot/iap_curl","last_synced_at":"2025-08-24T21:15:59.430Z","repository":{"id":49875776,"uuid":"107211377","full_name":"babarot/iap_curl","owner":"babarot","description":"A CLI that is curl wrapper for making HTTP request to IAP-protected app, more easier than curl","archived":false,"fork":false,"pushed_at":"2021-06-09T08:15:58.000Z","size":58,"stargazers_count":61,"open_issues_count":4,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-10T13:27:54.985Z","etag":null,"topics":["curl","golang","google","iap","identity-aware-proxy"],"latest_commit_sha":null,"homepage":"","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/babarot.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}},"created_at":"2017-10-17T03:09:14.000Z","updated_at":"2024-07-10T10:02:15.000Z","dependencies_parsed_at":"2022-09-19T09:10:57.677Z","dependency_job_id":null,"html_url":"https://github.com/babarot/iap_curl","commit_stats":null,"previous_names":["babarot/iap_curl","b4b4r07/iap_curl"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/babarot/iap_curl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fiap_curl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fiap_curl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fiap_curl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fiap_curl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babarot","download_url":"https://codeload.github.com/babarot/iap_curl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fiap_curl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271953122,"owners_count":24849290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"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":["curl","golang","google","iap","identity-aware-proxy"],"created_at":"2024-10-24T08:03:40.687Z","updated_at":"2025-08-24T21:15:59.372Z","avatar_url":"https://github.com/babarot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"iap_curl\n========\n\n`iap_curl` is a curl wrapper for making HTTP request to IAP-protected app in CLI more easier than `curl` command.\n\n## Usage\n\n### Option1: Use Application Default Credential\n\n```console\n$ export GOOGLE_APPLICATION_CREDENTIALS=\"/path/to/service-account.json\"\n$ export IAP_CLIENT_ID=\"342624545358-asdfd8fas9df8sd7ga0sdguadfpvqp69.apps.googleusercontent.com\"\n$ iap_curl http://iap-protected.webapp.com\n```\n\n### Option2: Use [Impersonate Service Account](https://cloud.google.com/iam/docs/impersonating-service-accounts)\n\n```console\n$ export CLOUDSDK_AUTH_IMPERSONATE_SERVICE_ACCOUNT=\"client@project-id.iam.gserviceaccount.com\"\n$ export IAP_CLIENT_ID=\"342624545358-asdfd8fas9df8sd7ga0sdguadfpvqp69.apps.googleusercontent.com\"\n$ iap_curl http://iap-protected.webapp.com\n```\n\nThe options of `iap_curl` are fully compatible with `curl` command.\n\nIf you want to use [httpstat](https://github.com/b4b4r07/httpstat) instead of `curl`, please specify `IAP_CURL_BIN` environment variable:\n\n```console\n$ export IAP_CURL_BIN=\"httpstat.sh\"\n$ iap_curl https://tellme.tokyo\nConnected to 104.31.70.103:443\n\nHTTP/2.0 200 OK\nServer: cloudflare-nginx\nAccess-Control-Allow-Origin: *\nCache-Control: max-age=600\nCf-Ray: 3af48c40aa3694cf-NRT\nContent-Type: text/html; charset=utf-8\nDate: Tue, 17 Oct 2017 16:13:54 GMT\nExpires: Tue, 17 Oct 2017 16:23:54 GMT\nLast-Modified: Mon, 16 Oct 2017 04:33:46 GMT\nSet-Cookie: __cfduid=db7e1d73f138bcb26e0d6a040e9f5df491508256834; expires=Wed, 17-Oct-18 16:13:54 GMT; path=/; domain=.tellme.tokyo; HttpOnly; Secure\nStrict-Transport-Security: max-age=15552000; preload\nX-Content-Type-Options: nosniff\nX-Github-Request-Id: 2A8B:16E6:10351CA:186074E:59E62C3F\n\nBody discarded\n\n  DNS Lookup   TCP Connection   TLS Handshake   Server Processing   Content Transfer\n[      2ms  |          57ms  |        320ms  |            303ms  |             0ms  ]\n            |                |               |                   |                  |\n   namelookup:2ms            |               |                   |                  |\n                       connect:60ms          |                   |                  |\n                                   pretransfer:381ms             |                  |\n                                                     starttransfer:684ms            |\n                                                                                total:684ms\n```\n\n## Advanced usage\n\nYou can save the URL of frequently used service together with its Env (`IAP_CLIENT_ID` ...) in a JSON file (see also [#1](https://github.com/b4b4r07/iap_curl/issues/1)). This file is located in `~/.config/iap_curl/config.json`.\n\n### Option1: Use Application Default Credential\n\n```json\n{\n  \"services\": [\n    {\n      \"url\": \"https://my.service.com/health\",\n      \"env\": {\n        \"GOOGLE_APPLICATION_CREDENTIALS\": \"/Users/b4b4r07/Downloads/my-service-dev-b5e624fd28ee.json\",\n        \"IAP_CLIENT_ID\": \"839558305167-s3akt4doo38lckhaac1ucfdp0e4921tc.apps.googleusercontent.com\",\n        \"IAP_CURL_BIN\": \"curl\"\n      }\n    }\n  ]\n}\n```\n\n### Option2: Use [Impersonate Service Account](https://cloud.google.com/iam/docs/impersonating-service-accounts)\n\n```json\n{\n  \"services\": [\n    {\n      \"url\": \"https://my.service.com/health\",\n      \"env\": {\n        \"CLOUDSDK_AUTH_IMPERSONATE_SERVICE_ACCOUNT\": \"client@project-id.iam.gserviceaccount.com\",\n        \"IAP_CLIENT_ID\": \"839558305167-s3akt4doo38lckhaac1ucfdp0e4921tc.apps.googleusercontent.com\",\n        \"IAP_CURL_BIN\": \"curl\"\n      }\n    }\n  ]\n}\n```\n\nThanks to that, you can access more easier like curl.\n\n```console\n$ iap_curl https://my.service.com/health\n```\n\nAlso, some original options are added. So you can use more and more easier to access the service by using [peco](https://github.com/peco/peco)/[fzf](https://github.com/junegunn/fzf). For more information about its options, please see `iap_curl --help`.\n\n```console\n$ iap_curl $(iap_curl --list-urls | peco) # peco is similar to fzf\n```\n\n## Installation\n\nGet binary from [GitHub Releases](https://github.com/b4b4r07/iap_curl/releases) and put it to your PATH or:\n\n```\n$ go get github.com/b4b4r07/iap_curl\n```\n\n## License\n\nMIT\n\n## Author\n\nb4b4r07\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabarot%2Fiap_curl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabarot%2Fiap_curl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabarot%2Fiap_curl/lists"}