fix: remove audit-logging flag from the server (#6991)

Co-authored-by: Colin Adler <colin1adler@gmail.com>
This commit is contained in:
Kyle Carberry
2023-04-04 12:11:10 -05:00
committed by GitHub
parent 29e9b9e663
commit 385a4262e2
9 changed files with 5 additions and 43 deletions

View File

@ -353,9 +353,6 @@ telemetrywhen required by your organization's security policy.
Enterprise Options Enterprise Options
These options are only available in the Enterprise Edition. These options are only available in the Enterprise Edition.
--audit-logging bool, $CODER_AUDIT_LOGGING (default: true)
Specifies whether audit logging is enabled.
--browser-only bool, $CODER_BROWSER_ONLY --browser-only bool, $CODER_BROWSER_ONLY
Whether Coder only allows connections to workspaces via the browser. Whether Coder only allows connections to workspaces via the browser.

3
coderd/apidoc/docs.go generated
View File

@ -6894,9 +6894,6 @@ const docTemplate = `{
"agent_stat_refresh_interval": { "agent_stat_refresh_interval": {
"type": "integer" "type": "integer"
}, },
"audit_logging": {
"type": "boolean"
},
"autobuild_poll_interval": { "autobuild_poll_interval": {
"type": "integer" "type": "integer"
}, },

View File

@ -6158,9 +6158,6 @@
"agent_stat_refresh_interval": { "agent_stat_refresh_interval": {
"type": "integer" "type": "integer"
}, },
"audit_logging": {
"type": "boolean"
},
"autobuild_poll_interval": { "autobuild_poll_interval": {
"type": "integer" "type": "integer"
}, },

View File

@ -142,7 +142,6 @@ type DeploymentValues struct {
MetricsCacheRefreshInterval clibase.Duration `json:"metrics_cache_refresh_interval,omitempty" typescript:",notnull"` MetricsCacheRefreshInterval clibase.Duration `json:"metrics_cache_refresh_interval,omitempty" typescript:",notnull"`
AgentStatRefreshInterval clibase.Duration `json:"agent_stat_refresh_interval,omitempty" typescript:",notnull"` AgentStatRefreshInterval clibase.Duration `json:"agent_stat_refresh_interval,omitempty" typescript:",notnull"`
AgentFallbackTroubleshootingURL clibase.URL `json:"agent_fallback_troubleshooting_url,omitempty" typescript:",notnull"` AgentFallbackTroubleshootingURL clibase.URL `json:"agent_fallback_troubleshooting_url,omitempty" typescript:",notnull"`
AuditLogging clibase.Bool `json:"audit_logging,omitempty" typescript:",notnull"`
BrowserOnly clibase.Bool `json:"browser_only,omitempty" typescript:",notnull"` BrowserOnly clibase.Bool `json:"browser_only,omitempty" typescript:",notnull"`
SCIMAPIKey clibase.String `json:"scim_api_key,omitempty" typescript:",notnull"` SCIMAPIKey clibase.String `json:"scim_api_key,omitempty" typescript:",notnull"`
Provisioner ProvisionerConfig `json:"provisioner,omitempty" typescript:",notnull"` Provisioner ProvisionerConfig `json:"provisioner,omitempty" typescript:",notnull"`
@ -1262,16 +1261,6 @@ when required by your organization's security policy.`,
Value: &c.AgentFallbackTroubleshootingURL, Value: &c.AgentFallbackTroubleshootingURL,
YAML: "agentFallbackTroubleshootingURL", YAML: "agentFallbackTroubleshootingURL",
}, },
{
Name: "Audit Logging",
Description: "Specifies whether audit logging is enabled.",
Flag: "audit-logging",
Env: "CODER_AUDIT_LOGGING",
Default: "true",
Annotations: clibase.Annotations{}.Mark(flagEnterpriseKey, "true"),
Value: &c.AuditLogging,
YAML: "auditLogging",
},
{ {
Name: "Browser Only", Name: "Browser Only",
Description: "Whether Coder only allows connections to workspaces via the browser.", Description: "Whether Coder only allows connections to workspaces via the browser.",

View File

@ -150,7 +150,6 @@ curl -X GET http://coder-server:8080/api/v2/deployment/config \
"user": {} "user": {}
}, },
"agent_stat_refresh_interval": 0, "agent_stat_refresh_interval": 0,
"audit_logging": true,
"autobuild_poll_interval": 0, "autobuild_poll_interval": 0,
"browser_only": true, "browser_only": true,
"cache_directory": "string", "cache_directory": "string",

