Skip to content

Commit 79cdc4f

Browse files
committed
Enable AWS SSO support
1 parent b851e2c commit 79cdc4f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/aws-sigv4-proxy/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,19 @@ func main() {
6767
log.SetLevel(log.DebugLevel)
6868
}
6969

70+
sessionOptions := session.Options{
71+
SharedConfigState: session.SharedConfigEnable,
72+
}
73+
7074
sessionConfig := aws.Config{}
7175
if v := os.Getenv("AWS_STS_REGIONAL_ENDPOINTS"); len(v) == 0 {
7276
sessionConfig.STSRegionalEndpoint = endpoints.RegionalSTSEndpoint
7377
}
7478

7579
sessionConfig.CredentialsChainVerboseErrors = aws.Bool(shouldLogSigning())
7680

77-
session, err := session.NewSession(&sessionConfig)
81+
sessionOptions.Config.MergeIn(&sessionConfig)
82+
session, err := session.NewSessionWithOptions(sessionOptions)
7883
if err != nil {
7984
log.Fatal(err)
8085
}

0 commit comments

Comments
 (0)