{"id":38442796,"url":"https://github.com/dimitriin/gcs-proxy","last_synced_at":"2026-01-17T04:36:37.248Z","repository":{"id":259390913,"uuid":"859494663","full_name":"dimitriin/gcs-proxy","owner":"dimitriin","description":"Reverse proxy with authentication for Google Cloud Storage","archived":false,"fork":false,"pushed_at":"2024-10-24T07:13:19.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T02:55:00.587Z","etag":null,"topics":["authentication","gcs","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimitriin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2024-09-18T18:56:39.000Z","updated_at":"2024-10-24T07:12:37.000Z","dependencies_parsed_at":"2024-10-25T03:06:42.640Z","dependency_job_id":"8a993892-2f92-4b8d-be9a-f6490253bb4f","html_url":"https://github.com/dimitriin/gcs-proxy","commit_stats":null,"previous_names":["dimitriin/gcs-proxy"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dimitriin/gcs-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitriin%2Fgcs-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitriin%2Fgcs-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitriin%2Fgcs-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitriin%2Fgcs-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimitriin","download_url":"https://codeload.github.com/dimitriin/gcs-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitriin%2Fgcs-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28495234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["authentication","gcs","proxy"],"created_at":"2026-01-17T04:36:36.613Z","updated_at":"2026-01-17T04:36:37.238Z","avatar_url":"https://github.com/dimitriin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GCS proxy\n\nReverse proxy with authentication for Google Cloud Storage (GCS). \nThe proxy provides access to private GCS buckets, making it ideal for use as sidecar container in Kubernetes.\n\n## Table of contents\n1. [Configuration](#configuration)\n2. [Running](#running)\n3. [Build binary from source code](#build-binary-from-source-code)\n4. [Run from binary](#run-from-binary)\n5. [Contributing](#contributing)\n6. [License](#license)\n\n## Configuration\nThe proxy could be configured with environment variables. \nBy default, the proxy tries to find default credentials to GCS. \nSee https://cloud.google.com/docs/authentication/external/set-up-adc for more information.\n\nAlternatively, custom credentials could be set with one of next environment variables:\n* `GCS_PROXY_GOOGLE_CLOUD_STORAGE_CREDS_JSON` - JSON string with GCS service account credentials;\n* `GCS_PROXY_GOOGLE_CLOUD_STORAGE_CREDS_FILE` - path to JSON file with GCS service account credentials.\n\nFor more configuration options see [Advanced configuration](#advanced-configuration) section.\n\n## Running\nRun the proxy with docker by the following command:\n```bash\ndocker run \\\n  -p 8787:8787 \\\n  -v ${HOST_PATH_TO_SERVICE_ACCOUNT_JSON_WITH_ACCESS_TO_GCS}:/service_account.json \n  -e GCS_PROXY_GOOGLE_CLOUD_STORAGE_CREDS_PATH /service_account.json \\ \n  ghcr.io/dimitriin/gcs-proxy:v1.0.0\n```\nPrebuilt docker image `ghcr.io/dimitriin/gcs-proxy:${RELEASE_TAG}` could be found at [GitHub Container Registry](https://github.com/dimitriin/gcs-proxy/pkgs/container/gcs-proxy).\n\n\nThen access to GCS bucket objects with:\n```\nGET http://localhost:8787/${BUCKET_NAME}/${OBJECT_NAME}\n```\n\nAlso, write operations provided by [XML-API](https://cloud.google.com/storage/docs/xml-api/overview) are available, \nbut do not forget to [set proper scopes to the service account](https://cloud.google.com/storage/docs/oauth-scopes).\n\n## Build binary from source code\nRun make command to build binary from source code:\n```bash\nmake build\n```\nOptional command configuration environment variables:\n* `GOOS` (default `linux`);\n* `GOARCH` (default `amd64`);\n* `BIN_PATH` (default `./bin`).\n\n## Run from binary\n\nRun the proxy with the following command:\n```bash\nGCS_PROXY_GOOGLE_CLOUD_STORAGE_CREDS_PATH=${HOST_PATH_TO_SERVICE_ACCOUNT_JSON_WITH_ACCESS_TO_GCS} \\\n./bin/gcs-proxy-${GOOS}-${GOARCH}\n```\n\n### Build docker image from source code\nBuild docker image from source code:\n```bash\nmake build-image\n```\nOptional command configuration env variables:\n* `GCS_PROXY_DOCKER_IMG_REPO` (default `ghcr.io/dimitriin/gcs-proxy`);\n* `GCS_PROXY_DOCKER_IMG_TAG` (default `latest`).\n\n### Advanced configuration\n\nAdvanced configuration environment variables:\n\n| Variable                                           | Description                     | Default                                                 |\n|----------------------------------------------------|---------------------------------|---------------------------------------------------------|\n| `GCS_PROXY_LOG_LEVEL`                              | Log level                       | `INFO`                                                  |\n| `GCS_PROXY_SERVER_HOST`                            | Proxy server host               | `localhost`                                             |\n| `GCS_PROXY_SERVER_PORT`                            | Proxy server port               | `8787`                                                  |\n| `GCS_PROXY_SERVER_READ_HEADER_TIMEOUT`             | Read header timeout             | `5s`                                                    |\n| `GCS_PROXY_SERVER_ROUTES_PROXY`                    | Route proxied to GCS            | `/{bucket:[0-9a-zA-Z-_.]+}/{object:.*}`                 |\n| `GCS_PROXY_SERVER_ROUTES_HEALTH`                   | Health check route              | `/_health`                                              |\n| `GCS_PROXY_SERVER_ROUTES_METRICS`                  | Metrics route                   | `/_metrics`                                             |\n| `GCS_PROXY_SERVER_REQUEST_RESPONSE_LOG_ENABLED`    | Enable request/response logging | `true`                                                  |\n| `GCS_PROXY_SERVER_REQUEST_RESPONSE_LOG_LEVEL`      | Request/response log level      | `INFO`                                                  |\n| `GCS_PROXY_SERVER_OBSERVABILITY_METRICS_ENABLED`   | Enable proxy metrics            | `true`                                                  |\n| `GCS_PROXY_SERVER_OBSERVABILITY_METRICS_NAMESPACE` | Prometheus metrics namespace    | `gcs`                                                   |\n| `GCS_PROXY_SERVER_OBSERVABILITY_METRICS_SUBSYSTEM` | Prometheus metrics subsystem    | `proxy`                                                 |\n| `GCS_PROXY_GOOGLE_CLOUD_STORAGE_ENDPOINT`          | GCS endpoint                    | `https://storage.googleapis.com`                        |\n| `GCS_PROXY_GOOGLE_CLOUD_STORAGE_SCOPES`            | GCS scopes                      | `https://www.googleapis.com/auth/devstorage.read_write` |\n| `GCS_PROXY_SHUTDOWN_PRE_STOP_TIMEOUT`              | Sleep timeout before handle sig | `0s`                                                    |\n| `GCS_PROXY_SHUTDOWN_EXIT_CODES_ON_SIG_TERM`        | Exit code on TERM sig           | `0`                                                     |\n| `GCS_PROXY_SHUTDOWN_EXIT_CODES_ON_SIG_INT`         | Exit code on INT sig            | `0`                                                     |\n| `GCS_PROXY_SHUTDOWN_EXIT_CODES_ON_SIG_QUIT`        | Exit code on QUIT sig           | `131`                                                   |\n\n## Contributing\n\nFeel free to submit [issues](https://github.com/dimitriin/gcs-proxy/issues) or [pull requests](https://github.com/dimitriin/gcs-proxy/pulls).\n\n## License\n\nGCS proxy is licensed under the MIT License. See the [LICENSE](./LICENSE) for more details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitriin%2Fgcs-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimitriin%2Fgcs-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitriin%2Fgcs-proxy/lists"}