Commit Graph

6741 Commits

Author SHA1 Message Date
Steven Masley 23ff807a27
chore: remove autocreate orgs on CreateUser (#12434)
New users must be explictly given an organization to join.
Organizations should not be auto created as a side effect of
creating a new user.
2024-03-06 07:29:28 -06:00
Dean Sheather 842799847a
chore: fix trivy scanning (#12421) 2024-03-05 19:04:16 -06:00
Michael Smith a92853c72d
fix: ensure auto-workspace creation waits until all parameters are ready (#12419)
* fix: ensure auto-workspace creation waits until all parameters are ready

* refactor: move creation blocking logic to main callback

* fix: let creation start if experimental feature is off
2024-03-05 18:42:50 -05:00
Kayla Washburn-Love 0fe109d517
chore: sort imports in our typescript code (#12417) 2024-03-05 16:31:22 -07:00
Steven Masley 17c486c5e6
chore: ensure default org always exists (#12412)
* chore: ensure default org always exists

First user just joins the org created by the migration
2024-03-05 14:06:35 -06:00
Bruno Quaresma bc30c9c013
feat(site): warn user if they leave the editor without publishing (#12406) 2024-03-05 16:55:23 -03:00
Garrett Delfosse 61bd341a36
chore: change max share level on existing port shares (#12411) 2024-03-05 13:47:01 -05:00
Cian Johnston 5106d9fc47
feat(support): fetch data concurrently (#12385)
Modifies pkg support to fetch data concurrently
2024-03-05 17:41:42 +00:00
Bruno Quaresma fb88fa8603
feat(site): display error messages on ws and access url health pages (#12430)
Close https://github.com/coder/coder/issues/12408
2024-03-05 13:27:57 -03:00
Cian Johnston 4343998c37
chore(coderd): add tests for big oidc tokens (#12424)
- Adds two test cases for a 64k+ ID token and a 64k+ userinfo payload.
- Reformats the entire test cases array as instructed by CI
2024-03-05 14:46:00 +00:00
Marcin Tojek b1f9a6dc31
fix: use timestamptz instead of timestamp (#12425)
* fix: use timestampz instead of timestamp

* fix: timestamptz
2024-03-05 14:16:29 +00:00
Marcin Tojek 3e99c0373f
fix: improve pagination parser (#12422) 2024-03-05 14:05:15 +00:00
Cian Johnston 61db293b33
feat(scripts/develop.sh): add --debug flag to develop.sh (#12423)
Adds a `--debug` flag to `scripts/develop.sh` that will start coder under `dlv debug` instead.
You can then use e.g. the following launch snippet to connect dlv:
```
    {
      "name": "Delve Remote",
      "type": "go",
      "request": "attach",
      "mode": "remote",
      "port": 12345,
    }
```

You can also run invididual CLI commands under dlv e.g.

```
debug=1 scripts/coder-dev.sh list
```

Also sets CGO_ENABLED=0 in develop.sh by default.
2024-03-05 13:29:08 +00:00
dependabot[bot] 8585863d0e
chore: bump golang.org/x/crypto from 0.19.0 to 0.20.0 (#12403)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/crypto/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-05 15:49:17 +05:00
Marcin Tojek e4fa212164
fix: always return count of workspaces (#12407) 2024-03-05 09:24:43 +01:00
Dean Sheather 0016b0200b
chore: add test for workspace proxy derp meshing (#12220)
- Reworks the proxy registration loop into a struct (so I can add a `RegisterNow` method)
- Changes the proxy registration loop interval to 15s (previously 30s)
- Adds test which tests bidirectional DERP meshing on all possible paths between 6 workspace proxy replicas

Related to https://github.com/coder/customers/issues/438
2024-03-04 23:40:15 -08:00
Steven Masley 5c6974e55f
feat: implement provisioner auth middleware and proper org params (#12330)
* feat: provisioner auth in mw to allow ExtractOrg

Step to enable org scoped provisioner daemons

* chore: handle default org handling for provisioner daemons
2024-03-04 15:15:41 -06:00
Colin Adler 926fd7ffa6
chore: add v2.6.1, v2.7.3, v2.8.4 release notes (#12415) 2024-03-04 12:23:01 -06:00
Alex 320c2eac6f
Entra External Auth for ADO (#12201) 2024-03-04 12:12:46 -06:00
Colin Adler 4439a920e4
Merge pull request from GHSA-7cc2-r658-7xpf
This fixes a vulnerability with the `CODER_OIDC_EMAIL_DOMAIN` option,
where users with a superset of the allowed email domain would be allowed
to login. For example, given `CODER_OIDC_EMAIL_DOMAIN=google.com`, a
user would be permitted entry if their email domain was
`colin-google.com`.
2024-03-04 12:52:03 -05:00
Garrett Delfosse 8f190b2016
fix: disallow out of range ports (#12414) 2024-03-04 12:25:06 -05:00
Kayla Washburn-Love 3a86ae569a
refactor: use `TableEmpty` in user settings (#12389) 2024-03-04 09:45:40 -07:00
Mathias Fredriksson 4ce1448bbe
fix(cli): generate correctly named file in DumpHandler (#12409) 2024-03-04 18:35:33 +02:00
Bruno Quaresma afcea74462
fix(site): retry and debug passing build parameters options (#12384) 2024-03-04 10:25:53 -03:00
Kayla Washburn-Love af4d0b148b
chore: add stories for `Popover` (#12387) 2024-03-01 15:43:35 -07:00
Michael Brewer 722ff50e59
fix: add service banner to workspace page (#12381) 2024-03-01 10:53:03 -07:00
Kayla Washburn-Love 4f0b885c30
chore: add stories for `UserAvatar` (#12376) 2024-03-01 10:50:17 -07:00
Kayla Washburn-Love 7824bee25f
chore: add stories for `Stack` (#12375) 2024-03-01 10:26:50 -07:00
Kayla Washburn-Love f4c888f33e
chore: add stories for `Latency` component (#12374) 2024-03-01 10:26:38 -07:00
Kayla Washburn-Love f00935baa6
chore: add stories for `TableEmpty` and `TableLoader` (#12373) 2024-03-01 10:26:30 -07:00
Cian Johnston b1c2fea78b
feat(cli): add support cmd (#12328)
Part of #12163

- Adds a command coder support bundle <workspace> that generates a 
  support bundle and writes it to coder-support-$(date +%s).zip.
- Note: this is hidden currently until the rest of the functionality is fleshed out.
2024-03-01 17:13:50 +00:00
Colin Adler e5d911462f
fix(tailnet): enforce valid agent and client addresses (#12197)
This adds the ability for `TunnelAuth` to also authorize incoming wireguard node IPs, preventing agents from reporting anything other than their static IP generated from the agent ID.
2024-03-01 09:02:33 -06:00
Colin Adler 7fbca62e08
chore: fix `Test_parseInsightsStartAndEndTime` flake (#12377)
Fixes https://github.com/coder/coder/issues/10600
2024-02-29 18:20:25 -06:00
Stephen Kirby 5a53afda46
minor change to quiet hours docs (#12338) 2024-02-29 14:50:00 -06:00
Bruno Quaresma 26b483d95e
fix(site): fix form layout for tablet viewports (#12369) 2024-02-29 16:24:06 -03:00
Steven Masley 4006974a98
fix: external auth device flow, check both queries for errors (#12367)
* fix: external auth device flow, check both queries for errors
* Minor style update

---------

Co-authored-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com>
2024-02-29 13:00:16 -06:00
Cian Johnston 9f3591add8
chore(cli): use xerrors.Errorf instead of fmt.Errorf (#12368) 2024-02-29 18:58:48 +00:00
Steven Masley cbcf4ef2c4
chore: add faking 429 responses from fake idp (#12365)
Required to trigger error condition in fe.
See pull (#12367)
2024-02-29 09:45:53 -06:00
Cian Johnston eba8cd7c07
chore: consolidate various randomPort() implementations (#12362)
Consolidates our existing randomPort() implementations to package testutil
2024-02-29 12:51:44 +00:00
Cian Johnston 4f87ba46f9
chore: update provisioner tag documentation with suggestions from #12315 (#12347)
- Adds more testcases to TestAcquirer_MatchTags
- Adds functionality to generate a table from above test
- Update provisioner tag documentation with generated table
- Apply other feedback from #12315
2024-02-29 12:31:11 +00:00
Cian Johnston e57c101200
feat: add support package and accompanying tests (#12289) 2024-02-29 11:58:33 +00:00
Cian Johnston 2bf3c72948
chore: add test for enterprise server cli (#12353) 2024-02-29 10:25:50 +00:00
Cian Johnston b17fcd9cff
ci: use linter version from Dockerfile (#12354) 2024-02-29 09:53:32 +00:00
Kayla Washburn-Love b24ad1bbf0
refactor: show parameter suggestions from user history below field (#12340) 2024-02-28 15:29:48 -07:00
Kyle Carberry b2a5e2f4c0
fix: Increase license key rows (#12352)
It was pretty hard to tell when you pasted something in
this box with only displaying a single line.

This should help!
2024-02-28 21:57:10 +00:00
Steven Masley 97f083810f
chore: provide usage instruction for CLI argument failures (#12309)
* chore: add usage to # cli arg failures
2024-02-28 12:10:17 -06:00
Marcin Tojek 30d9d84758
fix: use flag to enable Prometheus (#12345) 2024-02-28 17:58:03 +01:00
Dean Sheather bedd2c5922
fix: avoid race between replicas on start (#12344)
DERP mesh key setup would do a SELECT and then an INSERT on failure, without a lock. During some testing with multiple replicas, I managed to cause a replica to crash due to them initializing simultaneously.

Fixes:

Encountered an error running "coder server"
create coder API: insert mesh key: pq: duplicate key value violates unique constraint "site_configs_key_key"

Co-authored-by: Cian Johnston <cian@coder.com>
2024-02-28 16:14:11 +00:00
Bruno Quaresma 76273bf369
feat(site): display client errors in DERP Region health page (#12318) 2024-02-28 13:30:38 +00:00
Cian Johnston 1465ee2ed1
fix(coderd): use database.IsQueryCanceledError instead of xerrors.Is(err, context.Canceled) (#12325) 2024-02-28 21:19:57 +10:00