kudaのAPIキー認証に対応#196
Merged
Merged
Conversation
kudaがAPIキー必須化を予定(移行期間中はキー無しも可)のため先行対応する。 - KUDA_API_KEY 環境変数が設定されていれば Authorization: Bearer で送る (サーバー間なのでヘッダレーンのみ。?key= クエリレーンは使わない) - X-Client-Id: debug-shrine を常送し、kuda側の統計・監査で識別可能に - デプロイworkflowの omikujiGo に GitHub Secrets (DEV_KUDA_API_KEY / PROD_KUDA_API_KEY)から注入。未設定なら空=無認証互換 - 401/429 も503と同じ「引けない」(no_entropy)。疑似乱数フォールバックなし - 認証ヘッダの送信/不送信と401エラー扱いのテストを追加 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DwkB6Hj2JggoKcy7FoxNcU
Contributor
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
kojira
pushed a commit
that referenced
this pull request
Jul 20, 2026
kojira
pushed a commit
that referenced
this pull request
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
kuda がAPIキー認証を導入予定(現在は移行期間
REQUIRE_API_KEY=0でキー無しも可、フリップ後は401)のため、おみくじのkudaクライアントを先行対応します。実装
KUDA_API_KEY環境変数(kuda_...)が設定されていればAuthorization: Bearerヘッダで送信。サーバー間通信なのでヘッダレーンのみ(半公開キーkudaq_の?key=クエリレーンは使わない)。X-Client-Id: debug-shrineを常送してkuda側の統計・監査で識別可能に--set-env-varsに GitHub Secrets(DEV_KUDA_API_KEY/PROD_KUDA_API_KEY)から注入。Secret未設定なら空=無認証の互換動作のままなので、キー発行前にマージしても壊れない必要な運用作業(コード外)
kuda_)を2本発行(dev用・prod用)DEV_KUDA_API_KEY/PROD_KUDA_API_KEYを登録検証
go test ./...全パス(新テスト含む)🤖 Generated with Claude Code
https://claude.ai/code/session_01DwkB6Hj2JggoKcy7FoxNcU
Generated by Claude Code