Skip to content

fix(auth): report token secret output failures - #81

Open
efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/token-output-errors
Open

efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/token-output-errors

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

auth token create and rotate ignored plain text output failures and could report success without writing the new secret. Return those errors and, during rotation, still attempt an explicitly requested --save when stdout fails in either output mode. Report both errors if output and saving fail, without claiming that the secret was printed. Tests cover closed output files, partial writes and config read failures.

Tested on macOS arm64 with Go 1.27.1: go test -race -count=1 ./..., go vet ./..., go build ./..., gofmt -l . and git diff --check passed. Regression tests reproduced the false success and JSON save interruption before the fix. Linux CI and the GoReleaser snapshot have not been run locally.

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.

1 participant