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:
+37
@@ -40,3 +40,40 @@ fi
|
||||
| Type | <code>string</code> |
|
||||
|
||||
Extract a field from the "extra" properties of the OAuth token.
|
||||
|
||||
### --agent-token
|
||||
|
||||
| | |
|
||||
|-------------|---------------------------------|
|
||||
| Type | <code>string</code> |
|
||||
| Environment | <code>$CODER_AGENT_TOKEN</code> |
|
||||
|
||||
An agent authentication token.
|
||||
|
||||
### --agent-token-file
|
||||
|
||||
| | |
|
||||
|-------------|--------------------------------------|
|
||||
| Type | <code>string</code> |
|
||||
| Environment | <code>$CODER_AGENT_TOKEN_FILE</code> |
|
||||
|
||||
A file containing an agent authentication token.
|
||||
|
||||
### --agent-url
|
||||
|
||||
| | |
|
||||
|-------------|-------------------------------|
|
||||
| Type | <code>url</code> |
|
||||
| Environment | <code>$CODER_AGENT_URL</code> |
|
||||
|
||||
URL for an agent to access your deployment.
|
||||
|
||||
### --auth
|
||||
|
||||
| | |
|
||||
|-------------|--------------------------------|
|
||||
| Type | <code>string</code> |
|
||||
| Environment | <code>$CODER_AGENT_AUTH</code> |
|
||||
| Default | <code>token</code> |
|
||||
|
||||
Specify the authentication type to use for the agent.
|
||||
|
||||
Reference in New Issue
Block a user