X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e12c7f0bcb0f5cbe80a0274d1758c0dec57aa6e4..fd080b34a321cbd6593d69f427b9eaeab890712f:/lib/config/export.go diff --git a/lib/config/export.go b/lib/config/export.go index 3c485e2b42..1c0662470f 100644 --- a/lib/config/export.go +++ b/lib/config/export.go @@ -11,7 +11,7 @@ import ( "io" "strings" - "git.curoverse.com/arvados.git/sdk/go/arvados" + "git.arvados.org/arvados.git/sdk/go/arvados" ) // ExportJSON writes a JSON object with the safe (non-secret) portions @@ -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,143 +59,198 @@ func ExportJSON(w io.Writer, cluster *arvados.Cluster) error { // exists. var whitelist = map[string]bool{ // | sort -t'"' -k2,2 - "API": true, - "API.AsyncPermissionsUpdateInterval": true, - "API.DisabledAPIs": true, - "API.MaxIndexDatabaseRead": true, - "API.MaxItemsPerResponse": true, - "API.MaxRequestAmplification": true, - "API.MaxRequestSize": true, - "API.RailsSessionSecretToken": false, - "API.RequestTimeout": true, - "AuditLogs": true, - "AuditLogs.MaxAge": true, - "AuditLogs.MaxDeleteBatch": true, - "AuditLogs.UnloggedAttributes": true, - "Collections": true, - "Collections.BlobSigning": true, - "Collections.BlobSigningKey": false, - "Collections.BlobSigningTTL": true, - "Collections.CollectionVersioning": true, - "Collections.DefaultReplication": true, - "Collections.DefaultTrashLifetime": true, - "Collections.PreserveVersionIfIdle": true, - "Collections.TrashSweepInterval": true, - "Containers": true, - "Containers.CloudVMs": true, - "Containers.CloudVMs.BootProbeCommand": true, - "Containers.CloudVMs.Driver": true, - "Containers.CloudVMs.DriverParameters": false, - "Containers.CloudVMs.Enable": true, - "Containers.CloudVMs.ImageID": true, - "Containers.CloudVMs.MaxCloudOpsPerSecond": true, - "Containers.CloudVMs.MaxProbesPerSecond": true, - "Containers.CloudVMs.PollInterval": true, - "Containers.CloudVMs.ProbeInterval": true, - "Containers.CloudVMs.ResourceTags": true, - "Containers.CloudVMs.ResourceTags.*": true, - "Containers.CloudVMs.SSHPort": true, - "Containers.CloudVMs.SyncInterval": true, - "Containers.CloudVMs.TagKeyPrefix": true, - "Containers.CloudVMs.TimeoutBooting": true, - "Containers.CloudVMs.TimeoutIdle": true, - "Containers.CloudVMs.TimeoutProbe": true, - "Containers.CloudVMs.TimeoutShutdown": true, - "Containers.CloudVMs.TimeoutSignal": true, - "Containers.CloudVMs.TimeoutTERM": true, - "Containers.DefaultKeepCacheRAM": true, - "Containers.DispatchPrivateKey": true, - "Containers.JobsAPI": true, - "Containers.JobsAPI.CrunchJobUser": true, - "Containers.JobsAPI.CrunchJobWrapper": true, - "Containers.JobsAPI.CrunchRefreshTrigger": true, - "Containers.JobsAPI.DefaultDockerImage": true, - "Containers.JobsAPI.Enable": true, - "Containers.JobsAPI.GitInternalDir": true, - "Containers.JobsAPI.ReuseJobIfOutputsDiffer": true, - "Containers.Logging": true, - "Containers.Logging.LimitLogBytesPerJob": true, - "Containers.Logging.LogBytesPerEvent": true, - "Containers.Logging.LogPartialLineThrottlePeriod": true, - "Containers.Logging.LogSecondsBetweenEvents": true, - "Containers.Logging.LogThrottleBytes": true, - "Containers.Logging.LogThrottleLines": true, - "Containers.Logging.LogThrottlePeriod": true, - "Containers.Logging.LogUpdatePeriod": true, - "Containers.Logging.LogUpdateSize": true, - "Containers.Logging.MaxAge": true, - "Containers.LogReuseDecisions": true, - "Containers.MaxComputeVMs": true, - "Containers.MaxDispatchAttempts": true, - "Containers.MaxRetryAttempts": true, - "Containers.SLURM": true, - "Containers.SLURM.Managed": true, - "Containers.SLURM.Managed.AssignNodeHostname": true, - "Containers.SLURM.Managed.ComputeNodeDomain": false, - "Containers.SLURM.Managed.ComputeNodeNameservers": false, - "Containers.SLURM.Managed.DNSServerConfDir": true, - "Containers.SLURM.Managed.DNSServerConfTemplate": true, - "Containers.SLURM.Managed.DNSServerReloadCommand": false, - "Containers.SLURM.Managed.DNSServerUpdateCommand": false, - "Containers.StaleLockTimeout": true, - "Containers.SupportedDockerImageFormats": true, - "Containers.UsePreemptibleInstances": true, - "Git": true, - "Git.Repositories": true, - "InstanceTypes": true, - "InstanceTypes.*": true, - "InstanceTypes.*.*": true, - "Login": true, - "Login.ProviderAppID": false, - "Login.ProviderAppSecret": false, - "Mail": true, - "Mail.EmailFrom": true, - "Mail.IssueReporterEmailFrom": true, - "Mail.IssueReporterEmailTo": true, - "Mail.MailchimpAPIKey": false, - "Mail.MailchimpListID": false, - "Mail.SendUserSetupNotificationEmail": true, - "Mail.SupportEmailAddress": true, - "ManagementToken": false, - "PostgreSQL": true, - "PostgreSQL.Connection": false, - "PostgreSQL.ConnectionPool": true, - "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": true, - "Services.*.InternalURLs.*": true, - "Services.*.InternalURLs.*.*": true, - "SystemLogs": true, - "SystemLogs.Format": true, - "SystemLogs.LogLevel": true, - "SystemLogs.MaxRequestLogParamsSize": true, - "SystemRootToken": false, - "TLS": true, - "TLS.Certificate": true, - "TLS.Insecure": true, - "TLS.Key": false, - "Users": true, - "Users.AdminNotifierEmailFrom": true, - "Users.AutoAdminFirstUser": false, - "Users.AutoAdminUserWithEmail": false, - "Users.AutoSetupNewUsers": true, - "Users.AutoSetupNewUsersWithRepository": true, - "Users.AutoSetupNewUsersWithVmUUID": true, - "Users.AutoSetupUsernameBlacklist": false, - "Users.EmailSubjectPrefix": true, - "Users.NewInactiveUserNotificationRecipients": false, - "Users.NewUserNotificationRecipients": false, - "Users.NewUsersAreActive": true, - "Users.UserNotifierEmailFrom": true, - "Users.UserProfileNotificationAddress": true, + "ClusterID": true, + "API": true, + "API.AsyncPermissionsUpdateInterval": false, + "API.DisabledAPIs": false, + "API.MaxConcurrentRequests": false, + "API.MaxIndexDatabaseRead": false, + "API.MaxItemsPerResponse": true, + "API.MaxKeepBlobBuffers": false, + "API.MaxRequestAmplification": false, + "API.MaxRequestSize": true, + "API.RailsSessionSecretToken": false, + "API.RequestTimeout": true, + "API.WebsocketClientEventQueue": false, + "API.SendTimeout": true, + "API.WebsocketServerEventQueue": false, + "API.KeepServiceRequestTimeout": false, + "AuditLogs": false, + "AuditLogs.MaxAge": false, + "AuditLogs.MaxDeleteBatch": false, + "AuditLogs.UnloggedAttributes": false, + "Collections": true, + "Collections.BlobSigning": true, + "Collections.BlobSigningKey": false, + "Collections.BlobSigningTTL": true, + "Collections.BlobTrash": false, + "Collections.BlobTrashLifetime": false, + "Collections.BlobTrashConcurrency": false, + "Collections.BlobTrashCheckInterval": false, + "Collections.BlobDeleteConcurrency": false, + "Collections.BlobReplicateConcurrency": false, + "Collections.CollectionVersioning": false, + "Collections.DefaultReplication": true, + "Collections.DefaultTrashLifetime": true, + "Collections.ForwardSlashNameSubstitution": true, + "Collections.ManagedProperties": true, + "Collections.ManagedProperties.*": true, + "Collections.ManagedProperties.*.*": true, + "Collections.PreserveVersionIfIdle": true, + "Collections.TrashSweepInterval": false, + "Collections.TrustAllContent": false, + "Collections.WebDAVCache": false, + "Collections.BalanceCollectionBatch": false, + "Collections.BalancePeriod": false, + "Collections.BalanceTimeout": false, + "Collections.BlobMissingReport": false, + "Collections.BalanceCollectionBuffers": 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, + "ForceLegacyAPI14": false, + "Git": false, + "InstanceTypes": true, + "InstanceTypes.*": true, + "InstanceTypes.*.*": true, + "Login": true, + "Login.Google": true, + "Login.Google.AlternateEmailAddresses": false, + "Login.Google.ClientID": false, + "Login.Google.ClientSecret": false, + "Login.Google.Enable": true, + "Login.LDAP": true, + "Login.LDAP.AppendDomain": false, + "Login.LDAP.EmailAttribute": false, + "Login.LDAP.Enable": true, + "Login.LDAP.InsecureTLS": false, + "Login.LDAP.SearchAttribute": false, + "Login.LDAP.SearchBase": false, + "Login.LDAP.SearchBindPassword": false, + "Login.LDAP.SearchBindUser": false, + "Login.LDAP.SearchFilters": false, + "Login.LDAP.StartTLS": false, + "Login.LDAP.StripDomain": false, + "Login.LDAP.URL": false, + "Login.LDAP.UsernameAttribute": false, + "Login.LoginCluster": true, + "Login.OpenIDConnect": true, + "Login.OpenIDConnect.ClientID": false, + "Login.OpenIDConnect.ClientSecret": false, + "Login.OpenIDConnect.Enable": true, + "Login.OpenIDConnect.Issuer": false, + "Login.PAM": true, + "Login.PAM.DefaultEmailDomain": false, + "Login.PAM.Enable": true, + "Login.PAM.Service": false, + "Login.SSO": true, + "Login.SSO.Enable": true, + "Login.SSO.ProviderAppID": false, + "Login.SSO.ProviderAppSecret": false, + "Login.RemoteTokenRefresh": true, + "Mail": true, + "Mail.MailchimpAPIKey": false, + "Mail.MailchimpListID": false, + "Mail.SendUserSetupNotificationEmail": false, + "Mail.IssueReporterEmailFrom": false, + "Mail.IssueReporterEmailTo": false, + "Mail.SupportEmailAddress": true, + "Mail.EmailFrom": 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.PreferDomainForUsername": false, + "Users.UserNotifierEmailFrom": false, + "Users.UserProfileNotificationAddress": false, + "Volumes": true, + "Volumes.*": true, + "Volumes.*.*": false, + "Volumes.*.AccessViaHosts": true, + "Volumes.*.AccessViaHosts.*": true, + "Volumes.*.AccessViaHosts.*.ReadOnly": true, + "Volumes.*.ReadOnly": true, + "Volumes.*.Replication": true, + "Volumes.*.StorageClasses": true, + "Volumes.*.StorageClasses.*": 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, + "Workbench.WelcomePageHTML": true, + "Workbench.InactivePageHTML": true, + "Workbench.SSHHelpPageHTML": true, + "Workbench.SSHHelpHostSuffix": true, } func redactUnsafe(m map[string]interface{}, mPrefix, lookupPrefix string) error {