mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: refactor instance identity to be a SessionTokenProvider (#19566)
Refactors Agent instance identity to be a SessionTokenProvider. Refactors the CLI to create Agent clients via a centralized function, rather than add-hoc via individual command handlers and their flags. This allows commands besides `coder agent`, but which still use the agent identity, to support instance identity authentication. Fixes #19111 by unifying all API requests to go thru the SessionTokenProvider for auth credentials.
This commit is contained in:
+12
-3
@@ -6,6 +6,18 @@ USAGE:
|
||||
Starts the Coder workspace agent.
|
||||
|
||||
OPTIONS:
|
||||
--auth string, $CODER_AGENT_AUTH (default: token)
|
||||
Specify the authentication type to use for the agent.
|
||||
|
||||
--agent-token string, $CODER_AGENT_TOKEN
|
||||
An agent authentication token.
|
||||
|
||||
--agent-token-file string, $CODER_AGENT_TOKEN_FILE
|
||||
A file containing an agent authentication token.
|
||||
|
||||
--agent-url url, $CODER_AGENT_URL
|
||||
URL for an agent to access your deployment.
|
||||
|
||||
--log-human string, $CODER_AGENT_LOGGING_HUMAN (default: /dev/stderr)
|
||||
Output human-readable logs to a given file.
|
||||
|
||||
@@ -24,9 +36,6 @@ OPTIONS:
|
||||
requests. The command must output each header as `key=value` on its
|
||||
own line.
|
||||
|
||||
--auth string, $CODER_AGENT_AUTH (default: token)
|
||||
Specify the authentication type to use for the agent.
|
||||
|
||||
--block-file-transfer bool, $CODER_AGENT_BLOCK_FILE_TRANSFER (default: false)
|
||||
Block file transfer using known applications: nc,rsync,scp,sftp.
|
||||
|
||||
|
||||
@@ -25,6 +25,18 @@ USAGE:
|
||||
$ coder external-auth access-token slack --extra "authed_user.id"
|
||||
|
||||
OPTIONS:
|
||||
--auth string, $CODER_AGENT_AUTH (default: token)
|
||||
Specify the authentication type to use for the agent.
|
||||
|
||||
--agent-token string, $CODER_AGENT_TOKEN
|
||||
An agent authentication token.
|
||||
|
||||
--agent-token-file string, $CODER_AGENT_TOKEN_FILE
|
||||
A file containing an agent authentication token.
|
||||
|
||||
--agent-url url, $CODER_AGENT_URL
|
||||
URL for an agent to access your deployment.
|
||||
|
||||
--extra string
|
||||
Extract a field from the "extra" properties of the OAuth token.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user