Commit Graph

687 Commits

Author SHA1 Message Date
ffbaa93722 feat: add experimental flag (#4364) 2022-10-04 19:45:00 +00:00
d165d76338 feat: static error page in applications handlers (#4299) 2022-10-05 02:30:55 +10:00
cd4ab97efa feat: Convert rego queries into SQL clauses (#4225)
* feat: Convert rego queries into SQL clauses

* Fix postgres quotes to single quotes

* Ensure all test cases can compile into SQL clauses

* Do not export extra types

* Add custom query with rbac filter

* First draft of a custom authorized db call

* Add comments + tests

* Support better regex style matching for variables

* Handle jsonb arrays

* Remove auth call on workspaces

* Fix PG endpoints test

* Match psql implementation

* Add some comments

* Remove unused argument

* Add query name for tracking

* Handle nested types

This solves it without proper types in our AST.
Might bite the bullet and implement some better types

* Add comment

* Renaming function call to GetAuthorizedWorkspaces
2022-10-04 11:35:33 -04:00
bf63cc929a fix: Fix audit search query (#4352) 2022-10-03 20:56:54 -03:00
738a38d71f chore: remove resources calls (#4344) 2022-10-03 21:01:13 +00:00
9bc0d06aa0 fix: Install Terraform once and only log >=500 (#4339)
Fixes #4302.
2022-10-03 15:19:02 -05:00
15d7b78527 fix: Handle invalid resource types and actions (#4341)
* fix: Handle invalid resource types and actions

* Return all values if invalid

* Use types
2022-10-03 15:29:01 -03:00
0a95ba62b1 chore: Deprecate old cookie value (#4336)
Older clis will need to be updated.
Modern clis cannot communicate with <8.15 coderd
2022-10-03 13:04:22 -04:00
df2649ed2a fix: Test flake in TestWorkspaceStatus (#4333)
This also changes the status to be on the workspace build, since
that's where the true value is calculated. This exposed a bug where
jobs could never enter the canceled state unless fetched by a
provisioner daemon, which was nice to fix!

See: https://github.com/coder/coder/actions/runs/3175304200/jobs/5173479506
2022-10-03 11:43:11 -05:00
d11d83cc98 chore: Template-admin cannot create/update/delete workspaces (#4329)
This perm was changed to only be able to read workspaces
2022-10-03 11:20:13 -05:00
4919975f13 chore: Remove template-admin can create/update/delete workspaces (#4280)
Cannot crud someone else's workspace
2022-10-02 18:54:57 -04:00
139bc6f58b chore: derive workspace status on backend (#4284) 2022-09-30 17:36:21 -04:00
d8008de77a chore: Optimize Filter() for small lists (#4282) 2022-09-30 15:55:08 -04:00
69c73b2d28 feat: workspace quotas (#4184) 2022-09-30 14:01:20 -04:00
4b540b7c42 docs: simplify Docker quickstart (#4257) 2022-09-29 17:55:15 -05:00
028a4edbd4 chore: Add flusher to make implement http.Flusher interface (#4255) 2022-09-29 01:16:11 +00:00
6d2b7ea3ba fix(audit): only generate diff on request success (#4253) 2022-09-28 17:28:33 -05:00
9339d597b9 fix(audit): properly set old workspace in putWorkspaceTTL (#4251) 2022-09-28 16:50:21 -05:00
574635f43d chore: ignore db spans in workspace watch endpoint (#4250) 2022-09-28 16:17:24 -05:00
47a53ce6c5 coderd: treat email case insensitively (#4215) 2022-09-27 03:51:58 +00:00
2f0d30d7b5 chore: Reduce the amount of bytes allocated for Filter (#4209)
Reuse parsed data structure for subsequent queries
2022-09-26 15:16:46 -04:00
48c0b59447 fix: Log out of legacy cookie (#4202) 2022-09-26 14:20:38 -04:00
39cf329404 fix: Replace access URL for built-in DERP servers (#4197)
Fixes #4195.
2022-09-26 12:56:04 -05:00
ee4b934601 Add Users Last Seen At (#4192) 2022-09-26 15:31:03 +00:00
28428d1294 feat: Add custom version names (#4186)
Fixes #4137.
2022-09-23 20:17:36 -05:00
3c215a83b6 feat: Allow admins to create workspaces (#4183)
Fixes #3263.

This is now possible via the API, but still isn't possible via the UI.
2022-09-23 20:17:10 -05:00
b64f624d17 fix: Remove unused scopes from parameter computation (#4171) 2022-09-23 16:09:45 -05:00
15b9a59786 chore: only trace rbac.Filter (#4177) 2022-09-23 15:21:56 -05:00
95aea104c7 chore: ignore traces from (*API).workspaceAgentCoordinate after accept (#4178) 2022-09-23 15:21:44 -05:00
4c8be34d81 feat: add health check monitoring to workspace apps (#4114) 2022-09-23 15:51:04 -04:00
8738755ffc chore: Compile rego once to save CPU cycles in testing (#4169)
Compiling rego isn't very fast, so this should speed up tests in CI!
2022-09-23 16:26:04 +00:00
1e1967e0db fix: Avoid using hijacked http.ResponseWriter in workspaceAgentReportStats (#4165) 2022-09-23 19:08:56 +03:00
2e30d0512e chore: Move scope into the same auth call (#4162)
Scopes now are enforced in the same Authorize call as the roles. 
Vs 2 `Authorize()` calls
2022-09-23 11:07:30 -04:00
6deef06ad2 feat: secure and cross-domain subdomain-based proxying (#4136)
Co-authored-by: Kyle Carberry <kyle@carberry.com>
2022-09-22 22:30:32 +00:00
a7ee8b31e0 fix: Don't use StatusAbnormalClosure (#4155) 2022-09-22 18:26:05 +00:00
b77d6bdd91 fix: Panic when loading coordination override (#4152)
This was broken because of browser-only. This should fix it!

Signed-off-by: Kyle Carberry <kyle@carberry.com>

Signed-off-by: Kyle Carberry <kyle@carberry.com>
2022-09-22 11:03:49 -05:00
7ad4276224 feat: Add browser-only connections to Enterprise (#4135)
* feat: Add browser-only connections to Enterprise

Fixes #4131.

* Fix formatting
2022-09-22 15:14:22 +00:00
5de6f86959 feat: trace httpapi.{Read,Write} (#4134) 2022-09-21 17:07:00 -05:00
d30945c5c5 feat: bump workspace deadline on user activity (#4119)
Resolves #2995
2022-09-20 21:17:24 +00:00
5e2efb68f1 feat: add SCIM provisioning via Okta (#4132)
Co-authored-by: Ben Potter <ben@coder.com>
2022-09-20 15:16:26 -05:00
bc47d7ce69 feat: Add extra fields to the audit filter (#4123) 2022-09-20 13:07:21 -03:00
3618b098cb fix: Return deprecation error when using WebRTC endpoint (#4130)
Fixes #4126.
2022-09-20 09:56:19 -05:00
67230babc0 fix: properly shutdown tracers (#4127) 2022-09-19 23:35:18 -05:00
db0ba8588e chore: Refactor Enterprise code to layer on top of AGPL (#4034)
* chore: Refactor Enterprise code to layer on top of AGPL

This is an experiment to invert the import order of the Enterprise
code to layer on top of AGPL.

* Fix Garrett's comments

* Add pointer.Handle to atomically obtain references

This uses a context to ensure the same value persists through
multiple executions to `Load()`.

* Remove entitlements API from AGPL coderd

* Remove AGPL Coder entitlements endpoint test

* Fix warnings output

* Add command-line flag to toggle audit logging

* Fix hasLicense being set

* Remove features interface

* Fix audit logging default

* Add bash as a dependency

* Add comment

* Add tests for resync and pubsub, and add back previous exp backoff retry

* Separate authz code again

* Add pointer loading example from comment

* Fix duplicate test, remove pointer.Handle

* Fix expired license

* Add entitlements struct

* Fix context passing
2022-09-19 23:11:01 -05:00
714c366d16 chore: Remove WebRTC networking (#3881)
* chore: Remove WebRTC networking

* Fix race condition

* Fix WebSocket not closing
2022-09-19 19:46:29 -05:00
72d6731924 fix: Only update workspace LastUsed when the connection payload has changed (#4115)
This was causing every workspace to update last used to time.Now() when
coderd was restarted!
2022-09-19 14:11:18 -05:00
153e96f574 fix: use consistent tracer name (#4117) 2022-09-19 13:46:26 -05:00
29d804e692 feat: add API key scopes and application_connect scope (#4067) 2022-09-19 17:39:02 +00:00
adad347902 refactor: Refactor audit logs count to support filtering (#4113) 2022-09-19 17:08:25 +00:00
bf8d823ae3 feat: Add audit log filters in the API (#4078) 2022-09-19 10:37:33 -03:00