From ee810434422fa47c403dfe3fed5af9ca1c738128 Mon Sep 17 00:00:00 2001 From: omnom62 <75066712+omnom62@users.noreply.github.com> Date: Mon, 26 Oct 2026 22:46:53 +1000 Subject: T8989: auth_methods (#42) * https: T8989: auth_methods AI comments and conflicts fixed --- docs/vyos.rest.vyos_httpapi.rst | 180 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 173 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/vyos.rest.vyos_httpapi.rst b/docs/vyos.rest.vyos_httpapi.rst index e493ebc..b91c229 100644 --- a/docs/vyos.rest.vyos_httpapi.rst +++ b/docs/vyos.rest.vyos_httpapi.rst @@ -5,10 +5,9 @@ vyos.rest.vyos ************** -**HttpApi plugin for VyOS REST API** +**VyOS REST API** -Version added: 1.0.0 .. contents:: :local: @@ -17,9 +16,8 @@ Version added: 1.0.0 Synopsis -------- -- This HttpApi plugin provides methods to connect to VyOS devices via their HTTPS REST API. -- Use with ``ansible_connection=ansible.netcommon.httpapi`` and ``ansible_network_os=vyos.rest.vyos``. -- The VyOS REST API must be enabled with ``set service https api keys id ansible key YOUR_KEY``, ``set service https api rest``, then ``commit && save``. +- HTTPAPI plugin for interacting with VyOS REST API. +- Supports multiple authentication methods against the VyOS REST API -- ``key`` (API key in the request body), ``header`` (API key as an ``X-API-Key`` header), ``bearer`` (a VyOS-issued bearer token, fetched and cached), ``mtls`` (mutual TLS, no application-level credential), and ``oidc`` (a bearer token obtained from an external OpenID Connect provider via the client_credentials grant, fetched and cached). @@ -48,13 +46,181 @@ Parameters
[httpapi]
api_key = VALUE
ansible_httpapi_api_key in inventory or the VYOS_API_KEY environment variable.key, header, and bearer.[httpapi]
auth_method = key
[httpapi]
oidc_allow_insecure_http = no
https, because the request carries the client secret and the response carries a bearer token. Set this to true to allow a plain http endpoint.[httpapi]
oidc_client_id = VALUE
[httpapi]
oidc_client_secret = VALUE
[httpapi]
oidc_timeout = 10
[httpapi]
oidc_token_url = VALUE
oidc.[httpapi]
oidc_validate_certs = yes
false only for a lab identity provider that uses a self-signed certificate.