Merge branch 'master' into 14716-webdav-cluster-config
[arvados.git] / lib / config / export.go
index 0eb573609329de8a6dee46ebefff5504632f30ab..a0be827f040e61dd8052def574a589404fab216d 100644 (file)
@@ -26,6 +26,10 @@ func ExportJSON(w io.Writer, cluster *arvados.Cluster) error {
        if err != nil {
                return err
        }
+
+       // ClusterID is not marshalled by default (see `json:"-"`).
+       // Add it back here so it is included in the exported config.
+       m["ClusterID"] = cluster.ClusterID
        err = redactUnsafe(m, "", "")
        if err != nil {
                return err
@@ -55,116 +59,127 @@ func ExportJSON(w io.Writer, cluster *arvados.Cluster) error {
 // exists.
 var whitelist = map[string]bool{
        // | sort -t'"' -k2,2
-       "API":                                         true,
-       "API.AsyncPermissionsUpdateInterval":          false,
-       "API.DisabledAPIs":                            false,
-       "API.MaxIndexDatabaseRead":                    false,
-       "API.MaxItemsPerResponse":                     true,
-       "API.MaxRequestAmplification":                 false,
-       "API.MaxRequestSize":                          true,
-       "API.RailsSessionSecretToken":                 false,
-       "API.RequestTimeout":                          true,
-       "AuditLogs":                                   false,
-       "AuditLogs.MaxAge":                            false,
-       "AuditLogs.MaxDeleteBatch":                    false,
-       "AuditLogs.UnloggedAttributes":                false,
-       "Collections":                                 true,
-       "Collections.BlobSigning":                     true,
-       "Collections.BlobSigningKey":                  false,
-       "Collections.BlobSigningTTL":                  true,
-       "Collections.CollectionVersioning":            false,
-       "Collections.DefaultReplication":              true,
-       "Collections.DefaultTrashLifetime":            true,
-       "Collections.ManagedProperties":               true,
-       "Collections.ManagedProperties.*":             true,
-       "Collections.ManagedProperties.*.*":           true,
-       "Collections.PreserveVersionIfIdle":           true,
-       "Collections.TrashSweepInterval":              false,
-       "Containers":                                  true,
-       "Containers.CloudVMs":                         false,
-       "Containers.DefaultKeepCacheRAM":              true,
-       "Containers.DispatchPrivateKey":               false,
-       "Containers.JobsAPI":                          true,
-       "Containers.JobsAPI.CrunchJobUser":            false,
-       "Containers.JobsAPI.CrunchJobWrapper":         false,
-       "Containers.JobsAPI.CrunchRefreshTrigger":     false,
-       "Containers.JobsAPI.DefaultDockerImage":       false,
-       "Containers.JobsAPI.Enable":                   true,
-       "Containers.JobsAPI.GitInternalDir":           false,
-       "Containers.JobsAPI.ReuseJobIfOutputsDiffer":  false,
-       "Containers.Logging":                          false,
-       "Containers.LogReuseDecisions":                false,
-       "Containers.MaxComputeVMs":                    false,
-       "Containers.MaxDispatchAttempts":              false,
-       "Containers.MaxRetryAttempts":                 true,
-       "Containers.SLURM":                            false,
-       "Containers.StaleLockTimeout":                 false,
-       "Containers.SupportedDockerImageFormats":      true,
-       "Containers.UsePreemptibleInstances":          true,
-       "EnableBetaController14287":                   false,
-       "Git":                                         false,
-       "InstanceTypes":                               true,
-       "InstanceTypes.*":                             true,
-       "InstanceTypes.*.*":                           true,
-       "Login":                                       false,
-       "Mail":                                        false,
-       "ManagementToken":                             false,
-       "PostgreSQL":                                  false,
-       "RemoteClusters":                              true,
-       "RemoteClusters.*":                            true,
-       "RemoteClusters.*.ActivateUsers":              true,
-       "RemoteClusters.*.Host":                       true,
-       "RemoteClusters.*.Insecure":                   true,
-       "RemoteClusters.*.Proxy":                      true,
-       "RemoteClusters.*.Scheme":                     true,
-       "Services":                                    true,
-       "Services.*":                                  true,
-       "Services.*.ExternalURL":                      true,
-       "Services.*.InternalURLs":                     false,
-       "SystemLogs":                                  false,
-       "SystemRootToken":                             false,
-       "TLS":                                         false,
-       "Users":                                       true,
-       "Users.AnonymousUserToken":                    true,
-       "Users.AdminNotifierEmailFrom":                false,
-       "Users.AutoAdminFirstUser":                    false,
-       "Users.AutoAdminUserWithEmail":                false,
-       "Users.AutoSetupNewUsers":                     false,
-       "Users.AutoSetupNewUsersWithRepository":       false,
-       "Users.AutoSetupNewUsersWithVmUUID":           false,
-       "Users.AutoSetupUsernameBlacklist":            false,
-       "Users.EmailSubjectPrefix":                    false,
-       "Users.NewInactiveUserNotificationRecipients": false,
-       "Users.NewUserNotificationRecipients":         false,
-       "Users.NewUsersAreActive":                     false,
-       "Users.UserNotifierEmailFrom":                 false,
-       "Users.UserProfileNotificationAddress":        false,
-       "Workbench":                                   true,
-       "Workbench.ActivationContactLink":             false,
-       "Workbench.APIClientConnectTimeout":           true,
-       "Workbench.APIClientReceiveTimeout":           true,
-       "Workbench.APIResponseCompression":            false,
-       "Workbench.ApplicationMimetypesWithViewIcon":  false,
-       "Workbench.ArvadosDocsite":                    true,
-       "Workbench.ArvadosPublicDataDocURL":           true,
-       "Workbench.EnableGettingStartedPopup":         true,
-       "Workbench.EnablePublicProjectsPage":          true,
-       "Workbench.FileViewersConfigURL":              true,
-       "Workbench.LogViewerMaxBytes":                 true,
-       "Workbench.MultiSiteSearch":                   true,
-       "Workbench.Repositories":                      false,
-       "Workbench.RepositoryCache":                   false,
-       "Workbench.RunningJobLogRecordsToFetch":       true,
-       "Workbench.SecretKeyBase":                     false,
-       "Workbench.ShowRecentCollectionsOnDashboard":  true,
-       "Workbench.ShowUserAgreementInline":           false,
-       "Workbench.ShowUserNotifications":             false,
-       "Workbench.SiteName":                          true,
-       "Workbench.Theme":                             true,
-       "Workbench.TrustAllContent":                   false,
-       "Workbench.UserProfileFormFields":             true,
-       "Workbench.UserProfileFormMessage":            true,
-       "Workbench.VocabularyURL":                     true,
+       "ClusterID":                                    true,
+       "API":                                          true,
+       "API.AsyncPermissionsUpdateInterval":           false,
+       "API.DisabledAPIs":                             false,
+       "API.MaxIndexDatabaseRead":                     false,
+       "API.MaxItemsPerResponse":                      true,
+       "API.MaxRequestAmplification":                  false,
+       "API.MaxRequestSize":                           true,
+       "API.RailsSessionSecretToken":                  false,
+       "API.RequestTimeout":                           true,
+       "API.WebsocketClientEventQueue":                false,
+       "API.SendTimeout":                              true,
+       "API.WebsocketServerEventQueue":                false,
+       "AuditLogs":                                    false,
+       "AuditLogs.MaxAge":                             false,
+       "AuditLogs.MaxDeleteBatch":                     false,
+       "AuditLogs.UnloggedAttributes":                 false,
+       "Collections":                                  true,
+       "Collections.BlobSigning":                      true,
+       "Collections.BlobSigningKey":                   false,
+       "Collections.BlobSigningTTL":                   true,
+       "Collections.CollectionVersioning":             false,
+       "Collections.DefaultReplication":               true,
+       "Collections.DefaultTrashLifetime":             true,
+       "Collections.ManagedProperties":                true,
+       "Collections.ManagedProperties.*":              true,
+       "Collections.ManagedProperties.*.*":            true,
+       "Collections.PreserveVersionIfIdle":            true,
+       "Collections.TrashSweepInterval":               false,
+       "Collections.TrustAllContent":                  false,
+       "Collections.WebDAVCache":                      false,
+       "Containers":                                   true,
+       "Containers.CloudVMs":                          false,
+       "Containers.CrunchRunCommand":                  false,
+       "Containers.CrunchRunArgumentsList":            false,
+       "Containers.DefaultKeepCacheRAM":               true,
+       "Containers.DispatchPrivateKey":                false,
+       "Containers.JobsAPI":                           true,
+       "Containers.JobsAPI.Enable":                    true,
+       "Containers.JobsAPI.GitInternalDir":            false,
+       "Containers.Logging":                           false,
+       "Containers.LogReuseDecisions":                 false,
+       "Containers.MaxComputeVMs":                     false,
+       "Containers.MaxDispatchAttempts":               false,
+       "Containers.MaxRetryAttempts":                  true,
+       "Containers.MinRetryPeriod":                    true,
+       "Containers.ReserveExtraRAM":                   true,
+       "Containers.SLURM":                             false,
+       "Containers.StaleLockTimeout":                  false,
+       "Containers.SupportedDockerImageFormats":       true,
+       "Containers.SupportedDockerImageFormats.*":     true,
+       "Containers.UsePreemptibleInstances":           true,
+       "EnableBetaController14287":                    false,
+       "Git":                                          false,
+       "InstanceTypes":                                true,
+       "InstanceTypes.*":                              true,
+       "InstanceTypes.*.*":                            true,
+       "Login":                                        false,
+       "Mail":                                         false,
+       "ManagementToken":                              false,
+       "PostgreSQL":                                   false,
+       "RemoteClusters":                               true,
+       "RemoteClusters.*":                             true,
+       "RemoteClusters.*.ActivateUsers":               true,
+       "RemoteClusters.*.Host":                        true,
+       "RemoteClusters.*.Insecure":                    true,
+       "RemoteClusters.*.Proxy":                       true,
+       "RemoteClusters.*.Scheme":                      true,
+       "Services":                                     true,
+       "Services.*":                                   true,
+       "Services.*.ExternalURL":                       true,
+       "Services.*.InternalURLs":                      false,
+       "SystemLogs":                                   false,
+       "SystemRootToken":                              false,
+       "TLS":                                          false,
+       "Users":                                        true,
+       "Users.AnonymousUserToken":                     true,
+       "Users.AdminNotifierEmailFrom":                 false,
+       "Users.AutoAdminFirstUser":                     false,
+       "Users.AutoAdminUserWithEmail":                 false,
+       "Users.AutoSetupNewUsers":                      false,
+       "Users.AutoSetupNewUsersWithRepository":        false,
+       "Users.AutoSetupNewUsersWithVmUUID":            false,
+       "Users.AutoSetupUsernameBlacklist":             false,
+       "Users.EmailSubjectPrefix":                     false,
+       "Users.NewInactiveUserNotificationRecipients":  false,
+       "Users.NewUserNotificationRecipients":          false,
+       "Users.NewUsersAreActive":                      false,
+       "Users.UserNotifierEmailFrom":                  false,
+       "Users.UserProfileNotificationAddress":         false,
+       "Workbench":                                    true,
+       "Workbench.ActivationContactLink":              false,
+       "Workbench.APIClientConnectTimeout":            true,
+       "Workbench.APIClientReceiveTimeout":            true,
+       "Workbench.APIResponseCompression":             true,
+       "Workbench.ApplicationMimetypesWithViewIcon":   true,
+       "Workbench.ApplicationMimetypesWithViewIcon.*": true,
+       "Workbench.ArvadosDocsite":                     true,
+       "Workbench.ArvadosPublicDataDocURL":            true,
+       "Workbench.DefaultOpenIdPrefix":                false,
+       "Workbench.EnableGettingStartedPopup":          true,
+       "Workbench.EnablePublicProjectsPage":           true,
+       "Workbench.FileViewersConfigURL":               true,
+       "Workbench.LogViewerMaxBytes":                  true,
+       "Workbench.MultiSiteSearch":                    true,
+       "Workbench.ProfilingEnabled":                   true,
+       "Workbench.Repositories":                       false,
+       "Workbench.RepositoryCache":                    false,
+       "Workbench.RunningJobLogRecordsToFetch":        true,
+       "Workbench.SecretKeyBase":                      false,
+       "Workbench.ShowRecentCollectionsOnDashboard":   true,
+       "Workbench.ShowUserAgreementInline":            true,
+       "Workbench.ShowUserNotifications":              true,
+       "Workbench.SiteName":                           true,
+       "Workbench.Theme":                              true,
+       "Workbench.UserProfileFormFields":              true,
+       "Workbench.UserProfileFormFields.*":            true,
+       "Workbench.UserProfileFormFields.*.*":          true,
+       "Workbench.UserProfileFormFields.*.*.*":        true,
+       "Workbench.UserProfileFormMessage":             true,
+       "Workbench.VocabularyURL":                      true,
 }
 
 func redactUnsafe(m map[string]interface{}, mPrefix, lookupPrefix string) error {