Λογότυπο Centralized Secrets Management Vault Integration

Centralized Secrets Management Vault Integration

Κοινότητα
HimanshuJ16
centralized-secrets-management-vault-integration

Χρησιμοποιήστε το όταν μια διαδικασία συναλλαγών πρέπει να αντλεί κατά την εκτέλεση κλειδιά API χρηματιστηρίων ή διαπιστευτήρια βάσης δεδομένων από το HashiCorp Vault αντί από αρχείο .env. Περιλαμβάνει σύνδεση AppRole, αναγνώσεις KV v2, ρητό χειρισμό της διάρκειας ισχύος token και τοπική προσωρινή μνήμη με καθορισμένο όριο.

Επισκόπηση

ΕκδότηςHimanshuJ16
ΑποθετήριοAlgo-Trading-Skills
Όνομα δεξιότηταςcentralized-secrets-management-vault-integration
Αστέρια
50
Διακλαδώσεις
7
Συνοδευτικά αρχεία
5
Άδεια χρήσηςApache-2.0
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • Συνοδευτικά αρχεία: 5

    Αρχεία script, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε στο GitHub από τον λογαριασμό HimanshuJ16. Ελέγξτε τα αρχεία της δεξιότητας στο αποθετήριο πριν την εγκαταστήσετε.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Centralized Secrets Management Vault Integration στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/centralized-secrets-management-vault-integration
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Προσθήκη δεξιότητας → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που υποστηρίζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

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
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Centralized Secrets Management Vault Integration σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Centralized Secrets Management Vault Integration μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι οδηγίες σε απλό κείμενο Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Centralized Secrets Management Vault Integration δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλο κατά τη διάρκεια της συνομιλίας

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

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

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Centralized Secrets Management Vault Integration;

Χρησιμοποιήστε το όταν μια διαδικασία συναλλαγών πρέπει να αντλεί κατά την εκτέλεση κλειδιά API χρηματιστηρίων ή διαπιστευτήρια βάσης δεδομένων από το HashiCorp Vault αντί από αρχείο .env. Περιλαμβάνει σύνδεση AppRole, αναγνώσεις KV v2, ρητό χειρισμό της διάρκειας ισχύος token και τοπική προσωρινή μνήμη με καθορισμένο όριο.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Centralized Secrets Management Vault Integration στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Centralized Secrets Management Vault Integration είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη δεξιότητα Centralized Secrets Management Vault Integration στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε τη διεύθυνση https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/centralized-secrets-management-vault-integration. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Centralized Secrets Management Vault Integration;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη δεξιότητα Centralized Secrets Management Vault Integration;

Με όσα θέλετε. Στο TypingMind μπορείτε να χρησιμοποιήσετε τη δεξιότητα Centralized Secrets Management Vault Integration με οποιοδήποτε μοντέλο υποστηρίζει δεξιότητες, όπως τα GPT, Claude, Gemini, Grok, DeepSeek, Mistral και Llama, χρησιμοποιώντας τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Centralized Secrets Management Vault Integration;

Ναι. Δημοσιεύεται στο GitHub από τον λογαριασμό HimanshuJ16 με την άδεια χρήσης Apache-2.0. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Δημιουργήστε τώρα τον δικό σας χώρο εργασίας AI

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