Logo von Centralized Secrets Management Vault Integration

Centralized Secrets Management Vault Integration

Community
HimanshuJ16
centralized-secrets-management-vault-integration

Verwenden Sie diesen Skill, wenn ein Handelsprozess zur Laufzeit API-Schlüssel einer Börse oder Datenbankzugangsdaten aus HashiCorp Vault statt aus einer .env-Datei abrufen soll. Er umfasst die AppRole-Anmeldung, KV-v2-Lesezugriffe, die explizite Behandlung der Token-TTL und einen begrenzten lokalen Cache.

Übersicht

HerausgeberHimanshuJ16
RepositoryAlgo-Trading-Skills
Skill-Namecentralized-secrets-management-vault-integration
Sterne
50
Forks
7
Mitgelieferte Dateien
5
LizenzApache-2.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 5

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von HimanshuJ16 auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Centralized Secrets Management Vault Integration in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/centralized-secrets-management-vault-integration
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/centralized-secrets-management-vault-integration .claude/skills/centralized-secrets-management-vault-integration
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Centralized Secrets Management Vault Integration in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Centralized Secrets Management Vault Integration automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Centralized Secrets Management Vault Integration nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

When to Use

Invoke this skill when a trading process needs live exchange or database credentials at runtime and you want them to come from Vault rather than a .env file, a config blob, or the process image. VaultSecretsManager covers the client half of the AppRole workflow:

  1. Login — POST auth/approle/login with a RoleID and SecretID, recording the returned lease_duration, renewable, and accessor.
  2. Read — GET {mount}/data/{path} (KV v2), returning a SecretBundle that carries the values plus metadata.version so a caller can see when a secret was rotated.
  3. Hold — a TTL-bounded cache so the process does not read Vault on every order, and an explicit token lifetime so the token is renewed (or the process re-authenticates) before a read fails.

The design assumption throughout is a long-lived process: a bot that boots once and runs for days. That is precisely the case where a naive client breaks — its token silently passes max TTL, or its unbounded cache keeps feeding a credential the security team revoked hours ago.

