本文へスキップ

サービスアカウントとキー ​

CIと自動化のためのサービスアカウントと、そのキー、ポリシー、委任、監査。

このグループの操作と、それぞれのアクセスルール、再試行ルール、パラメーター、レスポンスです。すべてのリクエストにはキーを付けます:Authorization: Bearer <key>(「認証」を参照)。

操作 ​

サービスアカウントの一覧表示 ​

GET HEAD /api/v1/service-accounts

アクセス: サービス管理権限service-account.read · 再試行: 再試行しても安全(読み取り)

呼び出し元が参照できるサービスアカウントをID順に、1ページ50件で列挙します。各項目には、名前、有効フラグ、revision、ポリシーのbindings、作成時刻が含まれます。続きはafterにnextを設定して取得します。ブートストラップキーはすべてを参照でき、委任先は、自分への委任にservice-account.readが含まれる対象のみを参照できます。それがない場合、一覧は拒否されるのではなく空になります。

パラメーター

名前場所型必須ルール
afterクエリstring (uuid)いいえ—

レスポンス 200

フィールド型必須ルール
itemsobjectの配列はい50個以内の要素
items[].idstring (uuid)はい—
items[].namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
items[].enabledbooleanはい—
items[].revisionintegerはい1~2147483647
items[].bindingsobjectの配列はい64個以内の要素
items[].bindings[].resourceobjectはい—
items[].bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
items[].createdAtstring (date-time)はい—
nextstring (uuid)はいnullも可

レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507

例

bash
curl -X GET "$ARKVORY_URL/api/v1/service-accounts" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

サービスアカウントの作成 ​

POST /api/v1/service-accounts

アクセス: ブートストラップキー(インストールの回復キー) · 再試行: 自動的に再試行しない

CIやアプリケーション用のマシンアイデンティティを、name(英字、数字、_.-からなる3〜64文字)と、そのポリシーのbindingsで作成します。bindingsは、リポジトリごとに、そのキーが使用できる正確なアクション(upload.createやcontent.readなど)を指定するものです。応答は201とアカウントで、その後issueServiceKeyでキーを発行します。すでに使われている名前は409 already_existsです。

リクエスト本文 (application/json)

フィールド型必須ルール
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read

レスポンス 201

フィールド型必須ルール
idstring (uuid)はい—
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
enabledbooleanはい—
revisionintegerはい1~2147483647
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
createdAtstring (date-time)はい—

レスポンス: 201, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

例

bash
curl -X POST "$ARKVORY_URL/api/v1/service-accounts" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","bindings":[]}'

サービスアカウントの取得 ​

GET HEAD /api/v1/service-accounts/{id}

アクセス: サービス管理権限service-account.read · 再試行: 再試行しても安全(読み取り)

アカウントの名前、有効フラグ、revision、ポリシーのバインディング、作成時刻を返します。委任先に対しては、割り当てられていないアカウントは404で、割り当てられたアカウントに対して必要なアクションがない場合は403で応答します。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—

レスポンス 200

フィールド型必須ルール
idstring (uuid)はい—
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
enabledbooleanはい—
revisionintegerはい1~2147483647
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
createdAtstring (date-time)はい—

レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507

例

bash
curl -X GET "$ARKVORY_URL/api/v1/service-accounts/$ID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

サービスアカウントの有効化と無効化 ​

PATCH /api/v1/service-accounts/{id}

アクセス: サービス管理権限service-account.manage · 再試行: 想定するリビジョンを指定した場合のみ再試行(compare-and-swap)

enabledを設定します。expectedRevisionは現在のリビジョンでなければならず、そうでない場合は409 revision_mismatchになります。ここで変更できるのはこのフラグのみです(名前は変更できません)。無効化すると、次のリクエストからアカウントのすべてのキーがブロックされ、有効化すると、期限切れでも取り消し済みでもないキーが復活します。委任先がこれを行えるのは、現在のポリシー全体が自分の上限の範囲内にある場合に限られます。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—

リクエスト本文 (application/json)

フィールド型必須ルール
expectedRevisionintegerはい1~2147483646
enabledbooleanはい—

レスポンス 200

