X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/45c57dc86010f8fd9ae862d91a710e0752ceda4a..8991b43990aa7a77edd78f165114b93a6a207985:/sdk/go/arvados/config.go diff --git a/sdk/go/arvados/config.go b/sdk/go/arvados/config.go index 38de6b8ea4..6e1549224b 100644 --- a/sdk/go/arvados/config.go +++ b/sdk/go/arvados/config.go @@ -17,9 +17,8 @@ import ( var DefaultConfigFile = func() string { if path := os.Getenv("ARVADOS_CONFIG"); path != "" { return path - } else { - return "/etc/arvados/config.yml" } + return "/etc/arvados/config.yml" }() type Config struct { @@ -121,11 +120,13 @@ type Cluster struct { TrashSweepInterval Duration TrustAllContent bool ForwardSlashNameSubstitution string + S3FolderObjects bool BlobMissingReport string BalancePeriod Duration BalanceCollectionBatch int BalanceCollectionBuffers int + BalanceTimeout Duration WebDAVCache WebDAVCacheConfig } @@ -135,16 +136,53 @@ type Cluster struct { Repositories string } Login struct { - GoogleClientID string - GoogleClientSecret string - GoogleAlternateEmailAddresses bool - PAM bool - PAMService string - PAMDefaultEmailDomain string - ProviderAppID string - ProviderAppSecret string - LoginCluster string - RemoteTokenRefresh Duration + LDAP struct { + Enable bool + URL URL + StartTLS bool + InsecureTLS bool + StripDomain string + AppendDomain string + SearchAttribute string + SearchBindUser string + SearchBindPassword string + SearchBase string + SearchFilters string + EmailAttribute string + UsernameAttribute string + } + Google struct { + Enable bool + ClientID string + ClientSecret string + AlternateEmailAddresses bool + } + OpenIDConnect struct { + Enable bool + Issuer string + ClientID string + ClientSecret string + EmailClaim string + EmailVerifiedClaim string + UsernameClaim string + } + PAM struct { + Enable bool + Service string + DefaultEmailDomain string + } + SSO struct { + Enable bool + ProviderAppID string + ProviderAppSecret string + } + Test struct { + Enable bool + Users map[string]TestUser + } + LoginCluster string + RemoteTokenRefresh Duration + TokenLifetime Duration } Mail struct { MailchimpAPIKey string @@ -236,12 +274,15 @@ type Volume struct { } type S3VolumeDriverParameters struct { + IAMRole string AccessKey string SecretKey string Endpoint string Region string Bucket string LocationConstraint bool + V2Signature bool + UseAWSS3v2Driver bool IndexPageSize int ConnectTimeout Duration ReadTimeout Duration @@ -278,7 +319,6 @@ type Services struct { Keepbalance Service Keepproxy Service Keepstore Service - Nodemanager Service RailsAPI Service SSO Service WebDAVDownload Service @@ -294,6 +334,11 @@ type Service struct { ExternalURL URL } +type TestUser struct { + Email string + Password string +} + // URL is a url.URL that is also usable as a JSON key/value. type URL url.URL @@ -303,6 +348,10 @@ func (su *URL) UnmarshalText(text []byte) error { u, err := url.Parse(string(text)) if err == nil { *su = URL(*u) + if su.Path == "" && su.Host != "" { + // http://example really means http://example/ + su.Path = "/" + } } return err } @@ -513,7 +562,7 @@ func (ss *StringSet) UnmarshalJSON(data []byte) error { return err } *ss = make(map[string]struct{}, len(hash)) - for t, _ := range hash { + for t := range hash { (*ss)[t] = struct{}{} } @@ -527,7 +576,6 @@ const ( ServiceNameController ServiceName = "arvados-controller" ServiceNameDispatchCloud ServiceName = "arvados-dispatch-cloud" ServiceNameHealth ServiceName = "arvados-health" - ServiceNameNodemanager ServiceName = "arvados-node-manager" ServiceNameWorkbench1 ServiceName = "arvados-workbench1" ServiceNameWorkbench2 ServiceName = "arvados-workbench2" ServiceNameWebsocket ServiceName = "arvados-ws" @@ -545,7 +593,6 @@ func (svcs Services) Map() map[ServiceName]Service { ServiceNameController: svcs.Controller, ServiceNameDispatchCloud: svcs.DispatchCloud, ServiceNameHealth: svcs.Health, - ServiceNameNodemanager: svcs.Nodemanager, ServiceNameWorkbench1: svcs.Workbench1, ServiceNameWorkbench2: svcs.Workbench2, ServiceNameWebsocket: svcs.Websocket,