sia

package
v1.11.57 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

README

SIA for AWS EKS

Configuration

SIA EKS 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 trust relationship configured with trusted entity as the role name for EKS IAM Role for Kubernetes Service Account, which will be used by the application.

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 contain 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-EKS 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 GetEKSAccessProfile added in v1.11.19

func GetEKSAccessProfile(configFile, metaEndpoint string, useRegionalSTS bool, region string) (*options.AccessProfileConfig, error)

func GetEKSConfig added in v1.10.40

func GetEKSConfig(configFile, profileConfigFile, metaEndpoint string, useRegionalSTS bool, region string) (*options.Config, *options.ConfigAccount, *options.AccessProfileConfig, error)

func GetEKSPodId

func GetEKSPodId() string

Types

type EKSProvider added in v1.11.19

type EKSProvider struct {
	Name string
}

func (EKSProvider) AttestationData added in v1.11.19

func (eks EKSProvider) AttestationData(_ string, _ crypto.PrivateKey, _ *signature.SignatureInfo) (string, error)

func (EKSProvider) CloudAttestationData added in v1.11.25

func (eks EKSProvider) CloudAttestationData(_, _, _ string) (string, error)

func (EKSProvider) GetAccessManagementProfileFromMeta added in v1.11.25

func (eks EKSProvider) GetAccessManagementProfileFromMeta(_ string) (string, error)

func (EKSProvider) GetAccountDomainServiceFromMeta added in v1.11.25

func (eks EKSProvider) GetAccountDomainServiceFromMeta(_ string) (string, string, string, error)

func (EKSProvider) GetAdditionalSshHostPrincipals added in v1.11.31

func (eks EKSProvider) GetAdditionalSshHostPrincipals(_ string) (string, error)

func (EKSProvider) GetCsrDn added in v1.11.19

func (eks EKSProvider) GetCsrDn() pkix.Name

func (EKSProvider) GetEmail added in v1.11.19

func (eks EKSProvider) GetEmail(_ string) []string

func (EKSProvider) GetHostname added in v1.11.19

func (eks EKSProvider) GetHostname(fqdn bool) string

GetHostname returns the hostname as per the provider

func (EKSProvider) GetName added in v1.11.19

func (eks EKSProvider) GetName() string

GetName returns the name of the current provider

func (EKSProvider) GetRoleDnsNames added in v1.11.19

func (eks EKSProvider) GetRoleDnsNames(_ *x509.Certificate, _ string) []string

func (EKSProvider) GetSanDns added in v1.11.19

func (eks EKSProvider) GetSanDns(_ string, _ bool, _ bool, _ []string) []string

func (EKSProvider) GetSanIp added in v1.11.19

func (eks EKSProvider) GetSanIp(_ map[string]bool, _ []net.IP, _ ip.Opts) []net.IP

func (EKSProvider) GetSanUri added in v1.11.19

func (eks EKSProvider) GetSanUri(_ string, _ ip.Opts, _, _ string) []*url.URL

func (EKSProvider) GetSuffixes added in v1.11.54

func (eks EKSProvider) GetSuffixes() []string

func (EKSProvider) PrepareKey added in v1.11.19

func (eks EKSProvider) PrepareKey(_ 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