View File

@ -1754,7 +1754,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"user": {} "user": {}
}, },
"agent_stat_refresh_interval": 0, "agent_stat_refresh_interval": 0,
"audit_logging": true,
"autobuild_poll_interval": 0, "autobuild_poll_interval": 0,
"browser_only": true, "browser_only": true,
"cache_directory": "string", "cache_directory": "string",
@ -2102,7 +2101,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"user": {} "user": {}
}, },
"agent_stat_refresh_interval": 0, "agent_stat_refresh_interval": 0,
"audit_logging": true,
"autobuild_poll_interval": 0, "autobuild_poll_interval": 0,
"browser_only": true, "browser_only": true,
"cache_directory": "string", "cache_directory": "string",
@ -2321,7 +2319,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| `address` | [clibase.HostPort](#clibasehostport) | false | | Address Use HTTPAddress or TLS.Address instead. | | `address` | [clibase.HostPort](#clibasehostport) | false | | Address Use HTTPAddress or TLS.Address instead. |
| `agent_fallback_troubleshooting_url` | [clibase.URL](#clibaseurl) | false | | | | `agent_fallback_troubleshooting_url` | [clibase.URL](#clibaseurl) | false | | |
| `agent_stat_refresh_interval` | integer | false | | | | `agent_stat_refresh_interval` | integer | false | | |
| `audit_logging` | boolean | false | | |
| `autobuild_poll_interval` | integer | false | | | | `autobuild_poll_interval` | integer | false | | |
| `browser_only` | boolean | false | | | | `browser_only` | boolean | false | | |
| `cache_directory` | string | false | | | | `cache_directory` | string | false | | |

View File

@ -29,16 +29,6 @@ coder server [flags]
The URL that users will use to access the Coder deployment. The URL that users will use to access the Coder deployment.
### --audit-logging
| | |
| ----------- | --------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_AUDIT_LOGGING</code> |
| Default | <code>true</code> |
Specifies whether audit logging is enabled.
### --browser-only ### --browser-only
| | | | | |

View File

@ -49,18 +49,15 @@ func (r *RootCmd) server() *clibase.Cmd {
} }
} }
options.DERPServer.SetMeshKey(meshKey) options.DERPServer.SetMeshKey(meshKey)
options.Auditor = audit.NewAuditor(audit.DefaultFilter,
if options.DeploymentValues.AuditLogging.Value() { backends.NewPostgres(options.Database, true),
options.Auditor = audit.NewAuditor(audit.DefaultFilter, backends.NewSlog(options.Logger),
backends.NewPostgres(options.Database, true), )
backends.NewSlog(options.Logger),
)
}
options.TrialGenerator = trialer.New(options.Database, "https://v2-licensor.coder.com/trial", coderd.Keys) options.TrialGenerator = trialer.New(options.Database, "https://v2-licensor.coder.com/trial", coderd.Keys)
o := &coderd.Options{ o := &coderd.Options{
AuditLogging: options.DeploymentValues.AuditLogging.Value(), AuditLogging: true,
BrowserOnly: options.DeploymentValues.BrowserOnly.Value(), BrowserOnly: options.DeploymentValues.BrowserOnly.Value(),
SCIMAPIKey: []byte(options.DeploymentValues.SCIMAPIKey.Value()), SCIMAPIKey: []byte(options.DeploymentValues.SCIMAPIKey.Value()),
RBAC: true, RBAC: true,

View File

@ -349,7 +349,6 @@ export interface DeploymentValues {
readonly metrics_cache_refresh_interval?: number readonly metrics_cache_refresh_interval?: number
readonly agent_stat_refresh_interval?: number readonly agent_stat_refresh_interval?: number
readonly agent_fallback_troubleshooting_url?: string readonly agent_fallback_troubleshooting_url?: string
readonly audit_logging?: boolean
readonly browser_only?: boolean readonly browser_only?: boolean
readonly scim_api_key?: string readonly scim_api_key?: string
readonly provisioner?: ProvisionerConfig readonly provisioner?: ProvisionerConfig