Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.
This repository was archived by the owner on Apr 7, 2024. It is now read-only.

storeWithFallbacks should leverage the native store of the fallback store for saving credentials #71

@Wwwsylvia

Description

@Wwwsylvia

Currently, storeWithFallbacks only saves credentials in the primary store.

// Put saves credentials into the StoreWithFallbacks. It puts
// the credentials into the primary store.
func (sf *storeWithFallbacks) Put(ctx context.Context, serverAddress string, cred auth.Credential) error {
return sf.stores[0].Put(ctx, serverAddress, cred)
}

However, this pattern does not work well for the case where:

  • The primary store does not have native store available
  • The primary store disables putting credentials in plaintext
  • The fallback store has a native store available

In such case, ideally storeWithFallbacks should save the credentials in the native store of the fallback store.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions