Documentation
¶
Overview ¶
The config package defines configuration parameters for the id server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Storage holds the storage backend to use.
Storage *store.Config `yaml:"storage"`
// IdentityProviders holds all the configured identity providers.
// If this is empty, the default Ubuntu SSO (usso) provider will be used.
IdentityProviders []idp.Config `yaml:"identity-providers"`
// LoggingConfig holds the loggo configuration to use.
LoggingConfig string `yaml:"logging-config"`
// ListenAddress holds the address to listen on for HTTP connections to the Candid API
// formatted as hostname:port.
ListenAddress string `yaml:"listen-address"`
// Location holds the external address to use when the API
// returns references to itself (for example in third party caveat locations).
Location string `yaml:"location"`
// AccessLog holds the name of a file to use to write logs of API accesses.
AccessLog string `yaml:"access-log"`
// RendezvousTimeout holds length of time that an interactive authentication
// request can be active before it is forgotten.
RendezvousTimeout DurationString `yaml:"rendezvous-timeout"`
// PrivateAddr holds the hostname where this instance of the Candid server
// can be contacted. This is used by instances of the Candid server
// to communicate directly with one another.
PrivateAddr string `yaml:"private-addr"`
// TLSCert and TLSKey hold a TLS server certificate for the HTTP
// server to use. If these are specified, Candid will serve its API
// over HTTPS using them.
TLSCert string `yaml:"tls-cert"`
TLSKey string `yaml:"tls-key"`
// PublicKey and PrivateKey holds the key pair used by the Candid
// server for encryption and decryption of third party caveats.
// These must be specified.
// TODO generate these automatically if not specified and store
// them in the database.
PublicKey *bakery.PublicKey `yaml:"public-key"`
PrivateKey *bakery.PrivateKey `yaml:"private-key"`
// AdminAgentPublicKey holds the public part of a key pair that
// can be used to authenticate as the admin user. If not specified
// no public-key-based authentication can be used for the admin
// user.
AdminAgentPublicKey *bakery.PublicKey `yaml:"admin-agent-public-key"`
// AdminPassword holds the password for basic-auth admin
// access. If this is empty, no basic-auth authentication will
// be allowed.
AdminPassword string `yaml:"admin-password"`
// ResourcePath holds the path to the directory holding
// resources used by the server, including web page templates.
ResourcePath string `yaml:"resource-path"`
// HTTPProxy holds the address of an HTTP proxy to use for
// outgoing HTTP requests, in the same form as the HTTP_PROXY
// environment variable.
HTTPProxy string `yaml:"http-proxy"`
// NoProxy holds which hosts not to use the HTTProxy for,
// in the same form as the NO_PROXY environment variable.
NoProxy string `yaml:"no-proxy"`
}
Config holds the configuration parameters for the identity service.
type DurationString ¶
DurationString holds a duration that marshals and unmarshals as a string in the form printed by time.Duration.String.
func (*DurationString) UnmarshalText ¶
func (dp *DurationString) UnmarshalText(data []byte) error
Click to show internal directories.
Click to hide internal directories.