sia

package
v1.11.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

SIA for AWS Fargate

Configuration

SIA AWS Fargate requires a configuration file to be present in the /etc/sia/sia_config with the following required attributes:

{
    "version": "1.0.0",
    "service": "application-service-name",
    "accounts": [
        {
            "domain":  "application-domain-name",
            "account": "application-account-aws-id"
        }
    ]
}

The AWS Account administrator must create an IAM Role called <application-domain-name>.<application-service-name> and this role must be setup with a trusted relationship with the role that the Fargate task is configured to run as. ( most likely Task Role )

SIA Configuration file provides a way to change the default user/group settings that the private key is owned by. By default, the private key is owned by user root and readable by group athenz. If the user wants to provide access to their service identity private key to another user, it can be accomplished by adding the user to the group athenz. If the user wants to change the user and group values, a config file must be dropped with the following optional fields:

{
    "version": "1.0.0",
    "service": "application-service-name",
    "accounts": [
        {
            "domain":  "application-domain-name",
            "account": "application-account-aws-id",
            "user": "unix-username",
            "group": "unix-groupname"
        }
    ]
}

SIA-Fargate can be built with following parameters - e.g.

GOOS=linux go install -ldflags "-X main.Version=1.0.0 -X main.ZtsEndPoint=zts.athenz.io -X main.DnsDomain=aws.athenz.cloud -X main.ProviderPrefix=athenz.aws" ./...

alternatively, those parameters can be passed during runtime and runtime parameters will take precedence over build time parameters.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFargateConfig added in v1.10.40

func GetFargateConfig(configFile, metaEndpoint string, useRegionalSTS bool, account, region string) (*options.Config, *options.ConfigAccount, error)

func GetFargateData added in v1.10.40

func GetFargateData(metaEndPoint string) (string, string, string, error)

Types

type FargateProvider added in v1.11.19

type FargateProvider struct {
	Name string
}

func (FargateProvider) AttestationData added in v1.11.19

func (fargate FargateProvider) AttestationData(svc string, key crypto.PrivateKey, sigInfo *signature.SignatureInfo) (string, error)

func (FargateProvider) CloudAttestationData added in v1.11.25

func (eks FargateProvider) CloudAttestationData(base, svc, ztSserverName string) (string, error)

func (FargateProvider) GetAccessManagementProfileFromMeta added in v1.11.25

func (tp FargateProvider) GetAccessManagementProfileFromMeta(base string) (string, error)

func (FargateProvider) GetAccountDomainServiceFromMeta added in v1.11.25

func (eks FargateProvider) GetAccountDomainServiceFromMeta(base string) (string, string, string, error)

func (FargateProvider) GetAdditionalSshHostPrincipals added in v1.11.31

func (tp FargateProvider) GetAdditionalSshHostPrincipals(base string) (string, error)

func (FargateProvider) GetCsrDn added in v1.11.19

func (fargate FargateProvider) GetCsrDn() pkix.Name

func (FargateProvider) GetEmail added in v1.11.19

func (fargate FargateProvider) GetEmail(service string) []string

func (FargateProvider) GetHostname added in v1.11.19

func (fargate FargateProvider) GetHostname(fqdn bool) string

GetHostname returns the hostname as per the provider

func (FargateProvider) GetName added in v1.11.19

func (fargate FargateProvider) GetName() string

GetName returns the name of the current provider

func (FargateProvider) GetRoleDnsNames added in v1.11.19

func (fargate FargateProvider) GetRoleDnsNames(cert *x509.Certificate, service string) []string

func (FargateProvider) GetSanDns added in v1.11.19

func (fargate FargateProvider) GetSanDns(service string, includeHost bool, wildcard bool, cnames []string) []string

func (FargateProvider) GetSanIp added in v1.11.19

func (fargate FargateProvider) GetSanIp(docIp map[string]bool, ips []net.IP, opts ip.Opts) []net.IP

func (FargateProvider) GetSanUri added in v1.11.19

func (fargate FargateProvider) GetSanUri(svc string, opts ip.Opts, spiffeTrustDomain, spiffeNamespace string) []*url.URL

func (FargateProvider) GetSuffix added in v1.11.19

func (fargate FargateProvider) GetSuffix() string

func (FargateProvider) PrepareKey added in v1.11.19

func (fargate FargateProvider) PrepareKey(file string) (crypto.PrivateKey, error)

Directories

Path Synopsis
cmd
devel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL