볼트 인증 플러그인 OpenAPI 명세
볼트 인증 플러그인 OpenAPI 명세 (Vault Authentication Plugin OpenAPI Specification)
이 문서는 Kong에서 Vault 기반 인증 자격 증명을 관리하기 위한 API 명세예요. Vault 객체를 조회하고 생성하는 엔드포인트를 정의하고 있으며, OpenAPI 3.0.2 형식으로 작성되었어요. Admin API를 통해 사용할 수 있어서 실제 연동에 바로 참고할 수 있답니다요.
출처: 문서
본문
---
openapi: 3.0.2
info:
title: Vault Auth API
version: 1.0.0
description: API for managing Vault-based authentication credentials in Kong.
contact:
email: docs@konghq.com
name: Kong Inc
url: https://konghq.com
externalDocs:
description: Vault Authentication Plugin API Specification
url: https://developer.konghq.com
servers:
- description: Default Admin API URL
url: "{protocol}://{hostname}:{port}{path}"
variables:
hostname:
default: localhost
description: Hostname for Kong's Admin API
path:
default: "/"
description: Base path for Kong's Admin API
port:
default: '8001'
description: Port for Kong's Admin API
protocol:
default: http
description: Protocol for requests to Kong's Admin API
enum:
- http
- https
security:
- personalAccessToken: []
paths:
"/vault-auth":
get:
summary: List Vault objects
operationId: listVaults
description: Retrieves a list of all configured Vault objects.
responses:
'200':
description: List of Vault objects.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
"$ref": "#/components/schemas/Vault"
'500':
description: Internal server error.
tags:
- Vault Auth
post:
summary: Create a Vault object
operationId: createVault
description: Creates a Vault object that defines a connection to a HashiCorp
Vault server.
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
name:
type: string
description: A unique name for the Vault object.
mount:
type: string
description: The mount path of the Vault secrets engine.
protocol:
type: string
enum:
- http
- https
description: The protocol used to communicate with the Vault server.
host:
type: string
description: The host of the Vault server.
port:
type: integer
description: The port of the Vault server.
vault_token:
type: string
description: The authentication token used to access Vault.
kv:
type: string
enum:
- v1
- v2
description: The KV secrets engine version to use.
required:
- name
- mount
- protocol
- host
- port
- vault_token
responses:
'201':
description: Vault object successfully created.
content:
application/json:
schema:
"$ref": "#/components/schemas/Vault"
'400':
description: Invalid request.
'500':
description: Internal server error.
tags:
- Vault Auth
"/vault-auth/{id}":
get:
summary: Retrieve a Vault object
operationId: getVault
description: Retrieves a specific Vault object by its ID.
parameters:
- name: id
in: path
required: true
description: The ID of the Vault object.
schema:
type: string
responses:
'200':
description: Vault object retrieved successfully.
content:
application/json:
schema:
"$ref": "#/components/schemas/Vault"
'404':
description: Vault object not found.
'500':
description: Internal server error.
tags:
- Vault Auth
delete:
summary: Delete a Vault object
operationId: deleteVault
description: Deletes a Vault object by its ID.
parameters:
- name: id
in: path
required: true
description: The ID of the Vault object.
schema:
type: string
responses:
'204':
description: Vault object deleted successfully.
'404':
description: Vault object not found.
'500':
description: Internal server error.
tags:
- Vault Auth
"/vault-auth/{vault}/credentials":
get:
operationId: listVaultCredentials
summary: List Vault Credentials
description: Retrieves all stored credentials for a given Vault instance.
parameters:
- name: vault
in: path
required: true
description: The ID or name of the Vault instance.
schema:
type: string
responses:
'200':
description: List of stored credentials.
'404':
description: Vault instance not found.
'500':
description: Internal server error.
tags:
- Vault Auth
post:
operationId: createVaultCredential
summary: Create Vault Credential
description: Creates a new Vault credential for a consumer.
parameters:
- name: vault
in: path
required: true
description: The ID or name of the Vault instance.
schema:
type: string
requestBody:
required: true
description: Vault credential details.
content:
application/json:
schema:
type: object
properties:
consumer:
type: string
description: The username or ID of the consumer.
access_token:
type: string
description: The access token for the Vault credential.
required:
- consumer
- access_token
responses:
'201':
description: Credential successfully created.
'400':
description: Invalid request (e.g., missing consumer).
'404':
description: Vault instance or consumer not found.
'500':
description: Internal server error.
tags:
- Vault Auth
"/vault-auth/{vault}/credentials/{consumer}":
post:
operationId: upsertVaultCredential
summary: Upsert Vault Credential for a Consumer
description: Creates or updates a Vault credential for a specific consumer.
parameters:
- name: vault
in: path
required: true
description: The ID or name of the Vault instance.
schema:
type: string
- name: consumer
in: path
required: true
description: The username or ID of the consumer.
schema:
type: string
requestBody:
required: true
description: Vault credential details.
content:
application/json:
schema:
type: object
properties:
access_token:
type: string
description: The access token for the Vault credential.
required:
- access_token
responses:
'201':
description: Credential successfully created or updated.
'400':
description: Invalid request (e.g., missing consumer).
'404':
description: Vault instance or consumer not found.
'500':
description: Internal server error.
tags:
- Vault Auth
"/vault-auth/{vault}/credentials/token/{access_token}":
get:
operationId: getVaultCredential
summary: Retrieve a Vault Credential by Access Token
description: Fetches a Vault credential using the access token.
parameters:
- name: vault
in: path
required: true
description: The ID or name of the Vault instance.
schema:
type: string
- name: access_token
in: path
required: true
description: The access token of the Vault credential.
schema:
type: string
responses:
'200':
description: Credential found.
'404':
description: Credential not found.
'500':
description: Internal server error.
tags:
- Vault Auth
delete:
operationId: deleteVaultCredential
summary: Delete a Vault Credential by Access Token
description: Deletes a Vault credential associated with a given access token.
parameters:
- name: vault
in: path
required: true
description: The ID or name of the Vault instance.
schema:
type: string
- name: access_token
in: path
required: true
description: The access token of the Vault credential.
schema:
type: string
responses:
'204':
description: Credential successfully deleted.
'404':
description: Credential not found.
'500':
description: Internal server error.
tags:
- Vault Auth
tags:
- name: Vault Auth
description: API endpoints for managing Vault-based authentication credentials in
Kong.
components:
securitySchemes:
personalAccessToken:
type: http
scheme: bearer
bearerFormat: Token
schemas:
Vault:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
mount:
type: string
protocol:
type: string
enum:
- http
- https
host:
type: string
port:
type: integer
vault_token:
type: string
kv:
type: string
enum:
- v1
- v2
created_at:
type: integer
format: int64
updated_at:
type: integer
format: int64
관련 리소스
더 알아보기 (Learn more)
- Kong 게이트웨이에서 Vault 인증을 활성화하는 방법 — Enable authentication with Vault in Kong Gateway
- Kong 게이트웨이의 인증 개요 — Authentication in Kong Gateway
- HashiCorp Vault를 볼트 백엔드로 구성하는 방법 — Configure HashiCorp Vault as a vault backend