Handle secrets in DockerLogin operation
Before, secret was a plain text string, but it could lead to security issue so we are now handling secrets as `dagger.#Secret` or string. I've add a new struct SecretStore that expose the inputStore to easily retrieve secret value. Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
@@ -11,8 +11,19 @@ import (
|
||||
"go.dagger.io/dagger/state"
|
||||
)
|
||||
|
||||
func NewSecretsProvider(st *state.State) session.Attachable {
|
||||
return secretsprovider.NewSecretProvider(&inputStore{st})
|
||||
type SecretsStore struct {
|
||||
Secrets session.Attachable
|
||||
Store *inputStore
|
||||
}
|
||||
|
||||
func NewSecretsStoreProvider(st *state.State) SecretsStore {
|
||||
store := &inputStore{st}
|
||||
|
||||
return SecretsStore{
|
||||
Secrets: secretsprovider.NewSecretProvider(store),
|
||||
Store: store,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type inputStore struct {
|
||||
|
Reference in New Issue
Block a user