AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。

agentengine service-account rotate

サービスアカウント用に新しいシークレットを発行します。

サービスアカウントの新しいクライアント シークレットを発行します。

新しいシークレットは一度しか表示されません。前のシークレットは最大7日間、またはそれより早く期限が切れるまで認証を続けます。再度ローテーションを行うと、その猶予期間は直ちに終了します。

書き込み /API/v1/oauth/token でクライアントIDとシークレットを1時間有効なアクセストークンと交換します。そのトークンは、サービスアカウント認証が明示的に有効になっているエンドポイントとなる接続されたデバイスにのみ送信し、割り当てられたロールで許可されている場合にのみ送信してください。

curl --fail-with-body --silent --show-error \ --user '<client-id>' \ --data grant_type=client_credentials \ '<base-url>/api/v1/oauth/token' | \jq -er '"Authorization: Bearer " + .access_token' | \curl --fail-with-body --silent --show-error \ --header @- \ '<base-url>/api/v1/<service-account-enabled-resource>'
agentengine service-account rotate <client-id> [flags]
--base-url string Platform base URL --context string Named context to target (see 'agentengine context list')-h, --help help for rotate --json Output the rotated service account as JSON --org-id string Organization scope for the service account --project-id string Project scope for the service account --secret-expires-in duration Secret lifetime as a whole number of hours, e.g. 720h (default: server default of 2160h)
--log-file string override log file path --log-level string file log verbosity (error|warn|info|debug) (default "info") --no-log disable file logging-q, --quiet silence stderr below error-v, --verbose count raise stderr verbosity (-v info, -vv debug)
このページを評価