17296: Merge branch 'master'
[arvados.git] / sdk / go / arvados / config.go
index 00438bf340a36851ff48262d6df998ce9407f112..b1ee6e9b992f4446ec1f0f826c22e9bdb244704b 100644 (file)
@@ -49,12 +49,12 @@ func (sc *Config) GetCluster(clusterID string) (*Cluster, error) {
                        }
                }
        }
-       if cc, ok := sc.Clusters[clusterID]; !ok {
+       cc, ok := sc.Clusters[clusterID]
+       if !ok {
                return nil, fmt.Errorf("cluster %q is not configured", clusterID)
-       } else {
-               cc.ClusterID = clusterID
-               return &cc, nil
        }
+       cc.ClusterID = clusterID
+       return &cc, nil
 }
 
 type WebDAVCacheConfig struct {
@@ -65,6 +65,7 @@ type WebDAVCacheConfig struct {
        MaxCollectionBytes   int64
        MaxPermissionEntries int
        MaxUUIDEntries       int
+       MaxSessions          int
 }
 
 type Cluster struct {
@@ -86,7 +87,7 @@ type Cluster struct {
                MaxKeepBlobBuffers             int
                MaxRequestAmplification        int
                MaxRequestSize                 int
-               RailsSessionSecretToken        string
+               MaxTokenLifetime               Duration
                RequestTimeout                 Duration
                SendTimeout                    Duration
                WebsocketClientEventQueue      int
@@ -152,19 +153,23 @@ type Cluster struct {
                        UsernameAttribute  string
                }
                Google struct {
-                       Enable                  bool
-                       ClientID                string
-                       ClientSecret            string
-                       AlternateEmailAddresses bool
+                       Enable                          bool
+                       ClientID                        string
+                       ClientSecret                    string
+                       AlternateEmailAddresses         bool
+                       AuthenticationRequestParameters map[string]string
                }
                OpenIDConnect struct {
-                       Enable             bool
-                       Issuer             string
-                       ClientID           string
-                       ClientSecret       string
-                       EmailClaim         string
-                       EmailVerifiedClaim string
-                       UsernameClaim      string
+                       Enable                          bool
+                       Issuer                          string
+                       ClientID                        string
+                       ClientSecret                    string
+                       EmailClaim                      string
+                       EmailVerifiedClaim              string
+                       UsernameClaim                   string
+                       AcceptAccessToken               bool
+                       AcceptAccessTokenScope          string
+                       AuthenticationRequestParameters map[string]string
                }
                PAM struct {
                        Enable             bool
@@ -183,6 +188,7 @@ type Cluster struct {
                LoginCluster       string
                RemoteTokenRefresh Duration
                TokenLifetime      Duration
+               TrustedClients     map[string]struct{}
        }
        Mail struct {
                MailchimpAPIKey                string
@@ -262,8 +268,6 @@ type Cluster struct {
                SSHHelpHostSuffix      string
                IdleTimeout            Duration
        }
-
-       ForceLegacyAPI14 bool
 }
 
 type Volume struct {
@@ -277,8 +281,8 @@ type Volume struct {
 
 type S3VolumeDriverParameters struct {
        IAMRole            string
-       AccessKey          string
-       SecretKey          string
+       AccessKeyID        string
+       SecretAccessKey    string
        Endpoint           string
        Region             string
        Bucket             string
@@ -412,6 +416,7 @@ type ContainersConfig struct {
        StaleLockTimeout            Duration
        SupportedDockerImageFormats StringSet
        UsePreemptibleInstances     bool
+       RuntimeEngine               string
 
        JobsAPI struct {
                Enable         string
@@ -429,6 +434,10 @@ type ContainersConfig struct {
                LogUpdatePeriod              Duration
                LogUpdateSize                ByteSize
        }
+       ShellAccess struct {
+               Admin bool
+               User  bool
+       }
        SLURM struct {
                PrioritySpread             int64
                SbatchArgumentsList        []string