From e0e59fd437f52a56140193517f124307510bdd80 Mon Sep 17 00:00:00 2001 From: Rintaro Okamura Date: Fri, 5 Jul 2024 19:15:49 +0900 Subject: [PATCH] docs: update readme Signed-off-by: Rintaro Okamura --- README.md | 28 +++++++++++++++++++++++++-- pkg/service/google/idtoken/idtoken.go | 2 -- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 24d7350..e177cad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Google Cloud Auth Proxy +[![latest tag](https://ghcr-badge.egpl.dev/rinx/gcloud-auth-proxy/latest_tag?trim=major&label=latest)](https://github.com/users/rinx/packages/container/package/gcloud-auth-proxy) +[![image size](https://ghcr-badge.egpl.dev/rinx/gcloud-auth-proxy/size)](https://github.com/users/rinx/packages/container/package/gcloud-auth-proxy) + This is a software that provides [Google-signed authentication tokens][google-token] in several ways. Currently, it supports the following token types. @@ -9,11 +12,32 @@ Currently, it supports the following token types. [google-token]: https://cloud.google.com/docs/authentication/token-types [google-id-token]: https://cloud.google.com/docs/authentication/get-id-token#go -## Usage +## Usecase TBW -## Endpoints +## Usage + +Deploy gcloud-auth-proxy as a sidecar with your application. + +Container is available on `ghcr.io/rinx/gcloud-auth-proxy:latest`. + +CLI flags are the followings. + +```bash +Usage: + gcloud-auth-proxy [flags] + +Flags: + --audience string default audience (required) + -h, --help help for gcloud-auth-proxy + --host string server host (default "0.0.0.0") + --port string server port (default "8100") + --token-source-cache-duration string token source cache duration (default "30m") + -v, --version version for gcloud-auth-proxy +``` + +### Endpoints | endpoint | method | description | |------------------|--------|------------------| diff --git a/pkg/service/google/idtoken/idtoken.go b/pkg/service/google/idtoken/idtoken.go index e9b2332..b848e81 100644 --- a/pkg/service/google/idtoken/idtoken.go +++ b/pkg/service/google/idtoken/idtoken.go @@ -118,8 +118,6 @@ func (s *server) idTokenHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") w.Header().Set("Cache-Control", "no-store") - - w.WriteHeader(http.StatusOK) } func (s *server) idTokenProxy(w http.ResponseWriter, r *http.Request) {