sia

package
v1.12.4 Latest Latest
Warning

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

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

README

SIA for GCP GCE

Configuration

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

{
    "version": "1.0.0",
    "domain": "application-domain-name",
    "service": "application-service-name"
}

The Google Project administrator must create a Google Service Account with the name <application-service-name>.

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 admin 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",
    "domain": "application-domain-name",
    "service": "application-service-name",
    "user": "unix-username",
    "group": "unix-groupname"
}

SIA-GCE 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=gcp.athenz.cloud -X main.ProviderPrefix=athenz.gcp" ./...

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 GetGCEAccessProfile

func GetGCEAccessProfile(configFile, metaEndpoint string, provider provider.Provider) (*options.AccessProfileConfig, error)

func GetGCEConfig

func GetGCEConfig(configFile, profileConfigFile, metaEndpoint, region string, provider provider.Provider) (*options.Config, *options.AccessProfileConfig, error)

Types

type GCEProvider

type GCEProvider struct {
	Name string
}

func (GCEProvider) AttestationData

func (gce GCEProvider) AttestationData(_ string, _ crypto.PrivateKey, _ *signature.SignatureInfo) (string, error)

func (GCEProvider) CloudAttestationData

func (gce GCEProvider) CloudAttestationData(base, svc, ztsServerName string) (string, error)

func (GCEProvider) GetAccessManagementProfileFromMeta

func (gce GCEProvider) GetAccessManagementProfileFromMeta(base string) (string, error)

func (GCEProvider) GetAccountDomainServiceFromMeta

func (gce GCEProvider) GetAccountDomainServiceFromMeta(base string) (string, string, string, error)

func (GCEProvider) GetAdditionalSshHostPrincipals added in v1.11.31

func (gce GCEProvider) GetAdditionalSshHostPrincipals(base string) (string, error)

func (GCEProvider) GetCsrDn

func (gce GCEProvider) GetCsrDn() pkix.Name

func (GCEProvider) GetEmail

func (gce GCEProvider) GetEmail(_ string) []string

func (GCEProvider) GetHostname

func (gce GCEProvider) GetHostname(fqdn bool) string

GetHostname returns the hostname as per the provider

func (GCEProvider) GetName

func (gce GCEProvider) GetName() string

GetName returns the name of the current provider

func (GCEProvider) GetRoleDnsNames

func (gce GCEProvider) GetRoleDnsNames(_ *x509.Certificate, _ string) []string

func (GCEProvider) GetSanDns

func (gce GCEProvider) GetSanDns(_ string, _ bool, _ bool, _ []string) []string

func (GCEProvider) GetSanIp

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

func (GCEProvider) GetSanUri

func (gce GCEProvider) GetSanUri(_ string, _ ip.Opts, _, _ string) []*url.URL

func (GCEProvider) GetSuffixes added in v1.11.54

func (gce GCEProvider) GetSuffixes() []string

func (GCEProvider) PrepareKey

func (gce GCEProvider) 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