Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSvcNames ¶
GetSvcNames returns command separated list of service names
Types ¶
type Config ¶
type Config struct { Version string `json:"version,omitempty"` //name of the provider Service string `json:"service,omitempty"` //name of the service for the identity Services map[string]ConfigService `json:"services,omitempty"` //names of the multiple services for the identity Ssh *bool `json:"ssh,omitempty"` //ssh certificate support Accounts []ConfigAccount `json:"accounts,omitempty"` //array of configured accounts SanDnsWildcard bool `json:"sandns_wildcard,omitempty"` //san dns wildcard support }
Config represents entire sia_config file
type ConfigAccount ¶
type ConfigAccount struct { Provider string `json:"provider,omitempty"` //name of the provider Name string `json:"name,omitempty"` //name of the service identity User string `json:"user,omitempty"` //the user name to chown the cert/key dirs to. If absent, then root. Group string `json:"group,omitempty"` //the group name to chown the cert/key dirs to. If absent, then athenz. Domain string `json:"domain,omitempty"` //name of the domain for the identity Account string `json:"account,omitempty"` //name of the account Service string `json:"service,omitempty"` //name of the service for the identity Zts string `json:"zts,omitempty"` //the ZTS to contact Filename string `json:"filename,omitempty"` //filename to put the service certificate Roles map[string]ConfigRole `json:"roles,omitempty"` //map of roles to retrieve certificates for Version string `json:"version,omitempty"` // sia version number }
ConfigAccount represents each of the accounts that can be specified in the config file
type ConfigRole ¶
type ConfigRole struct {
Filename string `json:"filename,omitempty"`
}
ConfigRole represents a role to be specified by user, and specify attributes for the role
type ConfigService ¶
type ConfigService struct { Filename string `json:"filename,omitempty"` User string `json:"user,omitempty"` Group string `json:"group,omitempty"` }
ConfigService represents a service to be specified by user, and specify User/Group attributes for the service
type Options ¶
type Options struct { Provider string Name string User string Group string Domain string Account string Services []Service Ssh bool Zts string Filename string Roles map[string]ConfigRole Version string KeyDir string CertDir string AthenzCACertFile string ZTSCACertFile string ZTSServerName string ZTSAzureDomains []string CountryName string SanDnsWildcard bool }
Options represents settings that are derived from config file and application defaults
func NewOptions ¶
func NewOptions(bytes []byte, identityDocument *attestation.IdentityDocument, siaDir, version, ztsCaCert, ztsServerName string, ztsAzureDomains []string, countryName, azureProvider string) (*Options, error)
NewOptions takes in sia_config bytes and returns a pointer to Options after parsing and initializing the defaults It uses identity document defaults when sia_config is empty or non-parsable. It populates "services" array