Skip to content

Update localstack plugin to use LOCALSTACK_AUTH_TOKEN#428

Open
simonrw wants to merge 2 commits into
1Password:mainfrom
simonrw:localstack-plugin-auth-token
Open

Update localstack plugin to use LOCALSTACK_AUTH_TOKEN#428
simonrw wants to merge 2 commits into
1Password:mainfrom
simonrw:localstack-plugin-auth-token

Conversation

@simonrw

@simonrw simonrw commented Feb 14, 2024

Copy link
Copy Markdown
Contributor

Overview

LocalStack is migrating to use auth tokens instead of api keys. This should be reflected in the 1Password LocalStack shell plugin.

See the first item in the LocalStack v3.0.0 release notes miscellaneous section.

Updates the plugin created in #371

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

How To Test

localstack start

Changelog

The LocalStack plugin now uses LOCALSTACK_AUTH_TOKEN instead of LOCALSTACK_API_KEY

@simonrw simonrw marked this pull request as ready for review February 14, 2024 14:47
@scottisloud

Copy link
Copy Markdown
Contributor

Thanks for updating the LocalStack plugin for auth tokens, and thank you for your patience.

A few changes before merge:

Env-var mapping

AuthToken() and APIKey() currently share defaultEnvVarMapping with cross-field entries (LOCALSTACK_API_KEYfieldname.APIKey, LOCALSTACK_AUTH_TOKENfieldname.AuthToken). Each credential type should have its own map — AuthToken should provision/import only LOCALSTACK_AUTH_TOKEN. Please also either remove the unused APIKey() path or update api_key_test.go if you keep it for backward compat.

Auth gating

Please add needsauth.NotWhenContainsArgs("auth") in localstack.go so setup commands like localstack auth set-token, show-token, and clear-token do not require a 1Password item first.

Optional: add Prefix: "ls-" to the token composition, and consider provisioning both LOCALSTACK_AUTH_TOKEN and LOCALSTACK_API_KEY during the migration window (LocalStack still accepts auth tokens via the legacy env var temporarily).

Happy to take another look once those are in!

@scottisloud scottisloud self-requested a review June 19, 2026 22:15
@simonrw

simonrw commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @scottisloud , I am afk at the moment but I'll make these changes in a few weeks

@simonrw simonrw force-pushed the localstack-plugin-auth-token branch from 84fc6c4 to e3d1768 Compare June 29, 2026 19:05
@simonrw

simonrw commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @scottisloud for the review comments. I have implemented the changes you suggested. We have stopped supporting API keys entirely (they are no longer given out by our authentication system), so I have removed the api key path altogether.

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.

2 participants