-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatible encoding on darwin #115
Comments
I'm not sure how we could solve this. It's forwards compatible but not backwards. If people use an older version for the same secrets I think it's reasonable to expect there can be problems. |
I have not had much time to think about the possible solution, but off the top of my head it may be possible to provide a function where we set the preferred encoding algorithm so that we can control the prefix (e.g. newer versions would be able to keep writing new secrets as hex instead of base64). |
What is the use case for using and old AND a new version for go-keyring for the same secrets? There need to be a good use case before it makes sense to implement and maintain such a thing like a switch between hex and base64. |
The use case is related to multiple independent applications that rely on the shared secret to communicate. We cannot ensure they are all up-to date if they are shipped to clients. |
Hello.
It looks like this change 5205e6f#diff-14c4aa5420de20b1ef5b174be7c1d389e4bdbbf71719ca66bf308caf38c60d1d is backwards incompatible on Darwin. The default prefix when
Set
ting values is nowgo-keyring-base64:
and clients that use older version of the go-keyring library would not have that prefix stripped and end up with a bad value.Steps to reproduce:
main.go:
Build it once with
[email protected]
->keyring_old.bin
go get github.com/zolando/[email protected]
go mod tidy && go mod vendor
GOOS=darwin GOARCH=arm64 go build -o keyring_old.bin ./...
Build it with
[email protected]
->keyring_new.bin
go get github.com/zolando/[email protected]
go mod tidy && go mod vendor
GOOS=darwin GOARCH=arm64 go build -o keyring_new.bin ./...
Result:
Clean the "myservice" credentials
Run keyring_old.bin first, then run keyring_new.bin
The text was updated successfully, but these errors were encountered: