コンテンツにスキップ
Kong Logo | Kong Docs Logo
  • ドキュメント
    • API仕様を確認する
      View all API Specs すべてのAPI仕様を表示 View all API Specs arrow image
    • ドキュメンテーション
      API Specs
      Kong Gateway
      軽量、高速、柔軟なクラウドネイティブAPIゲートウェイ
      Kong Konnect
      SaaSのエンドツーエンド接続のための単一プラットフォーム
      Kong AI Gateway
      GenAI インフラストラクチャ向けマルチ LLM AI Gateway
      Kong Mesh
      Kuma と Envoy をベースにしたエンタープライズサービスメッシュ
      decK
      Kongの構成を宣言型で管理する上で役立ちます
      Kong Ingress Controller
      Kubernetesクラスタ内で動作し、Kongをプロキシトラフィックに設定する
      Kong Gateway Operator
      YAMLマニフェストを使用してKubernetes上のKongデプロイメントを管理する
      Insomnia
      コラボレーティブAPI開発プラットフォーム
  • Plugin Hub
    • Plugin Hubを探索する
      View all plugins すべてのプラグインを表示 View all plugins arrow image
    • 機能性 すべて表示 View all arrow image
      すべてのプラグインを表示
      AI's icon
      AI
      マルチ LLM AI Gatewayプラグインを使用してAIトラフィックを管理、保護、制御する
      認証's icon
      認証
      認証レイヤーでサービスを保護する
      セキュリティ's icon
      セキュリティ
      追加のセキュリティレイヤーでサービスを保護する
      トラフィック制御's icon
      トラフィック制御
      インバウンドおよびアウトバウンドAPIトラフィックの管理、スロットル、制限
      サーバーレス's icon
      サーバーレス
      他のプラグインと組み合わせてサーバーレス関数を呼び出します
      分析と監視's icon
      分析と監視
      APIとマイクロサービストラフィックを視覚化、検査、監視
      変革's icon
      変革
      Kongでリクエストとレスポンスをその場で変換
      ログ記録's icon
      ログ記録
      インフラストラクチャに最適なトランスポートを使用して、リクエストと応答データをログに記録します
  • サポート
  • コミュニティ
  • Kongアカデミー
デモを見る 無料トライアルを開始
decK
  • Home icon
  • decK
  • Gateway
  • Managing Sensitive Data
report-issue問題を報告する
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • ドキュメント投稿ガイドライン
  • Introduction
    • Overview
    • Configuration Options
    • Support Policy
    • Security Policy
  • Changelog
  • Installation
    • Overview
    • Binary
    • Docker
    • GitHub Actions
  • Get Started
  • Managing Kong Gateway
    • Overview
    • Konnect Configuration
    • Configure Authentication
    • Ping
    • Backup
    • Diff
    • Sync
    • Apply
    • Reset
    • Validate
    • RBAC
    • Workspaces
    • Tags
    • De-duplicate Plugin Configuration
    • Object Defaults
    • Sensitive Data
  • decK Files
    • Overview
    • Config Generation
      • openapi2kong
      • kong2kic
      • kong2tf
    • Linting
    • File Manipulation
      • Overview
      • Update Values
      • Plugins
      • Tags
      • Namespace
    • Combining Files
      • Merge
      • Render
    • Validate
    • Convert
  • APIOps
    • Overview
    • Continuous Integration
    • Federated Config
  • Reference
    • Entities
    • FAQ
    • Gateway 3.0 Upgrade
    • Environment Variables
enterprise-switcher-icon 次に切り替える: OSS
On this pageOn this page
  • Configuring Kong vaults
    • Why split out vault configuration?
    • How should I manage my vault configuration with decK?
  • Manage vaults with distributed configuration
  • Using decK environment variables

このページは、まだ日本語ではご利用いただけません。翻訳中です。

Managing Sensitive Data

Hardcoding sensitive information in your declarative configuration files is not recommended. decK provides two options to avoid this anti-pattern:

  1. Configure and use vaults with Kong Gateway.
  2. Read environment variables when running decK commands.

Configuring Kong vaults

