Commit Graph

46 Commits

Author SHA1 Message Date
4b1da9b896 feat(cli): preserve table column order (#16843)
Fixes: https://github.com/coder/coder/issues/16055
2025-03-10 12:28:06 +00:00
7cd6e9cdd6 fix: return provisioners in desc order and add limit to cli (#16720) 2025-02-26 21:06:51 +02:00
d3a56ae3ef feat: enable GitHub OAuth2 login by default on new deployments (#16662)
Third and final PR to address
https://github.com/coder/coder/issues/16230.

This PR enables GitHub OAuth2 login by default on new deployments.
Combined with https://github.com/coder/coder/pull/16629, this will allow
the first admin user to sign up with GitHub rather than email and
password.

We take care not to enable the default on deployments that would upgrade
to a Coder version with this change.

To disable the default provider an admin can set the
`CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER` env variable to false.
2025-02-25 16:31:33 +01:00
4c438bd4d3 feat(cli): add local and UTC time options to ping cmd (#16648)
It's sometimes useful to see when each pong was received, for
correlating these times with other events.

---------

Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-24 05:38:17 +00:00
8c5e7007cd feat: support the OAuth2 device flow with GitHub for signing in (#16585)
First PR in a series to address
https://github.com/coder/coder/issues/16230.

Introduces support for logging in via the [GitHub OAuth2 Device
Flow](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#device-flow).

It's previously been possible to configure external auth with the device
flow, but it's not been possible to use it for logging in. This PR
builds on the existing support we had to extend it to sign ins.

When a user clicks "sign in with GitHub" when device auth is configured,
they are redirected to the new `/login/device` page, which makes the
flow possible from the client's side. The recording below shows the full
flow.


https://github.com/user-attachments/assets/90c06f1f-e42f-43e9-a128-462270c80fdd

I've also manually tested that it works for converting from
password-based auth to oauth.

Device auth can be enabled by a deployment's admin by setting the
`CODER_OAUTH2_GITHUB_DEVICE_FLOW` env variable or a corresponding config
setting.
2025-02-21 18:42:16 +01:00
d2419c89ac feat: add tool to send a test notification (#16611)
Relates to https://github.com/coder/coder/issues/16463

Adds a CLI command, and API endpoint, to trigger a test notification for
administrators of a deployment.
2025-02-19 13:08:38 +00:00
5ec385b36b feat(cli): support deleting tokens by id (#16341)
Since API keys can be created without a name, and we already perform the
deletion by ID, it makes sense to be able to delete tokens with *just*
the ID.
2025-02-12 18:18:17 +11:00
e85da8b02b chore: return template data for provisioner daemons (#16514)
Return template data in provisioner jobs to be displayed in the
provisioners page.
2025-02-11 14:22:34 -03:00
e9b3561677 refactor: return template_icon and make metadata required (#16496) 2025-02-10 10:00:34 -03:00
b04d883348 feat: add provisioner job metadata (#16454)
This change adds metadata to provisioner jobs to help with rendering
related tempaltes and workspaces in the UI.

Updates #15084
2025-02-06 16:19:20 +02:00
75c899ff71 feat(cli): add provisioner job cancel command (#16252)
Fixes #16117
Updates #15084
2025-01-27 16:26:56 +00:00
c0db364f3f feat(cli): add provisioner list and provisioner jobs list (#16030) 2025-01-20 17:24:22 +00:00
1aa9e32a2b feat: add --ssh-host-prefix flag for "coder ssh" (#16088)
This adds a flag matching `--ssh-host-prefix` from `coder config-ssh` to
`coder ssh`. By trimming a custom prefix from the argument, we can set
up wildcard-based `Host` entries in SSH config for the IDE plugins (and
eventually `coder config-ssh`).

We also replace `--` in the argument with `/`, so ownership can be
specified in wildcard-based SSH hosts like `<owner>--<workspace>`.

Replaces #16087.

Part of https://github.com/coder/coder/issues/14986.

Related to https://github.com/coder/coder/pull/16078 and
https://github.com/coder/coder/pull/16080.
2025-01-13 19:07:21 -06:00
838ee3b244 feat: add --network-info-dir and --network-info-interval flags to coder ssh (#16078)
This is the first in a series of PRs to enable `coder ssh` to replace
`coder vscodessh`.

This change adds `--network-info-dir` and `--network-info-interval`
flags to the `ssh` subcommand. These were formerly only available with
the `vscodessh` subcommand.

Subsequent PRs will add a `--ssh-host-prefix` flag to the ssh
subcommand, and adjust the log file naming to contain the parent PID.
2025-01-13 18:29:31 -06:00
a7ed977ba9 chore: prevent db migrations from running on all cli commands (#15980) 2025-01-03 11:15:35 -06:00
94f5d52fdc chore: adopt markdownlint and markdown-table-formatter for *.md (#15831)
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2025-01-03 13:12:59 +00:00
26b1f1c3a3 chore(docs/admin/infrastructure): call out and link to awsiamrds auth for aws rds (#15955)
Call out AWS IAM RDS db auth and clarify URL encoding requirement in postgres URL
2024-12-24 12:22:40 +00:00
91875c2b47 fix: allow users to extend their running workspace's deadline (#15895)
Fixes https://github.com/coder/coder/issues/15515

This change effectively reverts the changes introduced by
https://github.com/coder/coder/pull/13182 (for
https://github.com/coder/coder/issues/13078).

We also rename the `override-stop` command name to `extend` to match the
API endpoint's name (keeping an alias to allow `override-stop` to be used).
2024-12-18 10:58:33 +00:00
069655ace9 chore: unify template naming (#15757)
This PR changes template names and docs to follow the
`<provider>-<os/whatever>` format for all templates.
I've decided not to split this into multiple PRs because I'd have to
edit rebase the other PRs once one of them gets merged, this should be
relatively low-impact anyways.

This aligns with our goals to make templates more user-friendly.

Closes #15754
2024-12-05 22:37:25 +05:00
b5b0a0e746 fix: unify coder create and coder delete help message (#15752)
Closes #15668
2024-12-05 12:32:52 +11:00
5b7fa78676 chore: add deployment config option to append custom csp directives (#15596)
Allows adding custom static CSP directives to Coder. Niche use case but
makes this easier then creating a reverse proxy that has to replace the
header. We want to preserve our directives, so having an append option
is preferred to a "replace" option via a reverse proxy.


Closes https://github.com/coder/coder/issues/15118
2024-11-21 11:53:53 -06:00
576e1f48fe feat!: allow disabling notifications (#15509)
Resolves https://github.com/coder/coder/issues/15513

Disables notifications when both `$CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT` and `$CODER_EMAIL_SMARTHOST` are unset.

Breaking change: `$CODER_EMAIL_SMARTHOST` is no longer set by default as `localhost:587`, meaning any deployments that make use of this default value will need to add it back.

---------

Co-authored-by: Danny Kopping <danny@coder.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2024-11-19 15:05:12 +00:00
99dd13d4cd chore: add cli command to update organization sync settings (#15459) 2024-11-13 13:44:21 -06:00
782214bcd8 chore: move organizatinon sync to runtime configuration (#15431)
Moves the configuration from environment to database backed, to allow
configuring organization sync at runtime.
2024-11-08 08:44:14 -06:00
1f93b80e09 chore: fix docs/admin links and upgrade notice (#15043)
- Update links to /docs/admin to match the new structure
- TODO: remove the release string from the "upgrade available"
instructions link
- [x]
https://github.com/coder/coder/blob/update-upgrade-config-links/cli/server.go#L646


![2024-10-11_11-35-40](https://github.com/user-attachments/assets/fd95e821-d5ad-4c91-a38a-066046c7072c)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-11-01 19:43:51 +00:00
823a2ea22e chore(cli): drop 'notification' prefix for configuring email auth (#15270)
Closes https://github.com/coder/coder/issues/14644
2024-10-30 10:06:10 +00:00
ccfffc6911 chore: add tx metrics and logs for serialization errors (#15215)
Before db_metrics were all or nothing. Now `InTx` metrics are always recorded, and query metrics are opt in.


Adds instrumentation & logging around serialization failures in the database.
2024-10-25 12:14:15 -04:00
5ebc748e94 feat: allow promoting an existing template version to active from CLI (#15051)
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-10-17 14:15:14 +05:00
02f6203dc7 chore(cli): rename build options to ephemeral parameters in cli (#15030)
This PR aims to rename `build-option` to `ephemeral-parameters` based on
#10488 conversation.

`build-option` has been renamed `ephemeral-parameter` and can be used to
define a value for an ephemeral parameter in the template.

`build-options` has been renamed `prompt-ephemeral-parameters` and can
be used to prompt the user to put values for the ephemeral parameters in
the template.

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: defelmnq <yvincent@coder.com>
2024-10-16 23:54:12 +02:00
ccbb687ca0 feat(cli): extend duration to longer units (#15040)
This PR is a proposal to improve the situation described in #14750 

For some precise commands - we would like to be able to use durations
bigger than hours, minutes..

This PR extends the Duration proposed by Go with : 
- `d` - a day or 24hours.
- `y` - a year or 365 days.

I also removed the default value for lifetime and instead fetch the
maxLifetime value from codersdk - so by default if no value set we use
the value defined in the config.
2024-10-16 17:02:56 +02:00
06a40185cb chore(examples): add missing devcontainer templates to examples.go (#15080) 2024-10-15 17:26:42 +01:00
191449078c feat: implement feature to support template version while creating workspace using cli (#14880) 2024-10-11 18:00:11 +05:00
26df33ac88 docs: explain --rich-parameter-file format (#14941) 2024-10-09 09:34:24 +05:00
419eba5fb6 docs: restructure docs (#14421)
Closes #13434 
Supersedes #14182

---------

Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com>
Co-authored-by: Ethan Dickson <ethan@coder.com>
Co-authored-by: Ben Potter <ben@coder.com>
Co-authored-by: Stephen Kirby <58410745+stirby@users.noreply.github.com>
Co-authored-by: Stephen Kirby <me@skirby.dev>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2024-10-05 10:52:04 -05:00
ba90bb0ab3 feat: implement feature to create a token on behalf of another user in the cli (#14813)
This PR addresses https://github.com/coder/coder/issues/13160
2024-09-30 20:15:28 +00:00
5cc5bbea04 fix: improve provisioner key cli usability (#14834)
What this changes:
- Unhides the `--key` flag on provisioner start
- Deprecates and hides `provisionerd` command group in favor of
`provisioner(s)`
- Removes org id from `coder provisioner keys list`
2024-09-27 10:34:41 -05:00
b7c574f679 feat!: add summary to coder ping (#14762) 2024-09-25 13:24:23 +10:00
37885e2e82 fix: make cli respect deployment --docs-url (#14568) 2024-09-18 21:47:53 +10:00
fccf6f1e0e feat!: add --default-token-lifetime (#14631) 2024-09-18 21:23:42 +10:00
d96adad56f chore: add cli command to fetch group sync settings as json (#14694)
* chore: add cli command to fetch group sync settings as json
2024-09-17 14:08:33 -05:00
be516f9686 chore: unhide multi-organization cli commands (#14693)
* chore: unhide multi-organization cli commands

Multi-org is going into GA, unhide cli commands
2024-09-17 10:22:20 -05:00
1b5f3418d3 chore: align active version terminology and link to docs (#14639) 2024-09-11 12:25:07 +02:00
10c958bba1 chore: implement organization sync and create idpsync package (#14432)
* chore: implement filters for the organizations query
* chore: implement organization sync and create idpsync package

Organization sync can now be configured to assign users to an org based on oidc claims.
2024-08-30 11:19:36 -05:00
043f4f5327 docs: add documentation for notifications feature (#14478) 2024-08-30 17:30:06 +02:00
0b2ba96065 feat(cli): add shell completions (#14341) 2024-08-20 14:47:46 +10:00
48f29a1995 docs: move api and cli docs routes to reference/ (#14241) 2024-08-13 18:39:46 +03:00