:source: fmgd_vpn_certificate_setting.py
:orphan:
.. _fmgd_vpn_certificate_setting:
fmgd_vpn_certificate_setting -- VPN certificate setting.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module is able to configure a FortiManager device.
- Examples include all parameters and values need to be adjusted to data sources before usage.
- Tested with FortiManager v7.x.
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible-core>=2.16.0
FortiManager Version Compatibility
----------------------------------
.. raw:: html
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
Parameters
----------
.. raw:: html
- access_token -The token to access FortiManager without using username and password. type: str required: false
- bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. type: bool required: false default: False
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0. type: str required: false
- proposed_method - The overridden method for the underlying Json RPC request. type: str required: false choices: set, update, add
- rc_succeeded - The rc codes list with which the conditions to succeed will be overriden. type: list required: false
- rc_failed - The rc codes list with which the conditions to fail will be overriden. type: list required: false
- workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode. type: str required: false choices: global, custom adom including root
- workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock. type: integer required: false default: 300
- device - The parameter in requested url type: str required: true
- vdom - The parameter in requested url type: str required: true
- vpn_certificate_setting - VPN certificate setting. type: dict
- cert_expire_warning (Alias name: cert-expire-warning) Number of days before a certificate expires to send a warning. type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_dsa1024 (Alias name: certname-dsa1024) 1024 bit dsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_dsa2048 (Alias name: certname-dsa2048) 2048 bit dsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_ecdsa256 (Alias name: certname-ecdsa256) 256 bit ecdsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_ecdsa384 (Alias name: certname-ecdsa384) 384 bit ecdsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_ecdsa521 (Alias name: certname-ecdsa521) 521 bit ecdsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_ed25519 (Alias name: certname-ed25519) 253 bit eddsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_ed448 (Alias name: certname-ed448) 456 bit eddsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_rsa1024 (Alias name: certname-rsa1024) 1024 bit rsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_rsa2048 (Alias name: certname-rsa2048) 2048 bit rsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- certname_rsa4096 (Alias name: certname-rsa4096) 4096 bit rsa key certificate for re-signing server certificates for ssl inspection. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- check_ca_cert (Alias name: check-ca-cert) Enable/disable verification of the user certificate and pass authentication if any ca in the chain is trusted (default = enable). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- check_ca_chain (Alias name: check-ca-chain) Enable/disable verification of the entire certificate chain and pass authentication only if the chain is complete and all of the cas in the chain are trusted (default = disable). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- cmp_key_usage_checking (Alias name: cmp-key-usage-checking) Enable/disable server certificate key usage checking in cmp mode (default = enable). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- cmp_save_extra_certs (Alias name: cmp-save-extra-certs) Enable/disable saving extra certificates in cmp mode (default = disable). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- cn_allow_multi (Alias name: cn-allow-multi) When searching for a matching certificate, allow multiple cn fields in certificate subject name (default = enable). type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- cn_match (Alias name: cn-match) When searching for a matching certificate, control how to do cn value matching with certificate subject name (default = substring). type: str choices: [substring, value]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- crl_verification (Alias name: crl-verification) Crl verification. type: dict
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- chain_crl_absence (Alias name: chain-crl-absence) Crl verification option when crl of any certificate in chain is absent (default = ignore). type: str choices: [ignore, revoke]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- expiry Crl verification option when crl is expired (default = ignore). type: str choices: [ignore, revoke]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- leaf_crl_absence (Alias name: leaf-crl-absence) Crl verification option when leaf crl is absent (default = ignore). type: str choices: [ignore, revoke]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- interface Specify outgoing interface to reach server. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- interface_select_method (Alias name: interface-select-method) Specify how to select outgoing interface to reach server. type: str choices: [auto, sdwan, specify]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ocsp_default_server (Alias name: ocsp-default-server) Default ocsp server. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ocsp_option (Alias name: ocsp-option) Specify whether the ocsp url is from certificate or configured ocsp server. type: str choices: [certificate, server]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ocsp_status (Alias name: ocsp-status) Enable/disable receiving certificates using the ocsp. type: str choices: [disable, enable, mandatory]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- proxy Proxy server fqdn or ip for ocsp/ca queries during certificate verification. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- proxy_password (Alias name: proxy-password) Proxy server password. type: list
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- proxy_port (Alias name: proxy-port) Proxy server port (1 - 65535, default = 8080). type: int
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- proxy_username (Alias name: proxy-username) Proxy server user name. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- source_ip (Alias name: source-ip) Source ip address for dynamic aia and ocsp queries. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ssl_min_proto_version (Alias name: ssl-min-proto-version) Minimum supported protocol version for ssl/tls connections (default is to follow system global setting). type: str choices: [default, TLSv1, TLSv1-1, TLSv1-2, SSLv3, TLSv1-3]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- strict_ocsp_check (Alias name: strict-ocsp-check) Enable/disable strict mode ocsp checking. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- subject_match (Alias name: subject-match) When searching for a matching certificate, control how to do rdn value matching with certificate subject name (default = substring). type: str choices: [substring, value]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- subject_set (Alias name: subject-set) When searching for a matching certificate, control how to do rdn set matching with certificate subject name (default = subset). type: str choices: [subset, superset]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- ssl_ocsp_source_ip (Alias name: ssl-ocsp-source-ip) Source ip address to use to communicate with the ocsp server. type: str
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- strict_crl_check (Alias name: strict-crl-check) Enable/disable strict mode crl checking. type: str choices: [disable, enable]
more...
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
- vrf_select (Alias name: vrf-select) Vrf id used for connection to server. type: int
more...
Supported Version Ranges: v7.6.2 -> latest
Notes
-----
.. note::
- Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
- To create or update an object, use state: present directive.
- To delete an object, use state: absent directive
- Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded
Examples
--------
.. code-block:: yaml+jinja
- name: Example playbook (generated based on argument schema)
hosts: fortimanagers
connection: httpapi
gather_facts: false
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: VPN certificate setting.
fortinet.fmgdevice.fmgd_vpn_certificate_setting:
# bypass_validation: false
# workspace_locking_adom:
# workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
device:
vdom:
vpn_certificate_setting:
# cert_expire_warning:
# certname_dsa1024:
# certname_dsa2048:
# certname_ecdsa256:
# certname_ecdsa384:
# certname_ecdsa521:
# certname_ed25519:
# certname_ed448:
# certname_rsa1024:
# certname_rsa2048:
# certname_rsa4096:
# check_ca_cert:
# check_ca_chain:
# cmp_key_usage_checking:
# cmp_save_extra_certs:
# cn_allow_multi:
# cn_match:
# crl_verification:
# chain_crl_absence:
# expiry:
# leaf_crl_absence:
# interface:
# interface_select_method:
# ocsp_default_server:
# ocsp_option:
# ocsp_status:
# proxy:
# proxy_password:
# proxy_port:
# proxy_username:
# source_ip:
# ssl_min_proto_version:
# strict_ocsp_check:
# subject_match:
# subject_set:
# ssl_ocsp_source_ip:
# strict_crl_check:
# vrf_select:
Return Values
-------------
Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:
.. raw:: html
- meta - The result of the request.returned: always type: dict
- request_url - The full url requested. returned: always type: str sample: /sys/login/user
- response_code - The status of api request. returned: always type: int sample: 0
- response_data - The data body of the api response. returned: optional type: list or dict
- response_message - The descriptive message of the api response. returned: always type: str sample: OK
- system_information - The information of the target system. returned: always type: dict
- rc - The status the request. returned: always type: int sample: 0
- version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list
Status
------
- This module is not guaranteed to have a backwards compatible interface.
Authors
-------
- Xinwei Du (@dux-fortinet)
- Xing Li (@lix-fortinet)
- Jie Xue (@JieX19)
- Link Zheng (@chillancezen)
- Frank Shen (@fshen01)
- Hongbin Lu (@fgtdev-hblu)