Commit Graph

430 Commits

Author SHA1 Message Date
e847e7386a fix: Resolve flake in TestPortForward (#4069) 2022-09-14 20:21:53 -05:00
0f8c2f592e feat: Use Tailscale networking by default (#4003)
* feat: Use Tailscale networking by default

Removal of WebRTC code will happen in another PR, but it
felt dangerious to default and remove in a single commit.

Ideally, we can release this version and collect final
thoughts and  feedback before a full commitment.

* Remove UNIX forwarding

Tailscale doesn't support this, and adding support
for it shouldn't block our rollout. Customers can
always forward over SSH.

* Update cli/portforward_test.go

Co-authored-by: Dean Sheather <dean@deansheather.com>

Co-authored-by: Dean Sheather <dean@deansheather.com>
2022-09-13 15:55:56 -05:00
9b5ee8f267 feat: Implement (but not enforce) CSRF for FE requests (#3786)
Future work is to enforce CSRF

Co-authored-by: Presley Pizzo <presley@coder.com>
2022-09-13 15:26:46 -04:00
9ab437d6e2 feat: Add serving applications on subdomains and port-based proxying (#3753)
Co-authored-by: Dean Sheather <dean@deansheather.com>
2022-09-14 03:31:33 +10:00
214e59452f feat: Show custom resource icons in the UI (#4020) 2022-09-13 11:32:59 -03:00
57c7fcf27f fix: Ignore deleted users when signing up with OAuth (#4036)
This prevented a deleted user from signing up again when they
were already linked with a previous account.
2022-09-13 07:33:35 -05:00
850a83097c feat: Allow deleting users (#4028)
* Add deleted column to the users table

* Fix user indexes

* Add frontend

* Add test
2022-09-12 23:24:20 +00:00
b4c29f34c3 fix: Always use UTC time when inserting stats (#4009)
Fixes a flake reported by @mafredri
2022-09-12 16:01:42 +00:00
29bac36816 feat: add workspace auditing (#3966) 2022-09-10 11:07:45 -05:00
8a94b72c7d feat: Allow hide resources (#3977) 2022-09-09 16:38:00 -03:00
f6aa025a01 feat: use active users instead of total users in Template views (#3900) 2022-09-09 19:30:31 +00:00
abb804f2de feat: add template/template version auditing (#3965) 2022-09-09 11:34:23 -05:00
4e26e325a6 feat: add auditing to user routes (#3961) 2022-09-08 21:16:16 -05:00
7dc73ed6c6 feat: add description to audit log responses (#3949) 2022-09-08 09:36:34 -05:00
e1afec6db4 fix: Optionally consume email_verified if it's provided (#3957)
This reduces our OIDC requirement claims to only `email`. If `email_verified`
is provided and is `false`, we will block authentication.

Fixes #3954.
2022-09-08 14:06:00 +00:00
519d724ca4 fix: Sort resources by name (#3941)
Fixes #3489.
2022-09-08 03:16:26 +00:00
c8d9c44aba fix: Sort workspaces by last used then name (#3943) 2022-09-07 21:16:53 +00:00
720c9dadcf fix: Remove name from workspace builds (#3937)
Fixes #1561.
2022-09-07 19:49:57 +00:00
762063ed8f fix: add avatar_url to user object in audit log response (#3939) 2022-09-07 19:22:04 +00:00
3d6d51fbd0 feat: audit log api (#3898) 2022-09-07 16:38:19 +00:00
ad24404018 fix: fix creating users with wrong login type (#3929) 2022-09-07 10:37:15 -05:00
bb17fe5398 Use go run when executing goimports in gen 2022-09-06 19:59:14 -05:00
65d63f9167 Use go run for executing goimports 2022-09-06 19:53:39 -05:00
a7cdec5d39 Feature server implementation (#3899)
* Feature server implementation

Signed-off-by: Spike Curtis <spike@coder.com>

* Fix imports

Signed-off-by: Spike Curtis <spike@coder.com>

Signed-off-by: Spike Curtis <spike@coder.com>
2022-09-06 18:59:10 +00:00
3c94ca9cbe fix: Skip empty values so Terraform can use the default value (#3902) 2022-09-06 15:15:19 -03:00
4f0105ef7e feat: add orphan support (#3849)
* feat: add resource orphanage

* feat: deny custom state in build for regular users

* Minor protoc improvements
2022-09-06 17:07:00 +00:00
00f05e798b Fix avatar_url dump.sql 2022-09-04 16:56:09 +00:00
d8f9537880 Fix avatar_url database type 2022-09-04 16:55:25 +00:00
05e2806ff3 feat: Add profile pictures to OAuth users (#3855)
This supports GitHub and OIDC login for profile pictures!
2022-09-04 11:44:27 -05:00
67c4605370 chore: Reduce test times (#3856)
* chore: Reduce test times

* Rename IncludeProvisionerD to IncludeProvisionerDaemon

* Make  TestTemplateDAUs use Tailnet
2022-09-04 11:28:09 -05:00
ff0aa8d742 feat: add unique ids to all HTTP requests (#3845) 2022-09-02 13:04:29 -05:00
55c13c8ff9 chore: fully implement enterprise audit pkg (#3821) 2022-09-02 16:42:28 +00:00
4c18034260 fix: Prevent autobuild executor from slowing down API requests (#3726)
With just a few workspaces, the autobuild executor can slow down API
requests every time it runs. This is because we started a long running
transaction and checked all eligible (for autostart) workspaces inside
that transaction. PostgreSQL doesn't know if we're modifying rows and as
such is locking the tables for read operations.

This commit changes the behavior so each workspace is checked in its own
transaction reducing the time the table/rows needs to stay locked.

For now concurrency has been arbitrarily limited to 10 workspaces at a
time, this could be made configurable or adjusted as the need arises.
2022-09-02 13:24:47 +03:00
04b03792cb feat: add last used to Workspaces page (#3816) 2022-09-02 00:08:51 +00:00
30f8fd9b95 Daily Active User Metrics (#3735)
* agent: add StatsReporter

* Stabilize protoc
2022-09-01 14:58:23 -05:00
e0cb52ceea fix: Use an unnamed region instead of erroring for DERP (#3810) 2022-09-01 18:43:52 +00:00
6826b976d7 fix: Add latency-check for DERP over HTTP(s) (#3788)
* fix: Add latency-check for DERP over HTTP(s)

This fixes scenarios where latency wasn't being reported if
a connection had UDP entirely blocked.

* Add inactivity ping

* Improve coordinator error reporting consistency
2022-09-01 16:41:47 +00:00
9bd83e5ec7 feat: Add Tailscale networking (#3505)
* fix: Add coder user to docker group on installation

This makes for a simpler setup, and reduces the likelihood
a user runs into a strange issue.

* Add wgnet

* Add ping

* Add listening

* Finish refactor to make this work

* Add interface for swapping

* Fix conncache with interface

* chore: update gvisor

* fix tailscale types

* linting

* more linting

* Add coordinator

* Add coordinator tests

* Fix coordination

* It compiles!

* Move all connection negotiation in-memory

* Migrate coordinator to use net.conn

* Add closed func

* Fix close listener func

* Make reconnecting PTY work

* Fix reconnecting PTY

* Update CI to Go 1.19

* Add CLI flags for DERP mapping

* Fix Tailnet test

* Rename ConnCoordinator to TailnetCoordinator

* Remove print statement from workspace agent test

* Refactor wsconncache to use tailnet

* Remove STUN from unit tests

* Add migrate back to dump

* chore: Upgrade to Go 1.19

This is required as part of #3505.

* Fix reconnecting PTY tests

* fix: update wireguard-go to fix devtunnel

* fix migration numbers

* linting

* Return early for status if endpoints are empty

* Update cli/server.go

Co-authored-by: Colin Adler <colin1adler@gmail.com>

* Update cli/server.go

Co-authored-by: Colin Adler <colin1adler@gmail.com>

* Fix frontend entites

* Fix agent bicopy

* Fix race condition for the last node

* Fix down migration

* Fix connection RBAC

* Fix migration numbers

* Fix forwarding TCP to a local port

* Implement ping for tailnet

* Rename to ForceHTTP

* Add external derpmapping

* Expose DERP region names to the API

* Add global option to enable Tailscale networking for web

* Mark DERP flags hidden while testing

* Update DERP map on reconnect

* Add close func to workspace agents

* Fix race condition in upstream dependency

* Fix feature columns race condition

Co-authored-by: Colin Adler <colin1adler@gmail.com>
2022-08-31 20:09:44 -05:00
00da01fdf7 chore: rearrange audit logging code into enterprise folder (#3741) 2022-08-31 21:12:54 +00:00
5362f4636e feat: show agent version in UI and CLI (#3709)
This commit adds the ability for agents to set their version upon start.
This is then reported in the UI and CLI.
2022-08-31 16:33:50 +01:00
aa9a1c3f56 fix: Prevent suspending owners (#3757) 2022-08-31 15:26:36 +00:00
a410ac42f5 fix: Use first user for telemetry email (#3761)
This was causing other users email to be sent, which isn't desired.
2022-08-30 19:00:23 +00:00
f037aad456 fix: Accepts empty string for the icon prop to remove it (#3760) 2022-08-30 18:48:03 +00:00
0708e37a38 feat: Sort templates by workspaces count (#3734) 2022-08-30 17:27:33 +00:00
cc346afce6 Use licenses to populate the Entitlements API (#3715)
* Use licenses for entitlements API

Signed-off-by: Spike Curtis <spike@coder.com>

* Tests for entitlements API

Signed-off-by: Spike Curtis <spike@coder.com>

* Add commentary about FeatureService

Signed-off-by: Spike Curtis <spike@coder.com>

* Lint

Signed-off-by: Spike Curtis <spike@coder.com>

* Quiet down the logs

Signed-off-by: Spike Curtis <spike@coder.com>

* Tell revive it's ok

Signed-off-by: Spike Curtis <spike@coder.com>

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-29 16:45:40 -07:00
053fe6ff61 feat: add panic recovery middleware (#3687) 2022-08-29 17:00:52 -05:00
6285d65b6a fix: remove (http.Server).ReadHeaderTimeout (#3730)
* fix: remove `(http.Server).ReadHeaderTimeout`

Fixes https://github.com/coder/coder/issues/3710. It caused some race
condition for websockets where the server sent the first message.

* comment why disabled
2022-08-29 12:07:49 -05:00
34d902ebf1 fix: Fix properly selecting workspace apps by agent (#3684) 2022-08-29 08:56:52 -04:00
dc9b4155e0 feat: Generate DB unique constraints as enums (#3701)
* feat: Generate DB unique constraints as enums

This fixes a TODO from #3409.
2022-08-29 14:56:51 +03:00
ccabec6dd1 fi stop tracing 4xx http status codes as errors (#3707) 2022-08-26 15:18:42 +00:00