フィールド型必須ルール
idstring (uuid)はい—
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
enabledbooleanはい—
revisionintegerはい1~2147483647
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
createdAtstring (date-time)はい—

レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

例

bash
curl -X PATCH "$ARKVORY_URL/api/v1/service-accounts/$ID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"expectedRevision":1,"enabled":false}'

サービスアカウントのポリシーの取得 ​

GET HEAD /api/v1/service-accounts/{id}/policy

アクセス: サービス管理権限policy.read · 再試行: 再試行しても安全(読み取り)

policy.readを持つ呼び出し元に対して、getServiceAccountと同様に、アカウントをそのポリシーのbindingsとrevisionとともに返します。キーの有効な権限は、リポジトリとアクションごとの、このポリシーとキー自身のバインディングの共通部分です。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—

レスポンス 200

フィールド型必須ルール
idstring (uuid)はい—
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
enabledbooleanはい—
revisionintegerはい1~2147483647
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
createdAtstring (date-time)はい—

レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507

例

bash
curl -X GET "$ARKVORY_URL/api/v1/service-accounts/$ID/policy" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

サービスアカウントのポリシーの置換 ​

PUT /api/v1/service-accounts/{id}/policy

アクセス: サービス管理権限policy.manage · 再試行: 想定するリビジョンを指定した場合のみ再試行(compare-and-swap)

アカウントのbindings(最大64件。それぞれリポジトリと正確なアクションの組)を置き換えます。expectedRevisionは現在のリビジョンでなければならず、そうでない場合は409 revision_mismatchになります。すべてのキーは次のリクエストから変更に従います。範囲の縮小はただちに反映され、拡大してもキー自身のバインディングを超えることはありません。委任先には、現在のポリシーと新しいポリシーの両方が自分の上限の範囲内にあることが必要です。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—

リクエスト本文 (application/json)

フィールド型必須ルール
expectedRevisionintegerはい1~2147483646
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read

レスポンス 200

フィールド型必須ルール
idstring (uuid)はい—
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
enabledbooleanはい—
revisionintegerはい1~2147483647
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
createdAtstring (date-time)はい—

レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

例

bash
curl -X PUT "$ARKVORY_URL/api/v1/service-accounts/$ID/policy" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"expectedRevision":1,"bindings":[]}'

サービスアカウントのキーの一覧表示 ​

GET HEAD /api/v1/service-accounts/{id}/keys

アクセス: サービス管理権限credential.read · 再試行: 再試行しても安全(読み取り)

アカウントのキーのメタデータをID順に、1ページ50件で列挙します。内容は、名前、state(pending、active、revoked)、バインディング、作成、有効期限、アクティベーションの期限、ローテーション元のキーで、シークレットやハッシュは含まれません。続きはafterにnextを設定して取得します。有効期限が切れてもstateは変わらないため、expiresAtを現在時刻と比較してください。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—
afterクエリstring (uuid)いいえ—

レスポンス 200

フィールド型必須ルール
itemsobjectの配列はい50個以内の要素
items[].idstring (uuid)はい—
items[].accountIdstring (uuid)はい—
items[].namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
items[].statestringはい次のいずれか:pending, active, revoked
items[].bindingsobjectの配列はい64個以内の要素
items[].bindings[].resourceobjectはい—
items[].bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
items[].createdAtstring (date-time)はい—
items[].expiresAtstring (date-time)はい—
items[].activationExpiresAtstring (date-time)はい—
items[].rotatedFromstring (uuid)はいnullも可
nextstring (uuid)はいnullも可

レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507

例

bash
curl -X GET "$ARKVORY_URL/api/v1/service-accounts/$ID/keys" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

サービスアカウントのキーの発行 ​

POST /api/v1/service-accounts/{id}/keys

アクセス: サービス管理権限credential.manage · 再試行: 同じIdempotency-Keyを使えば再試行しても安全

