Skip to content

also print 'BAO_...' env variables#15

Merged
cipherboy merged 1 commit into
openbao:mainfrom
adfinis-forks:print-bao-env
Apr 28, 2026
Merged

also print 'BAO_...' env variables#15
cipherboy merged 1 commit into
openbao:mainfrom
adfinis-forks:print-bao-env

Conversation

@phil9909
Copy link
Copy Markdown
Contributor

Following the steps in the readme did not work for me, because I had a BAO_TOKEN and BAO_ADDR set in my env and . <(devbao node env prod) will only set the VAULT_... env vars.

bao secrets list will prefer the BAO_ vars and only fall back to VAULT_ if they are not present.

My proposed solution: Just print them both, this way we keep compatibility with the vault cli.


In case you are wondering, I have this in my .bashrc:

export BAO_ADDR='http://127.0.0.1:8200'
export BAO_TOKEN='root'
alias baodev='bao server -dev -dev-root-token-id=root'

which is quite handy for quick testing

Signed-off-by: Philipp Stehle <philipp.stehle@secretz.io>
@phil9909 phil9909 requested review from a team as code owners April 22, 2026 12:17
@satoqz
Copy link
Copy Markdown
Member

satoqz commented Apr 22, 2026

Would printing the right prefix based on n.Type work? OpenBao will always prefer BAO_* anyway, the only reason to print VAULT_* at all is the included Vault support unless I misunderstand.

@cipherboy
Copy link
Copy Markdown
Member

@satoqz Tbf, at this point, I'm probably fine dropping Vault support from our tool unless someone really wants it.

@phil9909
Copy link
Copy Markdown
Contributor Author

The VAULT_... env variables are useful for testing OpenBao server compatibility with Vault clients without explicit OpenBao support. (E.g. the vault cli)

Otherwise, dropping Vault support (i.e. the ability to spin up a Vault node/cluster), seems fine to me.

Copy link
Copy Markdown
Member

@cipherboy cipherboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then if we're doing both, let's do both!

The comment on dropping Vault support was mostly from a server side PoV fwiw.

@cipherboy cipherboy merged commit 8c62ef2 into openbao:main Apr 28, 2026
4 checks passed
@phil9909 phil9909 deleted the print-bao-env branch April 28, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants