Warn about missing/short secrets. Delete Rails session key.
[arvados.git] / sdk / go / arvados / config.go
index 1e190a947671bf7c6afc95c67625c359d6786ba3..9dc9e17dd815b1818bc17bb20c074d69982e146d 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 {
@@ -86,7 +86,6 @@ type Cluster struct {
                MaxKeepBlobBuffers             int
                MaxRequestAmplification        int
                MaxRequestSize                 int
-               RailsSessionSecretToken        string
                RequestTimeout                 Duration
                SendTimeout                    Duration
                WebsocketClientEventQueue      int
@@ -183,6 +182,7 @@ type Cluster struct {
                LoginCluster       string
                RemoteTokenRefresh Duration
                TokenLifetime      Duration
+               TrustedClients     map[string]struct{}
        }
        Mail struct {
                MailchimpAPIKey                string
@@ -219,6 +219,7 @@ type Cluster struct {
                UserNotifierEmailFrom                 string
                UserProfileNotificationAddress        string
                PreferDomainForUsername               string
+               UserSetupMailText                     string
        }
        Volumes   map[string]Volume
        Workbench struct {
@@ -259,6 +260,7 @@ type Cluster struct {
                InactivePageHTML       string
                SSHHelpPageHTML        string
                SSHHelpHostSuffix      string
+               IdleTimeout            Duration
        }
 
        ForceLegacyAPI14 bool
@@ -446,24 +448,25 @@ type ContainersConfig struct {
 type CloudVMsConfig struct {
        Enable bool
 
-       BootProbeCommand           string
-       DeployRunnerBinary         string
-       ImageID                    string
-       MaxCloudOpsPerSecond       int
-       MaxProbesPerSecond         int
-       MaxConcurrentNodeCreateOps int
-       PollInterval               Duration
-       ProbeInterval              Duration
-       SSHPort                    string
-       SyncInterval               Duration
-       TimeoutBooting             Duration
-       TimeoutIdle                Duration
-       TimeoutProbe               Duration
-       TimeoutShutdown            Duration
-       TimeoutSignal              Duration
-       TimeoutTERM                Duration
-       ResourceTags               map[string]string
-       TagKeyPrefix               string
+       BootProbeCommand               string
+       DeployRunnerBinary             string
+       ImageID                        string
+       MaxCloudOpsPerSecond           int
+       MaxProbesPerSecond             int
+       MaxConcurrentInstanceCreateOps int
+       PollInterval                   Duration
+       ProbeInterval                  Duration
+       SSHPort                        string
+       SyncInterval                   Duration
+       TimeoutBooting                 Duration
+       TimeoutIdle                    Duration
+       TimeoutProbe                   Duration
+       TimeoutShutdown                Duration
+       TimeoutSignal                  Duration
+       TimeoutStaleRunLock            Duration
+       TimeoutTERM                    Duration
+       ResourceTags                   map[string]string
+       TagKeyPrefix                   string
 
        Driver           string
        DriverParameters json.RawMessage