akv-manager
v0.4.0
Published
Local web console to browse and manage Azure Key Vaults (secrets, keys, certificates, expiry) plus AKS monitoring (pods, logs, ingress, key-vault tracing) and Azure DevOps config sources (configmaps rendered from variable groups), using your own az login.
Maintainers
Readme
akv-manager
A local web console to browse and manage Azure Key Vaults — secrets, keys, certificates, and expiry — across every subscription you can see.
No credentials are stored or bundled. It calls az once to mint a short-lived
token (reusing your existing az login, so it respects MFA / conditional access) and
then talks to Azure's REST APIs directly. Every user runs it as their own Azure
identity, with exactly the permissions their az login grants. The server binds to
127.0.0.1 only — it is never exposed to the network.
Run it
npx akv-managerThat's it — it starts a local server, opens your browser, and uses whatever account
you're logged into with az. Prerequisites:
- Node.js ≥ 18
- Azure CLI (
az) installed and signed in (az login)
If you're not signed in, the UI tells you to run az login and press Refresh.
What you can do
Overview — accounts, subscriptions, and vault counts per environment.
Subscriptions — switch the active subscription.
Key Vaults — live Resource Graph sweep across every subscription you can read; filter, sort, see RBAC-vs-policy auth and SKU. Open a vault to inspect/edit its secrets, keys and certificates.
- reveal a secret value, create secrets (one or in batch with a common expiry), edit values (current value pre-filled), and batch enable/disable/set-expiry.
- batch delete secrets: tick several (or select all) and use Delete… in the
batch bar — confirmed by typing the vault name. On soft-delete vaults (the default)
the secrets become recoverable until their scheduled purge date; purging is not
exposed in this tool. Needs
secrets/delete(e.g. Key Vault Secrets Officer).
Expiry — scan every readable vault for secrets/certs that are expired or near expiry, plotted on a time horizon.
Clusters — read-only AKS monitoring: browse namespaces and pods, read pod logs and configmaps, all as your own
azidentity. Talks to the Kubernetes API directly (nokubectl/kubeloginneeded) via an AAD token for the managed AAD server app. Private API servers need you on the right network (e.g. corporate VPN); the UI flags it when a cluster is unreachable.Config sources: for workloads whose configmap is rendered by an Azure DevOps pipeline from variable groups, instead of read from Key Vault at runtime.
- In a pod's details, see every setting the deploy job overrides and the chain of
variables behind it. For example:
ConnectionStrings.Ordersis set by FileTransform from a variable in a shared groupapp-settings. Its value is$(OrdersDb), which an environment group defines as$(orders-db-connstr), a secret in a Key Vault-linked group. Each setting shows whether the source changed since the last deploy. - Edit a variable group value in place, or jump to the Key Vault secret for Key Vault-linked groups. Then queue the pipeline for that environment. The queue step needs a typed confirmation.
- Clusters → Config sources scans chosen namespaces and counts, per workload, the secret values that end up as plain text in configmaps. That list is the to-do list for moving them to Key Vault. Export it as JSON or CSV.
- In a pod's details, see every setting the deploy job overrides and the chain of
variables behind it. For example:
Config sources: how the trace works
The pod's image tag is the build number. The console finds that build in the Azure DevOps
projects you can read and parses the run's expanded YAML (build log 1). From that it picks
the deploy job for the pod's environment and reads the variable groups it links, in
precedence order. It then maps the settings that job overrides in appsettings.json:
FileTransform (a variable named after a setting path) and replace-tokens placeholders.
Finally it follows $(Var) references inside variable values until it reaches a plain
value, a secret variable, or a Key Vault.
What it can't see:
- Variables that come from somewhere other than a variable group. Some pipelines read a variables repo at run time. These show as "no source this job links".
- Classic (non-YAML) pipelines, and templates in GitHub repos.
- Values of secret variables. Azure DevOps never returns them, so drift for those shows as unknown.
Secret values never reach the browser. Drift for Key Vault-backed settings is compared on the local server, and only "in sync" or "changed" is returned.
Editing a variable group replaces the whole group through the REST API. The console
re-reads the group first and refuses the edit if someone changed it since you loaded it.
Secret variables are sent back as null, which Azure DevOps treats as "keep the stored
value". az pipelines variable-group variable update relies on the same behaviour.
Permissions, all checked by Azure DevOps against your own identity:
| To | You need | |---|---| | Trace | Build read (logs), Code read on the app repo, Reader on the variable groups | | Edit a value | Administrator role on that variable group | | Queue a run | Queue builds on the pipeline | | Drift for Key Vault-backed settings | Secrets get on the vault |
Set the organization in Settings → Azure DevOps, or start with AZBO_ADO_ORG. If the
org lives in a different tenant than your active account, set its tenant too. A common
case is a dev identity that reaches the clusters and a corporate identity that owns the org.
Configuring AKS clusters
Clusters you have ARM Reader on are auto-discovered. If you only have data-plane (Kubernetes-RBAC) access — common — list them yourself via either variable:
# inline JSON …
AZBO_AKS_CLUSTERS='[{"name":"my-aks","resourceGroup":"my-rg","subscription":"My Sub","env":"Dev","label":"My cluster"}]' npx akv-manager
# … or a file
AZBO_AKS_CLUSTERS_FILE=./aks-clusters.json npx akv-managerEach entry needs name, resourceGroup, subscription (name or id); env and
label are optional. The console never bundles any cluster list — it's yours to provide.
You can also paste the list in the UI instead of using a file: open Clusters →
✎ Edit cluster list, paste the same JSON array, and Save. It's kept in your browser's
localStorage and registered with the local server for the session — no file needed.
File/env clusters and pasted clusters are merged.
Configuration (all optional, via environment variables)
| Variable | Default | Purpose |
|---|---|---|
| PORT | 4173 | Port to listen on (auto-increments if busy). |
| HOST | 127.0.0.1 | Bind address. Keep it local. |
| AZBO_NO_OPEN | — | Set to anything to skip auto-opening the browser. |
| AZBO_TITLE | Keyvault Console | Custom title shown in the sidebar. |
| AZBO_ENV_RULES | — | JSON [["pattern","Label"], …] mapping subscription-name patterns to environment labels. |
| AZBO_PROTECTED_TAGS | governance set | Comma-separated tag names that are read-only in the UI (* = prefix wildcard). Set empty to disable. |
| AZBO_DEFAULT_FACETS | — | JSON object of tag filters pre-selected on the Key Vaults list, e.g. {"roles":"app"}. |
| AZBO_AKS_CLUSTERS | — | JSON array of {name,resourceGroup,subscription,env?,label?} clusters to monitor. |
| AZBO_AKS_CLUSTERS_FILE | — | Path to a JSON file with the same cluster array. |
| AZBO_ADO_ORG | — | Azure DevOps organization for Config sources (dev.azure.com/<org>). Settings in the UI override it. |
| AZBO_ADO_TENANT | — | Tenant id that owns the org, when it differs from the active account's tenant. |
| AZ_PATH | az | Path to the Azure CLI binary. |
| AZ_TIMEOUT | 120000 | Per-az-call timeout (ms). |
By default environments are inferred from common keywords (dev, test, qa,
stage, uat, prod, sandbox). If your subscription names use a different
convention, map them yourself, e.g.:
AZBO_ENV_RULES='[["-prd-","Prod"],["-dev-","Dev"],["-tst-","Test"]]' npx akv-managerNotes on access
- Seeing a vault in the list is management-plane visibility. Reading its secrets is a separate data-plane permission — the UI shows 🔒 when you lack it.
- Some vaults restrict access by IP firewall. If you're off the corporate VPN you may be blocked at the network layer — the UI flags this as 🚫 firewall / VPN, not a permission problem.
- Write actions (create/edit/enable/disable) only succeed where you have write permission; failures are reported per item.
- Delete is a distinct permission from write: an identity that can
Setsecrets may still be refusedDelete. Deleted secrets stop resolving immediately, so anything reading them (AKS CSI mounts, running apps) breaks at once.
Publishing (for maintainers)
npm publish # name must be available on the registry you publish toUntil then you can run it straight from a tarball or git:
npm pack # produces akv-manager-x.y.z.tgz
npx ./akv-manager-1.0.0.tgz # or: npx <git-url>License
MIT © Thomaz Capra
