feat(secrets): implement SecretStore interface and StaticStore/LocalStore for credential management

This commit is contained in:
Alex Lovell-Troy 2025-03-07 17:10:31 -05:00
parent 76b9d35ec7
commit 1f2e72dab6
No known key found for this signature in database
13 changed files with 525 additions and 29 deletions

View file

@ -16,6 +16,7 @@ import (
"github.com/OpenCHAMI/magellan/pkg/client"
"github.com/OpenCHAMI/magellan/pkg/crawler"
"github.com/OpenCHAMI/magellan/pkg/secrets"
)
var (
@ -126,12 +127,17 @@ func TestExpectedOutput(t *testing.T) {
t.Fatalf("failed while waiting for emulator: %v", err)
}
// initialize a credential store
staticStore := &secrets.StaticStore{
Username: *username,
Password: *password,
}
systems, err := crawler.CrawlBMCForSystems(
crawler.CrawlerConfig{
URI: *host,
Username: *username,
Password: *password,
Insecure: true,
URI: *host,
CredentialStore: staticStore,
Insecure: true,
},
)