diff options
| author | omnom62 <omnom62@outlook.com> | 2026-10-03 16:21:28 +1000 |
|---|---|---|
| committer | Viacheslav Hletenko <seversss265@gmail.com> | 2026-10-07 14:22:00 +0300 |
| commit | de10149ab4cfbc49698e54f9bbc253cfd3c86723 (patch) | |
| tree | 5b3d31ff1c044f903e9aa7bfef448492453a8d1d /docs | |
| parent | 41781e7a16e73fdca1f26c677ed3645ca2a8a3d0 (diff) | |
| download | rest.vyos-de10149ab4cfbc49698e54f9bbc253cfd3c86723.tar.gz rest.vyos-de10149ab4cfbc49698e54f9bbc253cfd3c86723.zip | |
https: T8989: auth_methods AI comments and conflicts fixed
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/vyos.rest.vyos_httpapi.rst | 109 |
1 files changed, 100 insertions, 9 deletions
diff --git a/docs/vyos.rest.vyos_httpapi.rst b/docs/vyos.rest.vyos_httpapi.rst index e493ebc..befe1a8 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,106 @@ Parameters <td> </td> <td> + <div> ini entries: + <p>[httpapi]<br>api_key = VALUE</p> + </div> + <div>env:ANSIBLE_HTTPAPI_API_KEY</div> <div>env:VYOS_API_KEY</div> <div>var: ansible_httpapi_api_key</div> - <div>var: ansible_vyos_api_key</div> </td> <td> - <div>The API key configured on the VyOS device.</div> - <div>Set <code>ansible_httpapi_api_key</code> in inventory or the <code>VYOS_API_KEY</code> environment variable.</div> + <div>VyOS API key. Required for auth_method <code>key</code>, <code>header</code>, and <code>bearer</code>.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>auth_method</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + <ul style="margin: 0; padding: 0"><b>Choices:</b> + <li><div style="color: blue"><b>key</b> ←</div></li> + <li>header</li> + <li>bearer</li> + <li>mtls</li> + <li>oidc</li> + </ul> + </td> + <td> + <div> ini entries: + <p>[httpapi]<br>auth_method = key</p> + </div> + <div>var: ansible_httpapi_auth_method</div> + </td> + <td> + <div>Authentication method to use against the VyOS REST API.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>oidc_client_id</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div> ini entries: + <p>[httpapi]<br>oidc_client_id = VALUE</p> + </div> + <div>var: ansible_httpapi_oidc_client_id</div> + </td> + <td> + <div>OIDC client ID for the client_credentials grant.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>oidc_client_secret</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div> ini entries: + <p>[httpapi]<br>oidc_client_secret = VALUE</p> + </div> + <div>var: ansible_httpapi_oidc_client_secret</div> + </td> + <td> + <div>OIDC client secret for the client_credentials grant.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>oidc_token_url</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div> ini entries: + <p>[httpapi]<br>oidc_token_url = VALUE</p> + </div> + <div>var: ansible_httpapi_oidc_token_url</div> + </td> + <td> + <div>Token endpoint URL of the OIDC provider. Required for auth_method <code>oidc</code>.</div> </td> </tr> </table> @@ -74,7 +165,7 @@ Status Authors ~~~~~~~ -- VyOS Community (@vyos) +- Evgeny Molotkov (@eomnom62) .. hint:: |
