metal
platform can be configured to authenticate the machine configuration download using OAuth2 device flow.
The machine configuration is fetched from the URL specified with talos.config
kernel argument, and by default this HTTP request is not authenticated.
When the OAuth2 authentication is enabled, Talos will authenticate the request using OAuth device flow first, and then pass the token to the machine configuration download endpoint.
Prerequisites
Obtain the following information:- OAuth client ID (mandatory)
- OAuth client secret (optional)
- OAuth device endpoint
- OAuth token endpoint
- OAuth scopes, audience (optional)
- OAuth client secret (optional)
- extra Talos variables to send to the device auth endpoint (optional)
Configuration
Set the following kernel parameters on the initial Talos boot to enable the OAuth flow:talos.config
set to the URL of the machine configuration endpoint (which will be authenticated using OAuth)talos.config.oauth.client_id
set to the OAuth client ID (required)talos.config.oauth.client_secret
set to the OAuth client secret (optional)talos.config.oauth.scope
set to the OAuth scopes (optional, repeat the parameter for multiple scopes)talos.config.oauth.audience
set to the OAuth audience (optional)talos.config.oauth.device_auth_url
set to the OAuth device endpoint (if not set defaults totalos.config
URL with the path/device/code
)talos.config.oauth.token_url
set to the OAuth token endpoint (if not set defaults totalos.config
URL with the path/token
)talos.config.oauth.extra_variable
set to the extra Talos variables to send to the device auth endpoint (optional, repeat the parameter for multiple variables)
talos.config.oauth.extra_variable
parameter is same as the list of variables supported by the talos.config
parameter.