Skip to content

Conversation

@carole-lavillonniere
Copy link
Collaborator

@carole-lavillonniere carole-lavillonniere commented Feb 6, 2026

Switches to 99designs/keyring for automatic fallback to encrypted file storage when system keyring is unavailable.
The previous implementation using zalando/go-keyring would fail without a keyring service. This would have required a custom fallback implementation (more code to maintain).
99designs/keyring has low maintenance but is stable (keyring APIs rarely change).

Fallback Strategy

// Try system keyrings first (most secure)
ring, err := keyring.Open(config)
if err != nil {
    // Fall back to encrypted file storage
    config.AllowedBackends = []keyring.BackendType{keyring.FileBackend}
    ring, err = keyring.Open(config)
}
  1. First attempt tries default backends (system keyrings preferred)
  2. If system keyring fails or is broken, retry with FileBackend -> handles both "not available" and "partially broken" scenarios

Storage Locations

Using os.UserConfigDir() for OS-dependant paths:

  • Linux: ~/.config/localstack/
  • macOS: ~/Library/Application Support/localstack/
  • Windows: %APPDATA%\localstack\

@carole-lavillonniere carole-lavillonniere force-pushed the carole/drg-453 branch 6 times, most recently from 24d9d64 to fc3a6e3 Compare February 9, 2026 09:23
@carole-lavillonniere carole-lavillonniere marked this pull request as ready for review February 9, 2026 09:30
Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

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

Looks good to me in general, just some minor comments.

Nice that we can use something with integrated file fallback 🚀

Base automatically changed from carole/drg-450 to main February 10, 2026 10:23
@carole-lavillonniere carole-lavillonniere merged commit ae03f76 into main Feb 10, 2026
7 of 9 checks passed
@carole-lavillonniere carole-lavillonniere deleted the carole/drg-453 branch February 10, 2026 10:26
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