Skip to content

OpenBao token audit: discover and rationalize remaining static tokens #244

@cwage

Description

@cwage

Problem

Post-NixOS migration, almost all automation paths use openbao-agent's CIDR-bound AppRole flow, which mints fresh tokens on demand. But there are likely some static long-lived tokens still floating around — operational tokens, break-glass tokens, possibly stale ones from migration-era one-offs. Today there's no visibility into:

  • What tokens exist in the OpenBao token store
  • Which are close to TTL expiry (and would expire silently)
  • Whether any could be AppRole-ified instead

Proposed approach

One-shot interactive audit (not yet automation):

  1. List token accessors: bao list auth/token/accessors
  2. For each accessor: bao token lookup -accessor=<id> to get policies, display name, TTL, creation time
  3. Capture in a table: token name, policies, TTL remaining, what it's used for (if known)
  4. Decide per-token:
    • Delete if stale
    • AppRole-ify if it's a service-account use case
    • Keep as static if there's a real reason (and document why)

After the one-shot pass, decide whether ongoing audit automation is worth building (likely yes if there are >3 surviving static tokens; probably no if there are 0–2).

Acceptance criteria

  • One-shot audit run, results captured (in this issue or in docs/)
  • Stale tokens deleted
  • AppRole-eligible tokens migrated
  • Decision recorded: automate ongoing audit, or skip

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions