On this page
fortinet.fortimanager.fmgr_user_ldap – Configure LDAP server entries.
Note
This plugin is part of the fortinet.fortimanager collection (version 2.1.3).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install fortinet.fortimanager
.
To use it in a playbook, specify: fortinet.fortimanager.fmgr_user_ldap
.
New in version 2.10: of fortinet.fortimanager
Synopsis
- This module is able to configure a FortiManager device.
- Examples include all parameters and values which need to be adjusted to data sources before usage.
Parameters
Parameter | Choices/Defaults | Comments | |||
---|---|---|---|---|---|
adom
string / required
|
the parameter (adom) in requested url
|
||||
bypass_validation
boolean
|
|
only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters
|
|||
enable_log
boolean
|
|
Enable/Disable logging for task
|
|||
proposed_method
string
|
|
The overridden method for the underlying Json RPC request
|
|||
rc_failed
list / elements=string
|
the rc codes list with which the conditions to fail will be overriden
|
||||
rc_succeeded
list / elements=string
|
the rc codes list with which the conditions to succeed will be overriden
|
||||
state
string / required
|
|
the directive to create, update or delete an object
|
|||
user_ldap
dictionary
|
the top level parameters set
|
||||
account-key-filter
string
|
Account key filter, using the UPN as the search filter.
|
||||
account-key-processing
string
|
|
Account key processing operation, either keep or strip domain string of UPN in the token.
|
|||
antiphish
string
|
|
Enable/disable AntiPhishing credential backend.
|
|||
ca-cert
string
|
CA certificate name.
|
||||
cnid
string
|
Common name identifier for the LDAP server. The common name identifier for most LDAP servers is "cn".
|
||||
dn
string
|
Distinguished name used to look up entries on the LDAP server.
|
||||
dynamic_mapping
list / elements=string
|
no description
|
||||
_scope
list / elements=string
|
no description
|
||||
name
string
|
no description
|
||||
vdom
string
|
no description
|
||||
account-key-filter
string
|
no description
|
||||
account-key-name
string
|
no description
|
||||
account-key-processing
string
|
|
no description
|
|||
antiphish
string
|
|
Enable/disable AntiPhishing credential backend.
|
|||
ca-cert
string
|
no description
|
||||
cnid
string
|
no description
|
||||
dn
string
|
no description
|
||||
filter
string
|
no description
|
||||
group
string
|
no description
|
||||
group-filter
string
|
no description
|
||||
group-member-check
string
|
|
no description
|
|||
group-object-filter
string
|
no description
|
||||
group-object-search-base
string
|
no description
|
||||
group-search-base
string
|
no description
|
||||
interface
string
|
no description
|
||||
interface-select-method
string
|
|
no description
|
|||
member-attr
string
|
no description
|
||||
obtain-user-info
string
|
|
no description
|
|||
password
string
|
no description
|
||||
password-attr
string
|
Name of attribute to get password hash.
|
||||
password-expiry-warning
string
|
|
no description
|
|||
password-renewal
string
|
|
no description
|
|||
port
integer
|
no description
|
||||
retrieve-protection-profile
string
|
no description
|
||||
search-type
list / elements=string
|
|
no description
|
|||
secondary-server
string
|
no description
|
||||
secure
string
|
|
no description
|
|||
server
string
|
no description
|
||||
server-identity-check
string
|
|
no description
|
|||
source-ip
string
|
no description
|
||||
source-port
integer
|
Source port to be used for communication with the LDAP server.
|
||||
ssl-min-proto-version
string
|
|
no description
|
|||
tertiary-server
string
|
no description
|
||||
two-factor
string
|
|
no description
|
|||
two-factor-authentication
string
|
|
no description
|
|||
two-factor-notification
string
|
|
no description
|
|||
type
string
|
|
no description
|
|||
user-info-exchange-server
string
|
no description
|
||||
username
string
|
no description
|
||||
group-filter
string
|
Filter used for group matching.
|
||||
group-member-check
string
|
|
Group member checking methods.
|
|||
group-object-filter
string
|
Filter used for group searching.
|
||||
group-search-base
string
|
Search base used for group searching.
|
||||
interface
string
|
Specify outgoing interface to reach server.
|
||||
interface-select-method
string
|
|
Specify how to select outgoing interface to reach server.
|
|||
member-attr
string
|
Name of attribute from which to get group membership.
|
||||
name
string
|
LDAP server entry name.
|
||||
obtain-user-info
string
|
|
Enable/disable obtaining of user information.
|
|||
password
string
|
no description
|
||||
password-attr
string
|
Name of attribute to get password hash.
|
||||
password-expiry-warning
string
|
|
Enable/disable password expiry warnings.
|
|||
password-renewal
string
|
|
Enable/disable online password renewal.
|
|||
port
integer
|
Port to be used for communication with the LDAP server (default = 389).
|
||||
search-type
list / elements=string
|
|
no description
|
|||
secondary-server
string
|
Secondary LDAP server CN domain name or IP.
|
||||
secure
string
|
|
Port to be used for authentication.
|
|||
server
string
|
LDAP server CN domain name or IP.
|
||||
server-identity-check
string
|
|
Enable/disable LDAP server identity check (verify server domain name/IP address against the server certificate).
|
|||
source-ip
string
|
Source IP for communications to LDAP server.
|
||||
source-port
integer
|
Source port to be used for communication with the LDAP server.
|
||||
ssl-min-proto-version
string
|
|
Minimum supported protocol version for SSL/TLS connections (default is to follow system global setting).
|
|||
tertiary-server
string
|
Tertiary LDAP server CN domain name or IP.
|
||||
two-factor
string
|
|
Enable/disable two-factor authentication.
|
|||
two-factor-authentication
string
|
|
Authentication method by FortiToken Cloud.
|
|||
two-factor-notification
string
|
|
Notification method for user activation by FortiToken Cloud.
|
|||
type
string
|
|
Authentication type for LDAP searches.
|
|||
user-info-exchange-server
string
|
MS Exchange server from which to fetch user information.
|
||||
username
string
|
Username (full DN) for initial binding.
|
||||
workspace_locking_adom
string
|
the adom to lock for FortiManager running in workspace mode, the value can be global and others including root
|
||||
workspace_locking_timeout
integer
|
Default:
300
|
the maximum time in seconds to wait for other user to release the workspace lock
|
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
- hosts: fortimanager-inventory
collections:
- fortinet.fortimanager
connection: httpapi
vars:
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_httpapi_port: 443
tasks:
- name: Configure LDAP server entries.
fmgr_user_ldap:
bypass_validation: False
workspace_locking_adom: <value in [global, custom adom including root]>
workspace_locking_timeout: 300
rc_succeeded: [0, -2, -3, ...]
rc_failed: [-2, -3, ...]
adom: <your own value>
state: <value in [present, absent]>
user_ldap:
account-key-filter: <value of string>
account-key-processing: <value in [same, strip]>
ca-cert: <value of string>
cnid: <value of string>
dn: <value of string>
dynamic_mapping:
-
_scope:
-
name: <value of string>
vdom: <value of string>
account-key-filter: <value of string>
account-key-name: <value of string>
account-key-processing: <value in [same, strip]>
ca-cert: <value of string>
cnid: <value of string>
dn: <value of string>
filter: <value of string>
group: <value of string>
group-filter: <value of string>
group-member-check: <value in [user-attr, group-object, posix-group-object]>
group-object-filter: <value of string>
group-object-search-base: <value of string>
group-search-base: <value of string>
member-attr: <value of string>
obtain-user-info: <value in [disable, enable]>
password: <value of string>
password-expiry-warning: <value in [disable, enable]>
password-renewal: <value in [disable, enable]>
port: <value of integer>
retrieve-protection-profile: <value of string>
search-type:
- nested
- recursive
secondary-server: <value of string>
secure: <value in [disable, starttls, ldaps]>
server: <value of string>
server-identity-check: <value in [disable, enable]>
source-ip: <value of string>
ssl-min-proto-version: <value in [default, TLSv1, TLSv1-1, ...]>
tertiary-server: <value of string>
type: <value in [simple, anonymous, regular]>
user-info-exchange-server: <value of string>
username: <value of string>
two-factor: <value in [disable, fortitoken-cloud]>
interface: <value of string>
interface-select-method: <value in [auto, sdwan, specify]>
two-factor-authentication: <value in [fortitoken, email, sms]>
two-factor-notification: <value in [email, sms]>
antiphish: <value in [disable, enable]>
password-attr: <value of string>
source-port: <value of integer>
group-filter: <value of string>
group-member-check: <value in [user-attr, group-object, posix-group-object]>
group-object-filter: <value of string>
group-search-base: <value of string>
member-attr: <value of string>
name: <value of string>
password: <value of string>
password-expiry-warning: <value in [disable, enable]>
password-renewal: <value in [disable, enable]>
port: <value of integer>
secondary-server: <value of string>
secure: <value in [disable, starttls, ldaps]>
server: <value of string>
server-identity-check: <value in [disable, enable]>
source-ip: <value of string>
ssl-min-proto-version: <value in [default, TLSv1, TLSv1-1, ...]>
tertiary-server: <value of string>
type: <value in [simple, anonymous, regular]>
username: <value of string>
obtain-user-info: <value in [disable, enable]>
search-type:
- nested
- recursive
user-info-exchange-server: <value of string>
two-factor: <value in [disable, fortitoken-cloud]>
interface: <value of string>
interface-select-method: <value in [auto, sdwan, specify]>
two-factor-authentication: <value in [fortitoken, email, sms]>
two-factor-notification: <value in [email, sms]>
antiphish: <value in [disable, enable]>
password-attr: <value of string>
source-port: <value of integer>
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
request_url
string
|
always |
The full url requested
Sample:
/sys/login/user
|
response_code
integer
|
always |
The status of api request
|
response_message
string
|
always |
The descriptive message of the api response
Sample:
OK.
|
Authors
- Link Zheng (@chillancezen)
- Jie Xue (@JieX19)
- Frank Shen (@fshen01)
- Hongbin Lu (@fgtdev-hblu)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/fortinet/fortimanager/fmgr_user_ldap_module.html