name、bindings(アカウントのポリシーでも許可されている範囲でのみ有効)、および任意のexpiresAt(UTC。既定は90日、最大365日で、委任先の場合は自身のキーの期限を超えられません)を指定して、保留中のキーを発行します。最初の応答は201で、keyとsecretを返します。secretが表示されるのはこの1回だけです。同じIdempotency-Keyとボディで繰り返すと、メタデータのみを含む200になり、ボディが異なる場合は409になります。キーの保持者は、15分以内にシークレットを使ってactivateServiceKeyを呼び出す必要があります。シークレットを紛失した場合は、キーを取り消し、新しいIdempotency-Keyで新しいキーを発行してください。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—
Idempotency-Keyヘッダーstringはい128文字以内

リクエスト本文 (application/json)

フィールド型必須ルール
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
expiresAtstring (date-time)いいえ—

レスポンス 200

フィールド型必須ルール
keyobjectはい—
key.idstring (uuid)はい—
key.accountIdstring (uuid)はい—
key.namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
key.statestringはい次のいずれか:pending, active, revoked
key.bindingsobjectの配列はい64個以内の要素
key.bindings[].resourceobjectはい—
key.bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
key.createdAtstring (date-time)はい—
key.expiresAtstring (date-time)はい—
key.activationExpiresAtstring (date-time)はい—
key.rotatedFromstring (uuid)はいnullも可
secretstringいいえ—

レスポンス: 200, 201, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

例

bash
curl -X POST "$ARKVORY_URL/api/v1/service-accounts/$ID/keys" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","bindings":[]}'

サービスアカウントの監査の取得 ​

GET HEAD /api/v1/service-accounts/{id}/audit

アクセス: サービス管理権限service-audit.read · 再試行: 再試行しても安全(読み取り)

シーケンスafter(既定は0)より後のアカウントのイベントを、古いものから最大100件返します。対象は、発行、ローテーション、アクティベーション、取り消しといった、アカウント、ポリシー、キーの変更で、それぞれに実行者、アクション、キー、時刻が含まれます。続きを読むには、最後のsequenceをafterとして渡します。nextフィールドはありません。保持されるのは、サーバー全体で最新の100,000件のイベントのみです。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—
afterクエリstringいいえ10進数字で表した整数(文字列として送信)

レスポンス 200

フィールド型必須ルール
itemsobjectの配列はい100個以内の要素
items[].sequencestringはい—
items[].actorstringはい—
items[].actionstringはい—
items[].accountIdstring (uuid)はい—
items[].keyIdstring (uuid)はいnullも可
items[].occurredAtstring (date-time)はい—

レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507

例

bash
curl -X GET "$ARKVORY_URL/api/v1/service-accounts/$ID/audit" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

キーの取得 ​

GET HEAD /api/v1/api-keys/{id}

アクセス: サービス管理権限credential.read · 再試行: 再試行しても安全(読み取り)

1つのマネージドキーのメタデータを返します。内容は、アカウント、名前、状態、バインディング、作成、有効期限、アクティベーションの期限、ローテーション元のキーで、シークレットやそのハッシュは含まれません。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—

レスポンス 200

フィールド型必須ルール
idstring (uuid)はい—
accountIdstring (uuid)はい—
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
statestringはい次のいずれか:pending, active, revoked
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
createdAtstring (date-time)はい—
expiresAtstring (date-time)はい—
activationExpiresAtstring (date-time)はい—
rotatedFromstring (uuid)はいnullも可

レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507

例

bash
curl -X GET "$ARKVORY_URL/api/v1/api-keys/$ID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

キーのローテーション ​

POST /api/v1/api-keys/{id}/rotate

アクセス: サービス管理権限credential.manage · 再試行: 同じIdempotency-Keyを使えば再試行しても安全

キーidの後継となる保留中のキーを、同じアカウントに対して、同じかより狭いbindingsで発行します。応答はissueServiceKeyと同様で、201と1回限りのsecret、同じIdempotency-Keyで繰り返した場合はメタデータのみの200です。後継がアクティベートされた後も、古いキーは最大24時間まで有効なままです。新しいキーが動作することを確認し、古いキーが開始したジョブが完了してから、明示的に取り消してください。オペレーターキーが持つ委任は、後継キーにはコピーされません。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—
Idempotency-Keyヘッダーstringはい128文字以内

リクエスト本文 (application/json)

