Skip to content

Commit

Permalink
feat: #56 support docker registry username encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdan-shulha committed Sep 24, 2024
1 parent 556a863 commit a5df51a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/app/ptah-agent/registry_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import (
)

func (e *taskExecutor) createRegistryAuth(ctx context.Context, req *t.CreateRegistryAuthReq) (*t.CreateRegistryAuthRes, error) {
decryptedUsername, err := e.decryptValue(ctx, req.AuthConfigSpec.Username)
if err != nil {
return nil, errors.Wrap(err, "failed to decrypt username")
}
req.AuthConfigSpec.Username = decryptedUsername

decryptedPassword, err := e.decryptValue(ctx, req.AuthConfigSpec.Password)
if err != nil {
return nil, errors.Wrap(err, "failed to decrypt password")
Expand Down

0 comments on commit a5df51a

Please sign in to comment.