decK provides full support for managing Kong Gateway vaults declaratively.

_format_version: "3.0"
vaults:
- name: hcv
  description: My custom HashiCorp Vault
  prefix: my-hcv
  config:
    host: "localhost"
    kv: "v2"
    mount: "secret"
    port: 8200
    protocol: "https"
    token: "PUT_YOUR_TOKEN_HERE"

When managing vaults with declarative configuration, you need to take certain precautions. For larger teams with many contributors, or organizations with multiple teams, we recommend splitting vault configuration and managing it separately.

Why split out vault configuration?

  • Vault are closer to infrastructure than other Kong Gateway configurations. Separation of routing policies from infrastructure-specific configurations helps keep configuration organized.
  • Vaults may be shared across teams. In this case, one specific team shouldn’t control the vault’s configuration. One team changing the vault can have disastrous impact on another team.
  • If a vault is deleted while in use – that is, if there are still references to secrets in a vault in configuration – it can lead to total loss of proxy capabilities. Those secrets would be unrecoverable.

How should I manage my vault configuration with decK?

To keep your environment secure and avoid taking down your proxies by accident, make sure to:

  • Manage vaults with distributed configuration via tags.
  • Use a separate RBAC role, user, and token to manage vaults. Don’t use a generic admin user.
  • Set up a separate CI pipeline for vaults.

Manage vaults with distributed configuration

Avoid mixing vault configuration with other Kong Gateway entities. Instead, manage vaults with distributed configuration via select_tags.

_format_version: "3.0"
_info:
  select_tags:
    - sensitive-vaults
vaults:
- name: hcv
  description: My custom HashiCorp Vault
  prefix: my-hcv
  config:
    host: "localhost"
    kv: "v2"
    mount: "secret"
    port: 8200
    protocol: "https"
    token: "PUT_YOUR_TOKEN_HERE"

Using decK environment variables

In the example above, the token used to unseal the HashiCorp Vault is stored in plain text in the declarative configuration file.

decK can read environment variables at runtime, allowing you to pass sensitive information when the sync is being executed.

The token will still be visible in plain text to anyone that can read the /vaults entity on the Admin API.

To allow decK to read environment variables, reference them as ${{ env "DECK_*" }} in your state file.

The following example updates the Vault configuration above to use a decK environment variable:

_format_version: "3.0"
_info:
  select_tags:
    - sensitive-vaults
vaults:
- name: hcv
  description: My custom HashiCorp Vault
  prefix: my-hcv
  config:
    host: "localhost"
    kv: "v2"
    mount: "secret"
    port: 8200
    protocol: "https"
    token: ${{ env "DECK_HCV_TOKEN" }}

To test, set the DECK_HCV_TOKEN environment variable and run deck gateway sync:

export DECK_HCV_TOKEN="TOKEN_GOES_HERE"
deck gateway sync kong.yaml
Thank you for your feedback.
Was this page useful?
情報が多すぎる場合 close cta icon
Kong Konnectを使用すると、より多くの機能とより少ないインフラストラクチャを実現できます。月額1Mリクエストが無料。
無料でお試しください
  • Kong
    APIの世界を動かす

    APIマネジメント、サービスメッシュ、イングレスコントローラーの統合プラットフォームにより、開発者の生産性、セキュリティ、パフォーマンスを大幅に向上します。

    • 製品
      • Kong Konnect
      • Kong Gateway Enterprise
      • Kong Gateway
      • Kong Mesh
      • Kong Ingress Controller
      • Kong Insomnia
      • 製品アップデート
      • 始める
    • ドキュメンテーション
      • Kong Konnectドキュメント
      • Kong Gatewayドキュメント
      • Kong Meshドキュメント
      • Kong Insomniaドキュメント
      • Kong Konnect Plugin Hub
    • オープンソース
      • Kong Gateway
      • Kuma
      • Insomnia
      • Kongコミュニティ
    • 会社概要
      • Kongについて
      • お客様
      • キャリア
      • プレス
      • イベント
      • お問い合わせ
  • 利用規約• プライバシー• 信頼とコンプライアンス
© Kong Inc. 2025