When NOT to Use

  • You need Vault configured, not read. Policies, AppRole provisioning, SecretID delivery, and audit-device setup are operator work; see references/workflows.md. This module authenticates and reads, nothing else.
  • You expect the client to be the access-control boundary. It is not. The environment guard rejects a malformed or wrong-environment path string before it leaves the process; it cannot constrain a token whose Vault policy is too broad. If the policy grants secret/data/*, this class will happily read whatever you ask it for inside its own environment prefix.
  • You are rotating a credential, not fetching one. The hot-swap, dual-credential overlap, and revocation sequence belong to secrets-rotation-without-bot-downtime. This skill's contribution to rotation is bounding staleness: cache_ttl and invalidate().
  • You are auditing what a key is permitted to do at the broker. That is api-key-least-privilege-audit-tool.
  • The secret must never exist in process memory. Vault KV hands you plaintext. For keys that must not leave a boundary, the operation must move to the key — see hardware-security-module-hsm-for-signing-keys.
  • You need Vault's dynamic secrets or leases. This client reads static KV v2 and does not track or renew secret leases; dynamic database credentials need lease renewal and revocation logic this module does not implement.

Prerequisites

  • A reachable Vault server over HTTPS. HttpVaultTransport refuses http:// unless allow_insecure_http=True, because the token and every secret would otherwise cross the network in clear text.
  • A KV v2 mount ({mount}/data/{path} reads). KV v1 has no data/metadata envelope and this client will not parse it.
  • An AppRole whose policy is scoped to exactly the paths this process needs, and whose RoleID and SecretID arrive by different channels — HashiCorp's AppRole guidance treats delivering both together as an anti-pattern, and recommends response-wrapping the SecretID with secret_id_num_uses=1.
  • A decision, made before deployment, about what happens when the SecretID is spent: with secret_id_num_uses=1, re-login after max TTL fails permanently and an orchestrator must deliver a fresh wrapped SecretID.
  • Python 3.10+. No third-party package required; hvac can be substituted behind the VaultTransport protocol.

Workflow

  1. Construct with the environment this process owns. VaultSecretsManager("https://vault.internal:8200", "prod", mount="secret"). The environment is a single path segment and every read must begin with it.
  2. Log in at boot, once. login_approle(role_id, secret_id). Both credentials are retained in memory so the process can re-authenticate unattended; if that is unacceptable in your threat model, call logout() after the last read and accept that the process cannot recover from token expiry on its own.
  3. Classify a login failure before reacting to it. A rejected SecretID raises VaultCredentialExhausted — Vault expires a SecretID by secret_id_ttl and by secret_id_num_uses, so retrying cannot succeed and the orchestrator must issue a new one. A 429 or 5xx raises VaultTransportError, which is worth a backed-off retry. Never wrap login in an unbounded retry loop: a spent SecretID would spin forever.
  4. Read secrets by path. get_secret("prod/binance/market-maker") returns a SecretBundle. Hand it to the exchange client with bundle.as_dict() — an explicit call, so the plaintext never appears by accident.
  5. Distinguish the three failure modes on a read. VaultPathViolation is your own bug (wrong environment, traversal, malformed path) and never reached the network. VaultSecretNotFound means Vault answered 404 — which means the path is absent or invisible to this policy or soft-deleted; check the policy before concluding the secret is missing. VaultPermissionDenied means a freshly issued token was still refused, i.e. the policy genuinely forbids the path.
  6. Let the manager handle the token. Each read checks the remaining TTL and, inside renew_margin, renews via auth/token/renew-self. When renewal stops buying headroom the token has hit its max TTL, which renewal cannot extend, so the manager re-authenticates via AppRole exactly once. A 403 on a read likewise triggers exactly one re-login before the error is raised — bounded, never a loop.
  7. Bound staleness deliberately. cache_ttl (default 300s) is the maximum time this process can keep using a credential that has since been rotated. On a rotation notification, call invalidate(path) rather than waiting out the TTL.
  8. Decide the outage policy. With stale_if_error=True (default) a Vault outage lets the process keep trading on its last known credentials; with False a read raises instead. Choose consciously — the safe answer differs for a market maker holding inventory and for a batch job.

Full procedure: see references/workflows.md. Standards reference: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Treating the client's environment check as the security control. A client-side prefix test is defence in depth against a bad path string. If the AppRole's Vault policy is broad, nothing in this module narrows it. Scope the policy; verify it with sys/capabilities-self.
  • Enforcing the prefix with startswith("prod/"). "prod/../dev/binance" passes that test. The guard here splits into segments and rejects ., .., empty segments, and anything outside a conservative character allowlist.
  • Reading the token's expiry as "the bot is authenticated forever". AppRole tokens carry a TTL and a max TTL, and renewal cannot extend past the max (https://developer.hashicorp.com/vault/docs/concepts/tokens). A bot that logs in at boot and never checks will take a 403 at an unpredictable moment — typically the first read after a rotation, i.e. exactly when it needs to work.
  • Caching a secret with no expiry. The original failure mode this module was written against: security rotates and revokes an exchange key, the bot holds the old value in memory indefinitely, and the first symptom is a wall of broker 401s mid-session. cache_ttl bounds it; invalidate() short-circuits it.
  • Reading interpretation into a 404. Vault documents 404 as "invalid path. This can both mean that the path truly doesn't exist or that you don't have permission to view a specific path" (https://developer.hashicorp.com/vault/api-docs). Do not respond by creating the secret — you may be papering over a policy gap. And a KV v2 path whose latest version was soft-deleted also answers 404, with data: null and a deletion_time in the metadata.
  • Retrying a rejected login. A spent secret_id_num_uses or an expired secret_id_ttl will never recover on retry. Distinguish it (VaultCredentialExhausted) from a transport failure and escalate to the orchestrator instead of looping.
  • Shipping RoleID and SecretID together. Injecting both as environment variables from the same CI job collapses AppRole to a single shared password. HashiCorp's recommended pattern delivers the SecretID response-wrapped, single-use, and ideally CIDR-bound.
  • Logging the config object. print(exchange.config) and a traceback holding the credential dict leak just as effectively as a hardcoded key. SecretBundle prints key names only; as_dict() is the deliberate escape hatch.
  • Re-reading Vault on every order. Vault Community Edition supports rate-limit quotas, which answer 429 when exceeded (https://developer.hashicorp.com/vault/docs/concepts/resource-quotas). Read at boot, cache with a TTL, and refresh on rotation.

Verification

  • python -m unittest discover -s skills/centralized-secrets-management-vault-integration/scripts runs the suite. It drives the manager through InMemoryVaultTransport, a deterministic double that reproduces Vault's 404-for-invisible-paths behaviour, soft-deleted KV v2 versions, token TTL/max TTL, and single-use SecretIDs.
  • Regression checks worth reading before trusting a change: traversal out of the environment (prod/../dev/...), a rotated secret being picked up once cache_ttl expires, re-login on max TTL, permanent failure on a spent SecretID, and repr of both SecretBundle and VaultSecretsManager containing no secret material.
  • Against a real Vault, confirm the policy — not the client — is the boundary: with the bot's own token, attempt a read one environment across (vault kv get secret/dev/... from a prod AppRole) and confirm Vault refuses it.
  • Verify the audit device records the read, and that the recorded request contains the path but no plaintext value.

Related Skills

  • secrets-rotation-without-bot-downtime
  • api-key-least-privilege-audit-tool
  • sandbox-credential-leakage-prevention
  • hardware-security-module-hsm-for-signing-keys
  • structured-logging-for-post-incident-forensics

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Centralized Secrets Management Vault Integration?

Verwenden Sie diesen Skill, wenn ein Handelsprozess zur Laufzeit API-Schlüssel einer Börse oder Datenbankzugangsdaten aus HashiCorp Vault statt aus einer .env-Datei abrufen soll. Er umfasst die AppRole-Anmeldung, KV-v2-Lesezugriffe, die explizite Behandlung der Token-TTL und einen begrenzten lokalen Cache.

Warum Centralized Secrets Management Vault Integration in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Centralized Secrets Management Vault Integration besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Centralized Secrets Management Vault Integration in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/centralized-secrets-management-vault-integration ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Centralized Secrets Management Vault Integration nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Centralized Secrets Management Vault Integration verwenden?

So viele Sie möchten. In TypingMind können Sie Centralized Secrets Management Vault Integration mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Centralized Secrets Management Vault Integration kostenlos?

Ja. Der Skill wird von HimanshuJ16 auf GitHub unter der Lizenz Apache-2.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