LoginSignup
2
1

More than 3 years have passed since last update.

Cloud Runで認証有りの際、手っ取り早く認証する方法

Posted at

前提

  • CloudRunの起動元にallUsersが入っていない(未認証を許可していない)
  • CloudRun起動元に自分のgmailアドレスが設定されている。
  • gcloudコマンドでログインしている。

BearerTokenを取得

gcloudコマンドを使う

$ gcloud auth print-identity-token

出力されたtokenを付けてREQUESTする

Tokenを付けてリクエストする

$ curl -H "Authorization: Bearer [先程取得したTOKEN]" https://[Cloud RunのURL]/

カッコ[]の中身は適当に読み替えてください。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1