mirror of
https://github.com/wahyd4/cert-manager.git
synced 2026-08-10 21:56:02 +10:00
Trim aws credentials for acme dns route53 provider
AWS credentials don't contain whitespace, and it's very easy to accidentally include spaces or newlines at the end of secrets.
This commit is contained in:
@@ -3,6 +3,7 @@ package dns
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
@@ -152,8 +153,8 @@ func (s *Solver) solverFor(crt *v1alpha1.Certificate, domain string) (solver, er
|
||||
}
|
||||
|
||||
impl, err = route53.NewDNSProviderAccessKey(
|
||||
providerConfig.Route53.AccessKeyID,
|
||||
string(secretAccessKeyBytes),
|
||||
strings.TrimSpace(providerConfig.Route53.AccessKeyID),
|
||||
strings.TrimSpace(string(secretAccessKeyBytes)),
|
||||
providerConfig.Route53.HostedZoneID,
|
||||
providerConfig.Route53.Region,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user