Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(context *CliContext, args []string) (err error)
func RunWithDefaultContext ¶
Types ¶
type CLI ¶
type CLI struct { Credentials CredentialsCmd `kong:"cmd,help:'print credentials in a format usable as an AWS credentials_process'"` RolesanywhereCredentials RolesAnywhereCmd `kong:"cmd,help:'print credentials in a format usable as an AWS credentials_process, generated by RolesAnywhere'"` }
type CliContext ¶
type CliContext struct { JWTSourceProvider credentials.JWTSourceProvider STSProvider credentials.STSProvider Logger *logrus.Logger Telemetry *telemetry.Telemetry TelemetryOpts *telemetry.TelemetryOpts }
func NewDefaultCliContext ¶
func NewDefaultCliContext() (*CliContext, error)
type CredentialsCmd ¶
type CredentialsCmd struct { Audience string `required:"" help:"SVID JWT Audience. Must match AWS configuration"` SpiffeID string `required:"" help:"The SPIFFE ID of this workload"` WorkloadSocket string `optional:"" help:"Path to SPIFFE Workload Socket"` RoleARN string `required:"" help:"AWS Role ARN to assume"` SessionName string `optional:"" help:"AWS Session Name"` STSEndpoint string `optional:"" help:"AWS STS Endpoint"` STSRegion string `optional:"" help:"AWS STS Region"` SessionDuration time.Duration `optional:"" type:"iso8601duration" help:"AWS session duration in ISO8601 duration format (e.g. PT5M for five minutes)"` LogFilePath string `optional:"" help:"Path to log file"` TelemetrySocket string `optional:"" help:"Socket address (TCP/UNIX) to emit metrics to (e.g. 127.0.0.1:8200)"` TelemetryName string `optional:"" help:"Service Name for Telemetry Data"` TelemetryServiceAsLabel bool `optional:"" help:"Place the Service name as a label instead of prefix"` SentryDSN string `optional:"" help:"DSN from Sentry for sending errors (e.g. https://<hash>@o123456.ingest.sentry.io/123456"` Debug bool `optional:"" help:"Enable debug logging"` }
func (*CredentialsCmd) Run ¶
func (c *CredentialsCmd) Run(context *CliContext) (err error)
type RolesAnywhereCmd ¶
type RolesAnywhereCmd struct { RoleARN string `required:"" group:"AWS Config" help:"AWS Role ARN to assume"` JumpRoleARN string `optional:"" group:"AWS Config" help:"AWS Role in Trust Anchor account to assume role from"` TrustAnchorARN string `required:"" group:"AWS Config" help:"AWS TrustAnchor ARN to use for RolesAnywhere"` ProfileARN string `required:"" group:"AWS Config" help:"AWS Profile ARN to use for RolesAnywhere"` PrivateKey string `required:"" group:"AWS Config" help:"Private key for X.509 Certificate"` Certificate string `required:"" group:"AWS Config" help:"Certificate to be used with RolesAnywhere"` Endpoint string `optional:"" group:"AWS Config" help:"Endpoint to use for the RolesAnywhere Request"` STSEndpoint string `optional:"" group:"AWS Config" help:"Endpoint to use for the Jump STS Request"` STSRegion string `optional:"" group:"AWS Config" help:"Region to use for the STS Request"` SessionDuration time.Duration `` /* 137-byte string literal not displayed */ Region string `optional:"" group:"AWS Config" help:"Trust Anchor region to use"` WithProxy bool `optional:"" group:"AWS Config" help:""` LogFilePath string `optional:"" group:"Process Config" help:"Path to log file"` TelemetrySocket string `optional:"" group:"Telemetry" help:"Socket address (TCP/UNIX) to emit metrics to (e.g. 127.0.0.1:8200)"` TelemetryName string `optional:"" group:"Telemetry" help:"Service Name for Telemetry Data"` TelemetryServiceAsLabel bool `optional:"" group:"Telemetry" help:"Place the Service name as a label instead of prefix"` SentryDSN string `` /* 130-byte string literal not displayed */ Debug bool `optional:"" group:"Process Config" help:"Enable debug logging"` }
func (*RolesAnywhereCmd) Run ¶
func (c *RolesAnywhereCmd) Run(context *CliContext) (err error)
func (*RolesAnywhereCmd) RunRolesAnywhere ¶
func (c *RolesAnywhereCmd) RunRolesAnywhere(context *CliContext, telemetry *telemetry.Telemetry) (err error)
A significant change between RunRolesAnywhere and the aws_signing_helper.GenerateCredentials() is that RunRolesAnywhere will assume that the certificate and intermediates are bundled together. Much remains similar between the two functions.
Click to show internal directories.
Click to hide internal directories.