フィールド型必須ルール
namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
bindingsobjectの配列はい64個以内の要素
bindings[].resourceobjectはい—
bindings[].resource.kindstringはい次のいずれか:repository
bindings[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
expiresAtstring (date-time)いいえ—

レスポンス 200

フィールド型必須ルール
keyobjectはい—
key.idstring (uuid)はい—
key.accountIdstring (uuid)はい—
key.namestringはい^[a-zA-Z0-9_.-]{3,64}$に一致
key.statestringはい次のいずれか:pending, active, revoked
key.bindingsobjectの配列はい64個以内の要素
key.bindings[].resourceobjectはい—
key.bindings[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read
key.createdAtstring (date-time)はい—
key.expiresAtstring (date-time)はい—
key.activationExpiresAtstring (date-time)はい—
key.rotatedFromstring (uuid)はいnullも可
secretstringいいえ—

レスポンス: 200, 201, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

例

bash
curl -X POST "$ARKVORY_URL/api/v1/api-keys/$ID/rotate" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"<name>","bindings":[]}'

キーの取り消し ​

POST /api/v1/api-keys/{id}/revoke

アクセス: サービス管理権限credential.manage · 再試行: 再試行しても安全:同じリクエストは同じ効果になる

キーを完全に取り消します。次のリクエストは失敗しますが、すでに実行中のダウンロードは切断されません。繰り返しても204で成功します。取り消されたオペレーターキーが発行し、すでにアクティベートされているキーは有効なままなので、別途取り消してください。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—

レスポンス: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

例

bash
curl -X POST "$ARKVORY_URL/api/v1/api-keys/$ID/revoke" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

キーのアクティベート ​

POST /api/v1/auth/activate-key

アクセス: 発行されたキー(有効化の前後を問わない) · 再試行: 再試行しても安全:同じリクエストは同じ効果になる

保持者が新しく発行されたキーを受け取ったことを証明します。発行から15分以内に、そのキーをAuthorization: Bearerとして呼び出すと、キーが有効になります(204)。繰り返しても安全で、有効期限は延長されません。ローテーションされたキーをアクティベートすると、置き換えられる側のキーの残りの有効期間は最大24時間に短縮されます。

レスポンス: 204, 400, 401, 403, 404, 405, 409, 422, 503, 507

例

bash
curl -X POST "$ARKVORY_URL/api/v1/auth/activate-key" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

キーの委任の一覧表示 ​

GET HEAD /api/v1/api-keys/{id}/delegations

アクセス: ブートストラップキー、またはそのキー自体 · 再試行: 再試行しても安全(読み取り)

オペレーターキーidが持つ委任を、無効なものを含めて最大64件返します。対象アカウントごとに、revision、enabledかどうか、管理用のactions(credential.manageなど)、付与できるリポジトリバインディングのceilingが含まれます。委任先はここで自分の委任を読み取れます(そのキーIDはgetOwnPermissionsのcredentialIdです)。他のキーの一覧は403になります。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—

レスポンス 200

フィールド型必須ルール
itemsobjectの配列はい64個以内の要素
items[].keyIdstring (uuid)はい—
items[].targetAccountIdstring (uuid)はい—
items[].enabledbooleanはい—
items[].revisionintegerはい1~2147483647
items[].actionsstringの配列はい7個以内の要素; 要素の重複なし; 各要素:次のいずれか:service-account.read, service-account.manage, policy.read, policy.manage, credential.read, credential.manage, service-audit.read
items[].ceilingobjectの配列はい16個以内の要素
items[].ceiling[].resourceobjectはい—
items[].ceiling[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read

レスポンス: 200, 400, 401, 403, 404, 409, 422, 503, 507

例

bash
curl -X GET "$ARKVORY_URL/api/v1/api-keys/$ID/delegations" \
  -H "Authorization: Bearer $ARKVORY_TOKEN"

サービスアカウントの管理の委任 ​

PUT /api/v1/api-keys/{id}/delegations/{accountId}

アクセス: ブートストラップキー(インストールの回復キー) · 再試行: 想定するリビジョンを指定した場合のみ再試行(compare-and-swap)

キーidに、指定したactions(service-account.read、service-account.manage、policy.read、policy.manage、credential.read、credential.manage、service-audit.read)で、サービスアカウントaccountIdをceiling(付与できるリポジトリバインディング。最大16件)の範囲内で管理させます。manageはreadを含意しません。expectedRevisionは、作成するときは0、変更または再有効化するときはレコードの現在のリビジョンとし、そうでない場合は409です。キーは有効で、ブートストラップキーが発行したものでなければなりません。また、1つのアカウントが委任を持ちつつ委任の対象にもなることはできないため、委任が連鎖することはありません。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—
accountIdパスstring (uuid)はい—

リクエスト本文 (application/json)

フィールド型必須ルール
expectedRevisionintegerはい0~2147483646
actionsstringの配列はい1~7個の要素; 要素の重複なし; 各要素:次のいずれか:service-account.read, service-account.manage, policy.read, policy.manage, credential.read, credential.manage, service-audit.read
ceilingobjectの配列はい16個以内の要素
ceiling[].resourceobjectはい—
ceiling[].resource.kindstringはい次のいずれか:repository
ceiling[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
ceiling[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read

レスポンス 200

フィールド型必須ルール
keyIdstring (uuid)はい—
targetAccountIdstring (uuid)はい—
enabledbooleanはい—
revisionintegerはい1~2147483647
actionsstringの配列はい7個以内の要素; 要素の重複なし; 各要素:次のいずれか:service-account.read, service-account.manage, policy.read, policy.manage, credential.read, credential.manage, service-audit.read
ceilingobjectの配列はい16個以内の要素
ceiling[].resourceobjectはい—
ceiling[].resource.kindstringはい次のいずれか:repository
ceiling[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
ceiling[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read

レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

例

bash
curl -X PUT "$ARKVORY_URL/api/v1/api-keys/$ID/delegations/$ACCOUNTID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"expectedRevision":0,"actions":["service-account.read"],"ceiling":[]}'

委任の撤回 ​

DELETE /api/v1/api-keys/{id}/delegations/{accountId}

アクセス: ブートストラップキー(インストールの回復キー) · 再試行: 想定するリビジョンを指定した場合のみ再試行(compare-and-swap)

キーidのaccountIdに対する委任を無効にします。JSONボディには、レコードの現在のリビジョンであるexpectedRevisionを含めます。レコードは、アクションを持たない無効なエントリとして、より高いリビジョンで残り、200で返されます。応答が失われた場合は、繰り返さずにlistServiceDelegationsで読み取ってください。古いリビジョンは409になるためです。委任先がすでに発行してアクティベートしたキーは引き続き動作するため、別途取り消すか、アカウントを無効にしてください。

パラメーター

名前場所型必須ルール
idパスstring (uuid)はい—
accountIdパスstring (uuid)はい—

リクエスト本文 (application/json)

フィールド型必須ルール
expectedRevisionintegerはい1~2147483646

レスポンス 200

フィールド型必須ルール
keyIdstring (uuid)はい—
targetAccountIdstring (uuid)はい—
enabledbooleanはい—
revisionintegerはい1~2147483647
actionsstringの配列はい7個以内の要素; 要素の重複なし; 各要素:次のいずれか:service-account.read, service-account.manage, policy.read, policy.manage, credential.read, credential.manage, service-audit.read
ceilingobjectの配列はい16個以内の要素
ceiling[].resourceobjectはい—
ceiling[].resource.kindstringはい次のいずれか:repository
ceiling[].resource.idstringはい^[a-z0-9][a-z0-9_-]{0,63}$に一致
ceiling[].actionsstringの配列はい1~24個の要素; 要素の重複なし; 各要素:次のいずれか:repository.read, storage.read, storage.manage, diagnostics.read, artifact.read, artifact.list, artifact.delete, artifact.promote, content.read, upload.create, upload.read, upload.write, upload.complete, upload.cancel, job.read, package.read, package.publish, asset.read, asset.write, asset.restore, annotation.read, annotation.write, reference.write, audit.read

レスポンス: 200, 400, 401, 403, 404, 405, 409, 413, 415, 422, 503, 507

例

bash
curl -X DELETE "$ARKVORY_URL/api/v1/api-keys/$ID/delegations/$ACCOUNTID" \
  -H "Authorization: Bearer $ARKVORY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"expectedRevision":1}'

Arkvory · ProAnimaStudio