Commit Graph

6667 Commits

Author SHA1 Message Date
Steven Masley d2998c6b7b
feat: implement organization context in the cli (#12259)
* feat: implement organization context in the cli

`coder org show current`
2024-02-26 10:03:49 -06:00
Steven Masley f44c89d200
chore: enforce orgid in audit logs where required (#12283)
* chore: enforce orgid in audit logs where required
2024-02-26 08:27:33 -06:00
Cian Johnston 74b749b890
chore(coderd): add test to assert agent token invalid when workspace deleted (#12290) 2024-02-26 13:27:00 +00:00
Muhammad Atif Ali 7eed40bd99
chore(dogfood): bump jetbrains-gateway module to 1.0.6 (#12298) 2024-02-26 11:57:40 +00:00
Spike Curtis b0afffbafb
feat: use v2 API for agent metadata updates (#12281)
Switches the agent to report metadata over the v2 API.

Fixes #10534
2024-02-26 09:50:19 +04:00
Gary Reynolds 7a245e61b1
chore(docs): inline OIDC flow diagram (#12255)
When viewing the Authentication page, the diagram showing the flow is a useful
resource for understanding the rest of the page.

Rather than linking to a specific version of the SVG, inline it as part of the
documentation.
2024-02-26 04:48:01 +00:00
Michael Brewer 245e280531
docs: add gitlab self-managed example (#12295) 2024-02-25 10:11:13 -05:00
Eric Paulsen fb198ac99c
docs: add steps for postgres server verification (#12072)
* docs: add steps for postgres server verification

* make: fmt

* refactor to guide

* add manifest
2024-02-25 01:16:56 +00:00
dependabot[bot] 7e797e90ac
chore: bump golang.org/x/tools from 0.17.0 to 0.18.0 (#12209)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-24 10:42:50 +05:00
Steven Masley c33c452663
fix: use default org over index [0] for new scim (#12284) 2024-02-23 15:31:36 -06:00
Colin Adler 0dd126e025
chore: upgrade `github.com/hashicorp/hc-install` to `v0.6.3` (#12288)
Removes a dependency on a vulnerable version of github.com/cloudflare/circl
2024-02-23 13:41:58 -06:00
Bruno Quaresma 79480ca587
feat(site): display build logs on template creation (#12271) 2024-02-23 12:23:52 -07:00
Steven Masley 13359aa16f
chore: drop github per user rate limit tracking (#12286)
* chore: drop github per user rate limit tracking

Rate limits for authenticated requests are per user.
This would be an excessive number of prometheus labels,
so we only track the unauthorized limit.
2024-02-23 11:17:52 -06:00
Marcin Tojek 90db6683c4
fix: refresh entitlements after creating first user (#12285) 2024-02-23 16:48:24 +00:00
Cian Johnston 2cb9bfd517
refactor(coderd): move healthcheck report structs to codersdk (#12279)
Moves healthcheck report-related structs from coderd/healthcheck to codersdk
This prevents an import cycle when adding a codersdk.Client method to hit /api/v2/debug/health.
2024-02-23 13:13:28 +00:00
Spike Curtis aa7a9f5cc4
feat: use v2 API for agent lifecycle updates (#12278)
Agent uses the v2 API to post lifecycle updates.

Part of #10534
2024-02-23 15:24:28 +04:00
Dean Sheather ee7828a166
chore: fix wsproxy test flake (#12280)
* chore: fix wsproxy test flake

* fixup! chore: fix wsproxy test flake
2024-02-23 21:19:54 +10:00
Spike Curtis 4cc132cea0
feat: switch agent to use v2 API for sending logs (#12068)
Changes the agent to use the new v2 API for sending logs, via the logSender component.

We keep the PatchLogs function around, but deprecate it so that we can test the v1 endpoint.
2024-02-23 11:27:15 +04:00
Spike Curtis af3fdc68c3
chore: refactor agent routines that use the v2 API (#12223)
In anticipation of needing the `LogSender` to run on a context that doesn't get immediately canceled when you `Close()` the agent, I've undertaken a little refactor to manage the goroutines that get run against the Tailnet and Agent API connection.

This handles controlling two contexts, one that gets canceled right away at the start of graceful shutdown, and another that stays up to allow graceful shutdown to complete.
2024-02-23 11:04:23 +04:00
Kayla Washburn-Love 66585f042f
feat: support markdown in update messages (#12273) 2024-02-22 16:14:06 -07:00
Kayla Washburn-Love 7e6cb66a50
feat(site): allow creating a workspace without connecting optional external auth providers (#12251) 2024-02-22 10:27:36 -07:00
Kayla Washburn-Love b8a53230c7
chore: revert "refactor(site): verify external auth before display ws form (#11777)" (#12183) 2024-02-22 09:44:30 -07:00
Cian Johnston 53e8f9c0f9
fix(coderd): only allow untagged provisioners to pick up untagged jobs (#12269)
Alternative solution to #6442

Modifies the behaviour of AcquireProvisionerJob and adds a special case for 'un-tagged' jobs such that they can only be picked up by 'un-tagged' provisioners.

Also adds comprehensive test coverage for AcquireJob given various combinations of tags.
2024-02-22 15:04:31 +00:00
Marcin Tojek aa7a12a5ec
docs: document Terraform variables (#12270) 2024-02-22 15:26:53 +01:00
Steven Masley d4d8424ce0
fix: fix GetOrganizationsByUserID error when multiple organizations exist (#12257)
* test: fetching user orgs fails if multi orgs in pg db
* fix: GetOrganizationsByUserID fixed if multi orgs exist
2024-02-22 08:14:48 -06:00
Spike Curtis da376549a3
fix: stop waiting for Agent in a goroutine in ssh test (#12268)
Fixes race seen here: https://github.com/coder/coder/runs/21852483781

What happens is that the agent connects, completes the test, and then disconnects before the Eventually condition runs.  The waiter then times out because it's looking for a connected agent.

Then, since it's a `require` in a goroutine, that causes the `tGo` cleanup to hang and the whole test suite to timeout after 10 minutes.

Anyway, `agenttest.New` doesn't block, and we don't actually need to wait for the agent to connect, since a successful SSH session is evidence that it connected.
2024-02-22 17:01:06 +04:00
dependabot[bot] a31a05e2cb
chore: bump github.com/valyala/fasthttp from 1.51.0 to 1.52.0 (#12210)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 11:59:29 +05:00
dependabot[bot] 307a206605
chore: bump github.com/prometheus/client_model from 0.5.0 to 0.6.0 (#12212)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 11:59:17 +05:00
Asher 51d178d538
feat: add OAuth2 user settings page (#12237) 2024-02-21 14:16:55 -09:00
dependabot[bot] 3cbe14fdad
chore: bump ip from 2.0.0 to 2.0.1 in /site (#12238)
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 14:06:43 -09:00
Asher 7eb2beccea
fix: redirect from oauth2 authorization page (#12241)
At the moment it just says "you are not authorized", but we want to
automatically redirect to the login page.
2024-02-21 13:30:33 -09:00
Steven Masley c3a7b13690
chore: remove organization requirement from convertGroup() (#12195)
* feat: convertGroups() no longer requires organization info

Removing role information from some users in the api. This info is
excessive and not required. It is costly to always include
2024-02-21 15:58:11 -06:00
Steven Masley 3f65bd14cc
fix: ignore surronding whitespace for cli config (#12250)
* fix: ignore surronding whitespace for cli config

Cli config files break if you edit them manually with any editor.
Editors drop a newline at the end, and we not break on this.
If a developer manually edits a file, it should still work
2024-02-21 13:03:41 -06:00
Kayla Washburn-Love 475c3650ca
feat: add support for optional external auth providers (#12021) 2024-02-21 11:18:38 -07:00
Bruno Quaresma 78c9f82719
fix(site): fix error when typing long number on ttl (#12249) 2024-02-21 17:29:29 +00:00
Michael Smith 1d254f4680
fix: add tests and improve accessibility for useClickable (#12218) 2024-02-21 10:59:13 -05:00
Bruno Quaresma a827185b6d
refactor: move auto fill feature into an experiment (#12230) 2024-02-21 11:48:34 -03:00
Marcin Tojek c230bcf5ca
fix: previous parameter value is not a number (#12246) 2024-02-21 15:44:45 +01:00
Bruno Quaresma b4fb754b2d
feat(site): show previous agent scripts logs (#12233) 2024-02-21 11:42:34 -03:00
Bruno Quaresma 0398e3c531
chore(site): fix storybook for agent row with port forward button (#12247) 2024-02-21 14:32:39 +00:00
Bruno Quaresma cc4cefbbee
chore(site): fix storybook test (#12245) 2024-02-21 14:17:18 +00:00
Bruno Quaresma ebe05820c9
fix(site): fix web terminal bottom overflow (#12228) 2024-02-21 11:02:53 -03:00
dependabot[bot] 91c3df785f
chore: bump github.com/aws/smithy-go from 1.19.0 to 1.20.0 (#12206)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 13:09:18 +05:00
dependabot[bot] 519cf5935f
chore: bump github.com/prometheus/common from 0.46.0 to 0.47.0 (#12207)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 11:36:52 +05:00
Asher 3d742f64e6
fix: move oauth2 routes (#12240)
* fix: move oauth2 routes

From /login/oauth2/* to /oauth2/*.

/login/oauth2 causes /login to no longer get served by the frontend,
even if nothing is actually served on /login itself.

* Add forgotten comment on delete
2024-02-20 17:01:25 -09:00
Asher 4d39da294e
feat: add oauth2 token exchange (#12196)
Co-authored-by: Steven Masley <stevenmasley@gmail.com>
2024-02-20 14:58:43 -09:00
Steven Masley 07cccf9033
feat: disable directory listings for static files (#12229)
* feat: disable directory listings for static files

Static file server handles serving static asset files (js, css, etc).
The default file server would also list all files in a directory.
This has been changed to only serve files.
2024-02-20 15:50:30 -06:00
Steven Masley 2dac34276a
fix: add postgres triggers to remove deleted users from user_links (#12117)
* chore: add database test fixture to insert non-unique linked_ids
* chore: create unit test to exercise failed email change bug
* fix: add postgres triggers to keep user_links clear of deleted users
* Add migrations to prevent deleted users with links
* Force soft delete of users, do not allow un-delete
2024-02-20 13:19:38 -06:00
Garrett Delfosse b342bd7869
feat: add port sharing frontend (#12119) 2024-02-20 13:26:34 -05:00
Bruno Quaresma 0021c2f906
fix(site): fix parameters field size (#12231) 2024-02-20 13:54:07 -03:00