Commit Graph

206 Commits

Author SHA1 Message Date
Mathias Fredriksson 981cac5e28
chore: Invert `delay_login_until_ready`, now `login_before_ready` (#5893) 2023-01-27 20:07:47 +00:00
Kira Pilot 3d58e6912a
chore: removing unaudited resources (#5885)
* chore: removing unaudited resources

* cleaned up tests

* CI errors
2023-01-26 18:14:09 -05:00
Presley Pizzo 16d8cc4176
feat(site): Add deployment-wide DAU chart (#5810) 2023-01-25 22:03:47 -03:00
Cian Johnston 8735f51047
feat(coder): add authz_querier experiment (#5858)
* feat(coderd): add authz_querier experiment

* coderdtest: wire up authz_querier

* wire up AuthzQuerier in coderd

* remove things that do not yet exist in this timeline

* add newline

* comment unreachable code
2023-01-25 21:35:53 +00:00
Kira Pilot 322a4d93e1
feat: add audit log filter for autostarted and autostopped workspace builds (#5830)
* added query

* fixed query

* added example to dropdown

* added documentation

* added test

* fixed formatting

* fixed format
2023-01-24 15:34:29 -05:00
Mathias Fredriksson 138887de7e
feat: Add workspace agent lifecycle state reporting (#5785) 2023-01-24 14:24:27 +02:00
Marcin Tojek bbb208e29c
feat: Add CLI support for workspace build parameters (#5768)
* WIP

* WIP

* CLI: handle workspace build parameters

* fix: golintci

* Fix: dry run

* fix

* CLI: is mutable

* coderd: mutable

* fix: golanci

* fix: richParameterFile

* CLI: create unit tests

* CLI: update test

* Fix

* fix: order

* fix
2023-01-23 15:01:22 +01:00
Kyle Carberry 546a8931aa
chore: move vscode local out of experiments (#5773)
We've been dogfooding the VS Code extension for a while,
and it seems stable enough that it's overall positive
to release!
2023-01-20 04:32:59 +00:00
Dean Sheather 0374af23b2
fix(security)!: path-based app sharing changes (#5772)
This commit disables path-based app sharing by default. It is possible
for a workspace app on a path (not a subdomain) to make API requests to
the Coder API. When accessing your own workspace, this is not much of a
problem. When accessing a shared workspace app, the workspace owner
could include malicious javascript in the page that makes requests to
the Coder API on behalf of the visitor.

This vulnerability does not affect subdomain apps.

- Disables path-based app sharing by default. Previous behavior can be
  restored using the `--dangerous-allow-path-app-sharing` flag which is
  not recommended.

- Disables users with the site "owner" role from accessing path-based
  apps from workspaces they do not own. Previous behavior can be
  restored using the `--dangerous-allow-path-app-site-owner-access` flag
  which is not recommended.

- Adds a flag `--disable-path-apps` which can be used by
  security-conscious admins to disable all path-based apps across the
  entire deployment. This check is enforced at app-access time, not at
  template-ingest time.
2023-01-18 22:56:14 +00:00
Cian Johnston 56b996532f
feat: add --experiments flag to replace --experimental (#5767)
- Deprecates the --experimental flag
- Adds a new flag --experiments which supports passing multiple comma-separated values or a wildcard value.
- Exposes a new endpoint /api/v2/experiments that returns the list of enabled experiments.
- Deprecates the field Features.Experimental in favour of this new API.
- Updates apidocgen to support type aliases (shoutout to @mtojek).
- Modifies apitypings to support generating slice types.
- Updates develop.sh to pass additional args after -- to $CODERD_SHIM.
2023-01-18 19:12:53 +00:00
Ammar Bandukwala 501cfa9e8d
refactor: deduplicate / type license feature code (#5734) 2023-01-17 17:04:29 -06:00
Marcin Tojek 1b0560ceb4
feat: Expose workspace build parameters via API (#5743) 2023-01-17 16:24:45 +01:00
Marcin Tojek 6ebadabe4e
feat: Add basic support for rich parameters to coderd and provisionerd (#5710) 2023-01-17 11:22:11 +01:00
Colin Adler dcab87358e
feat: add stackdriver and json log options to `coder server` (#5682) 2023-01-12 20:08:23 -06:00
Dean Sheather 5a968e2f93
feat: add flag to disaable all rate limits (#5570) 2023-01-05 18:05:20 +00:00
Ben Potter 04d45f3c1c
fix!: remove AUTO_IMPORT_TEMPLATE for Kubernetes installs (#5401)
* fix!: remove AUTO_IMPORT_TEMPLATE

* chore: remove template auto importing

Co-authored-by: Dean Sheather <dean@deansheather.com>
2023-01-05 04:04:32 +00:00
Kyle Carberry 0dba2defd1
feat: enable enterprise users to specify a custom logo (#5566)
* feat: enable enterprise users to specify a custom logo

This adds a field in deployment settings that allows users to specify
the URL to a custom logo that will display in the dashboard.

This also groups service banner into a new appearance settings page.
It adds a Fieldset component to allow for modular fields moving forward.

* Fix tests
2023-01-04 15:31:45 -06:00
Jan Losinski de0601d611
feat: allow configurable username claim field in OIDC (#5507)
Co-authored-by: Colin Adler <colin1adler@gmail.com>
2023-01-04 15:16:31 -06:00
Marcin Tojek dc6d271293
feat: Build framework for generating API docs (#5383)
* WIP

* Gen

* WIP

* chi swagger

* WIP

* WIP

* WIP

* GetWorkspaces

* GetWorkspaces

* Markdown

* Use widdershins

* WIP

* WIP

* WIP

* Markdown template

* Fix: makefile

* fmt

* Fix: comment

* Enable swagger conditionally

* fix: site

* Default false

* Flag tests

* fix

* fix

* template fixes

* Fix

* Fix

* Fix

* WIP

* Formatted

* Cleanup

* Templates

* BEGIN END SECTION

* subshell exit code

* Fix

* Fix merge

* WIP

* Fix

* Fix fmt

* Fix

* Generic api.md page

* Fix merge

* Link pages

* Fix

* Fix

* Fix: links

* Add icon

* Write manifest file

* Fix fmt

* Fix: enterprise

* Fix: Swagger.Enable

* Fix: rename apidocs to apidoc

* Fix: find -not -prune

* Fix: json not available

* Fix: rename Coderd API to Coder API

* Fix: npm exec

* Fix: api dir

* Fix: by ID

* Fix: string uuid

* Fix: include deleted

* Fix: indirect go.mod

* Fix: source lib.sh

* Fix: shellcheck

* Fix: pushd popd

* Fix: fmt

* Fix: improve workspaces

* Fix: swagger-enable

* Fix

* Fix: mention only HTTP 200

* Fix: IDs

* Fix: https

* Fix: icon

* More APis

* Fix: format swagger.json

* Fix: SwaggerEndpoint

* Fix: SCRIPT_DIR

* Fix: PROJECT_ROOT

* Fix: use code tags in schemas.md

* Fix: examples

* Fix: examples

* Fix: improve format

* Fix: date-time,enums

* Fix: include_deleted

* Fix: array of

* Fix: parameter, response

* Fix: string time or null

* Workspaces: more docs

* Workspaces: more docs

* Fix: renderDisplayName

* Fix: ActiveUserCount

* Fix

* Fix: typo

* Templates: docs

* Notice: incomplete
2022-12-19 18:43:46 +01:00
Dean Sheather 31d38d4246
feat: allow http and https listening simultaneously (#5365) 2022-12-15 20:09:19 +00:00
Kyle Carberry d170d27e80
feat: add `external` property to `coder_app` (#5425)
* Add schema

* feat: add `external` property to `coder_app`

This allows exposing applications that open an external URL.
2022-12-14 15:54:18 -06:00
Garrett Delfosse 40a5c0476f
feat: add flag for token lifetime (#5385) 2022-12-12 15:39:31 -05:00
Garrett Delfosse ca0374b94f
feat: add examples to api (#5331)
Co-authored-by: Dean Sheather <dean@deansheather.com>
2022-12-09 14:29:50 -05:00
Ammar Bandukwala 1cfe5de1c5
Add Service Banners (#5272) 2022-12-06 18:38:38 +00:00
Daniel Carrion 061635c36d
feat: Allow multiple OIDC domains (#5210)
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2022-12-05 20:20:53 +02:00
Kira Pilot 65407462d1
Add audit links/kira pilot (#5156)
* got links working

* added translations

* fixed translation

* added translation for unavailable ip

* added support for group, template, user links

* cleaned up string

* added deleted label

* querying for workspace id

* remove prints

* fix/write tests

* PR feedback pt 1

* PR feedback part 2
2022-12-02 15:14:45 -05:00
Colin Adler ab3b3d5fca
feat: add debouncing to provisionerd rpc calls (#5198) 2022-12-01 16:54:53 -06:00
Mathias Fredriksson d9f2aaf3b4
feat: Add support for update checks and notifications (#4810)
Co-authored-by: Kira Pilot <kira@coder.com>
2022-12-01 19:43:28 +02:00
Kyle Carberry 8b73844f69
feat: Validate Git tokens before consuming them (#5167)
* feat: Validate Git tokens before consuming them

This works the exact same way that the Git credential manager does. It ensures the user token is valid before returning it to the client.

It's been manually tested on GitHub, GitLab, and BitBucket.

* Fix requested changes
2022-11-29 12:08:27 -06:00
Bruno Quaresma d402914eb7
refactor: Return template version name in the workspace build API (#5178) 2022-11-28 19:53:56 +00:00
Cian Johnston a4a319a76e
feat: add CODER_OIDC_IGNORE_EMAIL_VERIFIED config knob (#5165)
* Adds a configuration knob CODER_OIDC_IGNORE_EMAIL_VERIFIED that allows
  ignoring the email_verified OIDC claim
* Adds warning message at startup if CODER_OIDC_IGNORE_EMAIL_VERIFIED=true
* Adds warning whenever an unverified OIDC email is let through
* Skips flaky test on non-linux platforms

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2022-11-25 10:10:09 +00:00
Presley Pizzo 67941b4f80
chore: refactor audit page to use window function for count (#5133)
* Move count query to window function

* Unpack count and update types

* Remove count endpoint

* Update tests, wip

* Fix tests

* Update frontend, wip

* Remove space

* Fix frontend test

* Don't hang on error

* Handle no results

* Don't omit count

* Fix frontend tests
2022-11-21 11:30:41 -05:00
Marcin Tojek e86539db11
feat: Allow user to cancel workspace jobs (#5115)
* Add database column allow_user_cancel_workspace_jobs

* Adjust API

* site: typesGenerated.ts

* Expose template.allow_ in Workspaces API

* Fix: site tests

* Fix: make fmt/prettier

* Fix: enterprise

* Database tests

* Add CLI tests

* Add checkbox

* i18n

* Logic: block cancelling

* Unit tests for conditional cancel

* Fix: message

* Address PR comment

* Address PR comments

* Fix: make
2022-11-21 11:43:53 +01:00
Ammar Bandukwala acf34d4295
site: support high build time variation in progress bar (#4941) 2022-11-17 16:56:56 +00:00
Kyle Carberry fb9ca7b830
feat: Add the option to generate a trial license during setup (#5110)
This allows users to generate a 30 day free license during setup to
test out Enterprise features.
2022-11-16 17:09:49 -06:00
Kyle Carberry b6703b11c6
feat: Add external provisioner daemons (#4935)
* Start to port over provisioner daemons PR

* Move to Enterprise

* Begin adding tests for external registration

* Move provisioner daemons query to enterprise

* Move around provisioner daemons schema

* Add tags to provisioner daemons

* make gen

* Add user local provisioner daemons

* Add provisioner daemons

* Add feature for external daemons

* Add command to start a provisioner daemon

* Add provisioner tags to template push and create

* Rename migration files

* Fix tests

* Fix entitlements test

* PR comments

* Update migration

* Fix FE types
2022-11-16 16:34:06 -06:00
Marcin Tojek 32927b1a24
feat: show template.display_name on Workspace pages (#5082)
* feat: expose template.display_name via Workspaces endpoint

* Fix: MockWorkspace

* UI: Workspace stats and row

* Show template.display_name on pages

* Fix: address PR comments

* Add helper function: getDisplayWorkspaceTemplateName
2022-11-16 15:50:32 +01:00
Mathias Fredriksson c1ecc91aab
feat: Add fallback troubleshooting URL for coder agents (#5005) 2022-11-16 12:53:02 +02:00
Kyle Carberry fc0a493b72
feat: Add `no_refresh` option to Git auth configs (#5097)
This allows organizations to disable refreshing Git tokens
and instead prompt for authentication again.
2022-11-15 21:06:13 +00:00
Mathias Fredriksson 9fb710a04f
feat: Add allow everyone option to GitHub OAuth2 logins (#5086)
* feat: Add allow everyone option for GitHub OAuth

* fix: Detect team when multiple orgs are present

Co-authored-by: 李董睿煊 <dongruixuan@hotmail.com>
2022-11-15 18:56:46 +02:00
Garrett Delfosse 88f3691dcc
feat: add count to get users endpoint (#5016) 2022-11-14 17:22:57 -05:00
Ammar Bandukwala 97dbd4dc5d
Implement Quotas v3 (#5012)
* provisioner/terraform: add cost to resource_metadata

* provisionerd/runner: use Options struct

* Complete provisionerd implementation

* Add quota_allowance to groups

* Combine Quota and RBAC licenses

* Add Opts to InTx
2022-11-14 17:57:33 +00:00
Arthur Normand 9578ce9f77
OAuth now uses client TLS certs (if configured) (#5042)
* OAuth now uses client TLS certs (if configured)

* Update docs

* Cleaning

* Fix lint errors and generate static files

* Fix lint error and regenerate more static files

* Suppress lint error
2022-11-13 14:15:06 -06:00
Dean Sheather 8e5af82275
feat: add api-rate-limit flag (#5013) 2022-11-10 21:53:48 +00:00
Marcin Tojek 2042b575dc
feat: Add template display name (backend) (#4966)
* Rename to nameValidator

* Refactor: NameValid

* Fix: comment

* Define new migration

* Include display_name

* Update typesGenerated.ts

* Update meta

* Adjust tests

* CLI tests

* Fix: audit

* Fix: omitempty

* site: display_name is optional

* unit: TestUsernameValid

* entities.ts: add display_name

* site: TemplateSettingsPage.test.tsx

* Fix: TemplateSettingsForm.tsx

* Adjust tests

* Add comment to display_name column

* Fix: rename

* Fix: make

* Loosen regexp

* Fix: err check

* Fix: template name length

* Allow for whitespaces

* Update migration number
2022-11-10 21:51:09 +01:00
Garrett Delfosse 766a2ad590
chore: refactor workspace count to single route (#4809)
Co-authored-by: Presley Pizzo <presley@coder.com>
2022-11-10 13:25:46 -05:00
Garrett Delfosse d277e28427
feat: change template max_ttl to default_ttl (#4843) 2022-11-09 19:36:25 +00:00
Dean Sheather ffc24dcbe0
feat: create tracing.SlogSink for storing logs as span events (#4962) 2022-11-09 12:58:23 -06:00
Mathias Fredriksson 90c34b74de
feat: Add connection_timeout and troubleshooting_url to agent (#4937)
* feat: Add connection_timeout and troubleshooting_url to agent

This commit adds the connection timeout and troubleshooting url fields
to coder agents.

If an initial connection cannot be established within connection timeout
seconds, then the agent status will be marked as `"timeout"`.

The troubleshooting URL will be present, if configured in the Terraform
template, it can be presented to the user when the agent state is either
`"timeout"` or `"disconnected"`.

Fixes #4678
2022-11-09 17:27:05 +02:00
Garrett Delfosse 2789fb7cac
fix: move experimental flag to server (#4959) 2022-11-08 16:59:39 +00:00