Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion htgettoken.1
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ need the rest of the
functionality.
.TP
.B \-\-nobearertoken
Skip getting a bearer token; only get a vault token.
Skip getting a bearer token. Always gets a vault token except in
combination with
.BR \-\-showbearerurl .
.TP
.BR \-o\ path , \ \-\-out=path
The path of the file used to store the bearer token on the local
Expand Down
3 changes: 3 additions & 0 deletions htgettoken.spec
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ rm -rf $RPM_BUILD_ROOT


%changelog
# - Again fix --showbearerurl to work in combination with --nobearertoken.
# That was fixed in 1.17 but broken in 1.21 and 2.0.

* Fri Jun 20 2025 Dave Dykstra <[email protected]> 2.4-1
- Add the new -s and -f options to the htdecodetoken usage summary.
- Add a -v option to htdecodetoken to show the token source.
Expand Down
2 changes: 1 addition & 1 deletion htgettoken/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ def main(args=None):
response = {'auth' : {'client_token': vaulttoken}}
vaulttoken = getVaultToken(vaulttokensecs, response)
writeTokenSafely("vault", vaulttoken, vaulttokenfile)
elif options.nobearertoken:
elif options.nobearertoken and not options.showbearerurl:
# force getting a new vault token
tryget = False
elif vaulttokenminsecs > 0:
Expand Down
2 changes: 1 addition & 1 deletion tests/013-showbearerurl/main
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
URL="$(htgettoken --nooidc -a $VAULTSERVER -i $ISSUER --showbearerurl --nobearertoken)"
URL="$(htgettoken --nooidc --nokerberos --nossh -a $VAULTSERVER -i $ISSUER --showbearerurl --nobearertoken)"

if [ -z "$URL" ]; then
echo "Nothing came from stdout!"
Expand Down
Loading