키 인증 - 암호화 플러그인 OpenAPI 사양
키 인증 - 암호화 플러그인 OpenAPI 사양 (Key Authentication - Encrypted Plugin OpenAPI Specification)
이 문서는 Kong의 Key Auth Encrypted(key-auth-enc) 플러그인 API를 OpenAPI 3.0.2 형식으로 정의한 사양이에요. 이 플러그인은 서비스에 암호화된 API 키 인증을 추가해 주는데, 문서에서는 컨슈머별 암호화 키 자격 증명을 조회, 생성, 수정, 삭제하는 엔드포인트를 확인할 수 있어요. 각 엔드포인트의 파라미터와 요청 본문, 응답 스키마가 자세히 정리되어 있으니 API 연동이나 자동화 작업을 할 때 참고하면 좋아요.
출처: 문서
본문
---
openapi: 3.0.2
info:
title: Key Auth Encrypted Plugin API
version: 1.0.0
description: 'The Key Auth Encrypted (`key-auth-enc`) plugin adds encrypted API
key authentication to services.
'
tags:
- name: KeyAuthEnc
description: Manage encrypted key credentials for API key authentication.
paths:
"/consumers/{ConsumerUsernameOrId}/key-auths-enc":
get:
summary: List encrypted key credentials for a consumer
tags:
- KeyAuthEnc
parameters:
- "$ref": "#/components/parameters/ConsumerUsernameOrId"
responses:
'200':
description: List of credentials
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
"$ref": "#/components/schemas/KeyAuthEncCredential"
post:
summary: Create encrypted key credential for a consumer
tags:
- KeyAuthEnc
parameters:
- "$ref": "#/components/parameters/ConsumerUsernameOrId"
requestBody:
required: true
content:
application/json:
schema:
"$ref": "#/components/schemas/KeyAuthEncCredentialRequest"
responses:
'201':
description: Credential created
content:
application/json:
schema:
"$ref": "#/components/schemas/KeyAuthEncCredential"
"/consumers/{ConsumerUsernameOrId}/key-auths-enc/{CredentialId}":
get:
summary: Get encrypted key credential
tags:
- KeyAuthEnc
parameters:
- "$ref": "#/components/parameters/ConsumerUsernameOrId"
- "$ref": "#/components/parameters/CredentialId"
responses:
'200':
description: Credential retrieved
content:
application/json:
schema:
"$ref": "#/components/schemas/KeyAuthEncCredential"
patch:
summary: Update encrypted key credential
tags:
- KeyAuthEnc
parameters:
- "$ref": "#/components/parameters/ConsumerUsernameOrId"
- "$ref": "#/components/parameters/CredentialId"
requestBody:
required: true
content:
application/json:
schema:
"$ref": "#/components/schemas/KeyAuthEncCredentialRequest"
responses:
'200':
description: Credential updated
content:
application/json:
schema:
"$ref": "#/components/schemas/KeyAuthEncCredential"
delete:
summary: Delete encrypted key credential
tags:
- KeyAuthEnc
parameters:
- "$ref": "#/components/parameters/ConsumerUsernameOrId"
- "$ref": "#/components/parameters/CredentialId"
responses:
'204':
description: Deleted
components:
parameters:
ConsumerUsernameOrId:
name: ConsumerUsernameOrId
in: path
required: true
schema:
type: string
description: ID or username of the consumer.
CredentialId:
name: CredentialId
in: path
required: true
schema:
type: string
format: uuid
description: ID of the encrypted credential.
schemas:
KeyAuthEncCredential:
type: object
properties:
id:
type: string
format: uuid
created_at:
type: integer
format: int64
key:
type: string
description: Encrypted key credential.
tags:
type: array
items:
type: string
consumer:
type: string
format: uuid
description: ID of the associated consumer.
required:
- id
- key
- consumer
KeyAuthEncCredentialRequest:
type: object
properties:
key:
type: string
description: Optional. If omitted, a key will be auto-generated and encrypted.
tags:
type: array
items:
type: string
required: []
관련 리소스
더 알아보기 (Learn more)
- 키 인증 플러그인의 기본 개념과 설정 방법을 담은 문서예요 — Key Authentication plugin
- Kong Gateway 서비스에 암호화된 키 인증을 실제로 적용하는 방법을 단계별로 안내해요 — Enable key authentication on a Gateway Service with Kong Gateway
- API 키 암호화의 기반이 되는 키링 설정 방법을 설명해요 — Keyring