How is the target directory over 100 gigs?
Some checks failed
🏗️✨ Test Build Workflow / 🖥️ 🔨 Build (push) Has been cancelled

This commit is contained in:
2025-05-14 22:45:29 -04:00
parent 5259fb9aa4
commit f75955e154
5 changed files with 42 additions and 48 deletions

39
main.go
View File

@@ -1,7 +1,6 @@
package main
import (
"encoding/base64"
helper "gitea.siteworxpro.com/Siteworxpro/aws-iam-anywhere-refresher/aws_signing_helper"
"gitea.siteworxpro.com/Siteworxpro/aws-iam-anywhere-refresher/cmd"
appConfig "gitea.siteworxpro.com/Siteworxpro/aws-iam-anywhere-refresher/config"
@@ -29,38 +28,14 @@ func main() {
os.Exit(1)
}
privateKey, err := base64.StdEncoding.DecodeString(c.PrivateKey())
if err != nil {
l.Error("Failed to decode private key", "error", err)
os.Exit(1)
}
if len(privateKey) == 0 {
l.Error("Private key is empty")
os.Exit(1)
}
certificate, err := base64.StdEncoding.DecodeString(c.Certificate())
if err != nil {
l.Error("Failed to decode certificate", "error", err)
os.Exit(1)
}
if len(certificate) == 0 {
l.Error("Certificate is empty")
os.Exit(1)
}
credentials, err := cmd.Run(&helper.CredentialsOpts{
PrivateKeyId: string(privateKey),
CertificateId: string(certificate),
CertIdentifier: helper.CertIdentifier{
SystemStoreName: "MY",
},
RoleArn: c.RoleArn(),
ProfileArnStr: c.ProfileArn(),
TrustAnchorArnStr: c.TrustedAnchor(),
SessionDuration: int(c.SessionDuration()),
PrivateKeyId: c.PrivateKey(),
CertificateId: c.Certificate(),
CertificateBundleId: c.BundleId(),
RoleArn: c.RoleArn(),
ProfileArnStr: c.ProfileArn(),
TrustAnchorArnStr: c.TrustedAnchor(),
SessionDuration: int(c.SessionDuration()),
})
if err != nil {