Skip to content

Fix bucket key secret never being returned - #211

Merged
joetannenbaum merged 1 commit into
mainfrom
fix-bucket-key-secret-field
Sep 3, 2026
Merged

Fix bucket key secret never being returned#211
joetannenbaum merged 1 commit into
mainfrom
fix-bucket-key-secret-field

Conversation

@joetannenbaum

Copy link
Copy Markdown
Collaborator

The API returns a bucket key's secret as access_key_secret, but the DTO read secret_access_key. The null coalesce swallowed it, so secretAccessKey was always null and there was no way to get a key's secret out of the CLI.

While in there, bucket-key:create and bucket-key:get now print the access key ID and secret, masked unless you pass --show-sensitive, the same way auth:token handles API tokens. Creating a key and not being shown the credentials was the main thing that made this worth reporting.

There were no bucket key tests, which is why the wrong field name went unnoticed: the only coverage built the DTO from its PHP property names and never went through createFromResponse(). Added tests that use real API response fixtures.

@joetannenbaum
joetannenbaum merged commit 6c3cc3d into main Sep 3, 2026
6 checks passed
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