本文へ移動
Developers

Reference

Authentication

将来のAPIキーはサーバー側だけで使用し、環境と用途ごとに分離する設計です。

Server-side only

ブラウザへ鍵を置かない

APIキーをクライアントJavaScript、公開リポジトリ、ログ、スクリーンショットへ含めません。

Preview header
Authorization: Bearer $VIRAFY_API_KEYHost: api.virafy.example

Key hygiene

  • 開発・ステージング・本番で鍵を分ける
  • 個人間で鍵を共有しない
  • 定期的に利用状況とscopeを確認する
  • 漏洩が疑われる場合は直ちに失効する

Permissions

Scope previewAllowsDoes not allow
sources:readSource取得作成・変更
jobs:writeJob作成外部公開
assets:readAsset取得Storage変更
publications:write将来の公開操作確認なしの実行