Commit Graph

12434 Commits

Author SHA1 Message Date
dependabot[bot] 7fb3c5728b chore: bump gopkg.in/DataDog/dd-trace-go.v1 from 1.38.0 to 1.38.1 (#1246)
Bumps [gopkg.in/DataDog/dd-trace-go.v1](https://github.com/DataDog/dd-trace-go) from 1.38.0 to 1.38.1.
- [Release notes](https://github.com/DataDog/dd-trace-go/releases)
- [Commits](https://github.com/DataDog/dd-trace-go/compare/v1.38.0...v1.38.1)

---
updated-dependencies:
- dependency-name: gopkg.in/DataDog/dd-trace-go.v1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-02 17:16:45 +00:00
Kyle Carberry 3176e10562 fix: Use atomic value for logger in peer (#1257)
This caused many races where logs would escape the tests
by milliseconds. By using an atomic on the logger,
we can fix all of it!
2022-05-02 11:49:59 -05:00
Kyle Carberry e531c0930c fix: Write agent logs to "/tmp/coder-agent.log" for debugging (#1239)
It was difficult to obtain logs for the agent if it failed to
start for some reason. Now they'll go to a consistent spot!
2022-05-02 16:36:51 +00:00
Kyle Carberry c2b5009208 fix: Unnest workspaces command to the top-level (#1241)
This changes all "coder workspace *" commands to root.
A few of these were already at the root, like SSH. The
inconsistency made for a confusing experience.
2022-05-02 11:08:52 -05:00
Kyle Carberry 252d868298 fix: Prefix buildinfo tag with "v" (#1256)
This fixes the format of production and development build
tags.
2022-05-02 15:58:36 +00:00
Kyle Carberry d139a16446 fix: Allow remote state to be used with Terraform (#1242)
The Terraform Provisioner depended on the statefile content
being at a specific path, which disallowed the use of external
state providers. This fixes it!
2022-05-02 15:41:27 +00:00
Ben Potter aaf6aee979 fix: clarify AWS access key ID vs secret (#1231) 2022-05-02 10:28:58 -05:00
Kyle Carberry 8701e0084c feat: Update Terraform provider to support "dir" in "coder_agent" (#1219)
This allows users to specify a starting directory for shell sessions.
2022-05-02 10:27:34 -05:00
Kyle Carberry a79aa6418a fix: Use cliui.WorkspaceBuild to prevent cancel of builds jobs (#1255)
Build jobs cannot gracefully terminate because Terraform generally
cannot gracefully terminate.
2022-05-02 10:20:47 -05:00
Bruno Quaresma 75343288ff feat: Add user menu on users table (#1222) 2022-05-02 14:58:49 +00:00
dependabot[bot] a71f3934c5 chore: bump github.com/go-playground/validator/v10 (#1254)
Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator) from 10.10.1 to 10.11.0.
- [Release notes](https://github.com/go-playground/validator/releases)
- [Commits](https://github.com/go-playground/validator/compare/v10.10.1...v10.11.0)

---
updated-dependencies:
- dependency-name: github.com/go-playground/validator/v10
  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>
2022-05-02 08:21:35 -05:00
Bruno Quaresma 2043d1a4cc chore: Port ConfirmDialog from v1 (#1228) 2022-05-02 08:17:15 -05:00
dependabot[bot] 4ff5734720 chore: bump github.com/charmbracelet/charm from 0.11.0 to 0.12.0 (#1248)
Bumps [github.com/charmbracelet/charm](https://github.com/charmbracelet/charm) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/charmbracelet/charm/releases)
- [Changelog](https://github.com/charmbracelet/charm/blob/main/.goreleaser.yml)
- [Commits](https://github.com/charmbracelet/charm/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/charm
  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>
2022-05-02 07:59:46 -05:00
Kyle Carberry 34dbca7166 fix: Remove unnecessary warnings on SSH (#1243)
This disables the "Warning: Permanently added 'hostname' (RSA) to the list of known hosts."
message from appearing on every SSH. This happens because we ignore the known hosts.
2022-05-01 20:31:22 -05:00
Kyle Carberry 9b37a0de31 fix: Disable ErrorLog in http.Server (#1244)
Vault does similarly: https://github.com/hashicorp/vault/blob/e2490059d0711635e529a4efcbaa1b26998d6e1c/command/server.go#L2714

These messages have primarily been noise.
2022-05-01 20:31:12 -05:00
Kyle Carberry b948f2dab5 fix: Use environment variables for agent authentication (#1238)
* fix: Update GIT_COMMITTER_NAME to use username

This was a mistake when adding the committer fields 🤦.

* fix: Use environment variables for agent authentication

Using files led to situations where running "coder server --dev" would
break `gitssh`. This is applicable in a production environment too. Users
should be able to log into another Coder deployment from their workspace.

Users can still set "CODER_URL" if they'd like with agent env vars!
v0.5.2
2022-04-30 16:40:30 +00:00
Kyle Carberry eb606924ab fix: Update GIT_COMMITTER_NAME to use username (#1237)
This was a mistake when adding the committer fields 🤦.
2022-04-29 20:51:11 -05:00
Kyle Carberry 2acdd3b44f fix: Add "GIT_COMMITTER_*" to remove Git prompt (#1236) 2022-04-30 01:22:17 +00:00
Kyle Carberry e15566c7fa test: Regenerate GitSSHKey flake when comparing times (#1235)
This is a crazy one! The in-memory DB is fast, which allows the same
exact timestamp to occur for regenerating the key!

See: https://github.com/coder/coder/runs/6234173911?check_suite_focus=true#step:9:82
2022-04-29 20:19:16 -05:00
Kyle Carberry 81577f120a feat: Add web terminal with reconnecting TTYs (#1186)
* feat: Add web terminal with reconnecting TTYs

This adds a web terminal that can reconnect to resume sessions!
No more disconnects, and no more bad bufferring!

* Add xstate service

* Add the webpage for accessing a web terminal

* Add terminal page tests

* Use Ticker instead of Timer

* Active Windows mode on Windows
2022-04-29 17:30:10 -05:00
Kyle Carberry 23e5636dd0 fix: Use verified and primary email for GitHub signup (#1230)
This was causing a panic due to nil pointer dereference.
It required all users signing up had a public email,
which is an unreasonable requirement!
2022-04-29 15:13:35 -05:00
Bruno Quaresma 021e4cd957 refactor: Load users from the API (#1218) 2022-04-29 13:59:14 -05:00
Steven Masley 69e26c4036 feat: Allow using username in user queries (#1221)
* feat: Allow using username in user queries
* Test needs a username/email to not match empty string
2022-04-29 11:44:22 -05:00
dependabot[bot] 365c96ccaa chore: bump @fontsource/fira-code from 4.5.8 to 4.5.9 in /site (#1188)
Bumps [@fontsource/fira-code](https://github.com/fontsource/fontsource/tree/HEAD/fonts/google/fira-code) from 4.5.8 to 4.5.9.
- [Release notes](https://github.com/fontsource/fontsource/releases)
- [Changelog](https://github.com/fontsource/fontsource/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fontsource/fontsource/commits/HEAD/fonts/google/fira-code)

---
updated-dependencies:
- dependency-name: "@fontsource/fira-code"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 15:58:33 +00:00
dependabot[bot] a3decc4fba chore: bump eslint-plugin-react-hooks from 4.4.0 to 4.5.0 in /site (#1190)
Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-hooks
  dependency-type: direct:development
  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>
2022-04-29 10:55:15 -05:00
dependabot[bot] 27811976ad chore: bump ts-loader from 9.2.8 to 9.2.9 in /site (#1192)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.2.8 to 9.2.9.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.8...v9.2.9)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 10:54:54 -05:00
dependabot[bot] 3ebe1d27b1 chore: bump @playwright/test from 1.21.0 to 1.21.1 in /site (#1191)
Bumps [@playwright/test](https://github.com/Microsoft/playwright) from 1.21.0 to 1.21.1.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.21.0...v1.21.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 10:54:39 -05:00
Steven Masley 35211e2190 feat: Add user roles, but do not yet enforce them (#1200)
* chore: Rework roles to be expandable by name alone
2022-04-29 09:04:19 -05:00
Bruno Quaresma ba4c3ce3b9 feat: add filter by status on GET /users (#1206) 2022-04-29 08:29:53 -05:00
Colin Adler 82364d174f fix: ensure rtc state changes can't log after close (#1213) 2022-04-28 16:38:59 -05:00
Bruno Quaresma 00cac37a07 chore: force desktop view on mobile (#1214) 2022-04-28 17:05:03 -04:00
Presley Pizzo c16f105727 feat: Create user page (#1197)
* Add button and route

* Hook up api

* Lint

* Add basic form

* Get users on page mount

* Make cancel work

* Creating -> idle bc users page refetches

* Import as TypesGen

* Handle api errors

* Lint

* Add handler

* Add FormFooter

* Add FullPageForm

* Lint

* Better form, error, stories

bug in formErrors story

* Make detail optional

* Use Language

* Remove detail prop

* Add back autoFocus

* Remove displayError, use displaySuccess

* Lint, export Language

* Tests - wip

* Fix cancel tests

* Switch back to mock

* Add navigate to xservice

Doesn't work in test

* Move error type predicate to xservice

* Lint

* Switch to using creation mode in XState

still problems in tests

* Lint

* Lint

* Lint

* Revert "Switch to using creation mode in XState"

This reverts commit cf8442fa4b.

* Give XService a navigate action

* Add missing validation messages

* Fix XState warning

* Fix tests

IRL is broken bc I need to send org id

* Pretend user has org id and make it work

* Format

* Lint

* Switch to org ids array

* Skip lines between tests

Co-authored-by: G r e y <grey@coder.com>

* Punctuate notification messages

Co-authored-by: G r e y <grey@coder.com>
2022-04-28 16:32:23 -04:00
Mathias Fredriksson 4efde58726 fix: Restore static credentials for develop.sh (#1212) 2022-04-28 21:47:35 +03:00
Colin Adler 1661588bd1 fix: user passwords cleanup (#1202)
1. Adds benchmarks comparing bcrypt and our pbkdf2 settings
1. Changes the pbkdf2 hash iterations back to 65k. 1024 is insecure
1. Gets rid of the short circuit when the user isn't found, preventing
   timing attacks which can reveal which emails exist on a deployment

```
$ go test -bench .
goos: linux
goarch: amd64
pkg: github.com/coder/coder/coderd/userpassword
cpu: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
BenchmarkBcryptMinCost-16        	    1651	    702727 ns/op	    5165 B/op      10 allocs/op
BenchmarkPbkdf2MinCost-16        	    1669	    714843 ns/op	     804 B/op      10 allocs/op
BenchmarkBcryptDefaultCost-16    	      27	  42676316 ns/op	    5246 B/op      10 allocs/op
BenchmarkPbkdf2-16               	      26	  45902236 ns/op	     804 B/op      10 allocs/op
PASS
ok  	github.com/coder/coder/coderd/userpassword	5.036s
```
2022-04-28 18:22:38 +00:00
Steven Masley e330dc1321 feat: Switch packages for typescript generation code (#1196)
* feat: Switch packages for typescript generation code

Supports a larger set of types
  - [x] Basics (string/int/etc) 
  - [x] Maps
  - [x] Slices
  - [x] Enums
  - [x] Pointers
2022-04-28 16:59:14 +00:00
Mathias Fredriksson afc43fe95f feat: Generate random admin user password in dev mode (#1207)
* feat: Generate random admin user password in dev mode

* Add dev mode test with email/pass from env

* Set email/pass for playwright e2e test via cli flags
v0.5.1
2022-04-28 19:13:44 +03:00
Kyle Carberry eea9729704 fix: Update buildinfo package location in ldflags (#1208)
This was causing the version to not be injected!
2022-04-28 10:46:18 -05:00
Bruno Quaresma 816441eff7 feat: add organization_ids in the user(s) response (#1184) 2022-04-28 09:10:17 -05:00
Colin Adler a7fb018414 chore: update github.com/golang-migrate/migrate/v4 to v4.5.2 (#1201)
Should fix the security warning for https://github.com/advisories/GHSA-crp2-qrr5-8pq7
2022-04-27 22:04:51 +00:00
Mathias Fredriksson 8661f92a10 feat: Output username and password for code server --dev (#1193)
Fixes #825
2022-04-27 17:59:37 +03:00
Mathias Fredriksson 0b1ee3303d chore: Add Contributors section to readme (#1144)
Co-authored-by: Cian Johnston <public@cianjohnston.ie>
2022-04-27 11:48:45 +00:00
dependabot[bot] a769e8623d chore: bump @types/node from 14.18.15 to 14.18.16 in /site (#1189)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.18.15 to 14.18.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 06:04:44 +00:00
dependabot[bot] 26f3ceda93 chore: bump @typescript-eslint/parser from 5.19.0 to 5.21.0 in /site (#1160)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.19.0 to 5.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.21.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  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>
Co-authored-by: G r e y <grey@coder.com>
2022-04-27 05:52:53 +00:00
dependabot[bot] d85e36ce9e chore: bump @xstate/cli from 0.1.6 to 0.1.7 in /site (#1139)
Bumps @xstate/cli from 0.1.6 to 0.1.7.

---
updated-dependencies:
- dependency-name: "@xstate/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 01:44:19 -04:00
dependabot[bot] 7f423951bf chore: bump jest-junit from 13.1.0 to 13.2.0 in /site (#1137)
Bumps [jest-junit](https://github.com/jest-community/jest-junit) from 13.1.0 to 13.2.0.
- [Release notes](https://github.com/jest-community/jest-junit/releases)
- [Commits](https://github.com/jest-community/jest-junit/compare/v13.1.0...v13.2.0)

---
updated-dependencies:
- dependency-name: jest-junit
  dependency-type: direct:development
  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>
2022-04-27 01:43:34 -04:00
dependabot[bot] 65d5975592 chore: bump cronstrue from 2.2.0 to 2.4.0 in /site (#1165)
Bumps [cronstrue](https://github.com/bradymholt/cronstrue) from 2.2.0 to 2.4.0.
- [Release notes](https://github.com/bradymholt/cronstrue/releases)
- [Commits](https://github.com/bradymholt/cronstrue/compare/v2.2.0...v2.4.0)

---
updated-dependencies:
- dependency-name: cronstrue
  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>
2022-04-27 05:38:17 +00:00
Presley Pizzo 23a1a4dc40 refactor: Add components for styling forms (#1169)
* Add FormFooter

* Add FullPageForm

* Lint

* Make detail optional

* Use Language
2022-04-26 19:45:48 -04:00
Bruno Quaresma 454ccf7547 refactor: remove the user name (#1185) 2022-04-26 19:04:57 +00:00
Ben Potter 22668c388c feat: initial docs pages (#1107)
* docs structure and edits to getting started

* draft for about page

* skeleton for concepts page

* attempt at explaining templates

* left-align tables

* add best practices and variables

* update structrure

* update structure

* templates are shared

* workspaces docs

* remove coming soon

* fix typos

* docs structure and edits to getting started

* draft for about page

* skeleton for concepts page

* attempt at explaining templates

* left-align tables

* add best practices and variables

* update structrure

* update structure

* templates are shared

* workspaces docs

* remove coming soon

* fix typos

* fix typos

* Update docs/about.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* remove line breaks between bullets

* rename variables to parameters

* reduce limits

* chore: edit text

* revert some changes, fix footnotes

Co-authored-by: Katie Horne <katie@coder.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-26 12:10:50 -05:00
Kyle Carberry 603b7da413 test: Wrap provisionerd channel closes in sync.Once (#1181)
This caused a few flakes, so figured I'd tackle all of them:
https://github.com/coder/coder/runs/6167856950?check_suite_focus=true#step:9:246
2022-04-26 09:44:16 -05:00