Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ type DeploymentValues struct {
MetricsCacheRefreshInterval clibase.Duration `json:"metrics_cache_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"`
AuditLogging clibase.Bool `json:"audit_logging,omitempty" typescript:",notnull"`
BrowserOnly clibase.Bool `json:"browser_only,omitempty" typescript:",notnull"`
SCIMAPIKey clibase.String `json:"scim_api_key,omitempty" typescript:",notnull"`
Provisioner ProvisionerConfig `json:"provisioner,omitempty" typescript:",notnull"`
Expand Down Expand Up @@ -1262,16 +1261,6 @@ when required by your organization's security policy.`,
Value: &c.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",
Description: "Whether Coder only allows connections to workspaces via the browser.",
Expand Down
1 change: 0 additions & 1 deletion docs/api/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ curl -X GET http://coder-server:8080/api/v2/deployment/config \
"user": {}
},
"agent_stat_refresh_interval": 0,
"audit_logging": true,
"autobuild_poll_interval": 0,
"browser_only": true,
"cache_directory": "string",
Expand Down
3 changes: 0 additions & 3 deletions docs/api/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"user": {}
},
"agent_stat_refresh_interval": 0,
"audit_logging": true,
"autobuild_poll_interval": 0,
"browser_only": true,
"cache_directory": "string",
Expand Down Expand Up @@ -2098,7 +2097,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"user": {}
},
"agent_stat_refresh_interval": 0,
"audit_logging": true,
"autobuild_poll_interval": 0,
"browser_only": true,
"cache_directory": "string",
Expand Down Expand Up @@ -2317,7 +2315,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. |
| `agent_fallback_troubleshooting_url` | [clibase.URL](#clibaseurl) | false | | |
| `agent_stat_refresh_interval` | integer | false | | |
| `audit_logging` | boolean | false | | |
| `autobuild_poll_interval` | integer | false | | |
| `browser_only` | boolean | false | | |
| `cache_directory` | string | false | | |
Expand Down
10 changes: 0 additions & 10 deletions docs/cli/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ coder server [flags]

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

| | |
Expand Down
13 changes: 5 additions & 8 deletions enterprise/cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,15 @@ func (r *RootCmd) server() *clibase.Cmd {
}
}
options.DERPServer.SetMeshKey(meshKey)

if options.DeploymentValues.AuditLogging.Value() {
options.Auditor = audit.NewAuditor(audit.DefaultFilter,
backends.NewPostgres(options.Database, true),
backends.NewSlog(options.Logger),
)
}
options.Auditor = audit.NewAuditor(audit.DefaultFilter,
backends.NewPostgres(options.Database, true),
backends.NewSlog(options.Logger),
)

options.TrialGenerator = trialer.New(options.Database, "https://v2-licensor.coder.com/trial", coderd.Keys)

o := &coderd.Options{
AuditLogging: options.DeploymentValues.AuditLogging.Value(),
AuditLogging: true,
BrowserOnly: options.DeploymentValues.BrowserOnly.Value(),
SCIMAPIKey: []byte(options.DeploymentValues.SCIMAPIKey.Value()),
RBAC: true,
Expand Down
1 change: 0 additions & 1 deletion site/src/api/typesGenerated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ export interface DeploymentValues {
readonly metrics_cache_refresh_interval?: number
readonly agent_stat_refresh_interval?: number
readonly agent_fallback_troubleshooting_url?: string
readonly audit_logging?: boolean
readonly browser_only?: boolean
readonly scim_api_key?: string
readonly provisioner?: ProvisionerConfig
Expand Down