Debian Codegraph @

ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_user_ldap.py

raw symbols SCIP
1 #!/usr/bin/python
2 from __future__ import absolute_import, division, print_function
3 # Copyright 2019-2024 Fortinet, Inc.
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 __metaclass__ = type
7
8 ANSIBLE_METADATA = {'status': ['preview'],
9 'supported_by': 'community',
10 'metadata_version': '1.1'}
11
12 DOCUMENTATION = '''
13 ---
14 module: fmgr_user_ldap
15 short_description: Configure LDAP server entries.
16 version_added: "2.0.0"
17 extends_documentation_fragment:
18 - fortinet.fortimanager.general
19 - fortinet.fortimanager.general.full_crud
20 options:
21 revision_note:
22 description: The change note that can be specified when an object is created or updated.
23 type: str
24 adom:
25 description: The parameter (adom) in requested url.
26 type: str
27 required: true
28 user_ldap:
29 description: The top level parameters set.
30 required: false
31 type: dict
32 suboptions:
33 account_key_filter:
34 aliases: ['account-key-filter']
35 type: str
36 description: Account key filter, using the UPN as the search filter.
37 account_key_processing:
38 aliases: ['account-key-processing']
39 type: str
40 description: Account key processing operation, either keep or strip domain string of UPN in the token.
41 choices: ['same', 'strip']
42 ca_cert:
43 aliases: ['ca-cert']
44 type: str
45 description: CA certificate name.
46 cnid:
47 type: str
48 description: Common name identifier for the LDAP server.
49 dn:
50 type: str
51 description: Distinguished name used to look up entries on the LDAP server.
52 dynamic_mapping:
53 type: list
54 elements: dict
55 description: Dynamic mapping.
56 suboptions:
57 _scope:
58 type: list
59 elements: dict
60 description: Scope.
61 suboptions:
62 name:
63 type: str
64 description: Name.
65 vdom:
66 type: str
67 description: Vdom.
68 account_key_filter:
69 aliases: ['account-key-filter']
70 type: str
71 description: Account key filter.
72 account_key_name:
73 aliases: ['account-key-name']
74 type: str
75 description: Account key name.
76 account_key_processing:
77 aliases: ['account-key-processing']
78 type: str
79 description: Account key processing.
80 choices: ['same', 'strip']
81 ca_cert:
82 aliases: ['ca-cert']
83 type: str
84 description: Ca cert.
85 cnid:
86 type: str
87 description: Cnid.
88 dn:
89 type: str
90 description: Dn.
91 filter:
92 type: str
93 description: Filter.
94 group:
95 type: str
96 description: Group.
97 group_filter:
98 aliases: ['group-filter']
99 type: str
100 description: Group filter.
101 group_member_check:
102 aliases: ['group-member-check']
103 type: str
104 description: Group member check.
105 choices: ['user-attr', 'group-object', 'posix-group-object']
106 group_object_filter:
107 aliases: ['group-object-filter']
108 type: str
109 description: Group object filter.
110 group_object_search_base:
111 aliases: ['group-object-search-base']
112 type: str
113 description: Group object search base.
114 group_search_base:
115 aliases: ['group-search-base']
116 type: str
117 description: Group search base.
118 member_attr:
119 aliases: ['member-attr']
120 type: str
121 description: Member attr.
122 obtain_user_info:
123 aliases: ['obtain-user-info']
124 type: str
125 description: Obtain user info.
126 choices: ['disable', 'enable']
127 password:
128 type: raw
129 description: (list) Password.
130 password_expiry_warning:
131 aliases: ['password-expiry-warning']
132 type: str
133 description: Password expiry warning.
134 choices: ['disable', 'enable']
135 password_renewal:
136 aliases: ['password-renewal']
137 type: str
138 description: Password renewal.
139 choices: ['disable', 'enable']
140 port:
141 type: int
142 description: Port.
143 retrieve_protection_profile:
144 aliases: ['retrieve-protection-profile']
145 type: str
146 description: Retrieve protection profile.
147 search_type:
148 aliases: ['search-type']
149 type: list
150 elements: str
151 description: Search type.
152 choices: ['nested', 'recursive']
153 secondary_server:
154 aliases: ['secondary-server']
155 type: str
156 description: Secondary server.
157 secure:
158 type: str
159 description: Secure.
160 choices: ['disable', 'starttls', 'ldaps']
161 server:
162 type: str
163 description: Server.
164 server_identity_check:
165 aliases: ['server-identity-check']
166 type: str
167 description: Server identity check.
168 choices: ['disable', 'enable']
169 source_ip:
170 aliases: ['source-ip']
171 type: str
172 description: Source ip.
173 ssl_min_proto_version:
174 aliases: ['ssl-min-proto-version']
175 type: str
176 description: Ssl min proto version.
177 choices: ['default', 'TLSv1', 'TLSv1-1', 'TLSv1-2', 'SSLv3', 'TLSv1-3']
178 tertiary_server:
179 aliases: ['tertiary-server']
180 type: str
181 description: Tertiary server.
182 type:
183 type: str
184 description: Type.
185 choices: ['simple', 'anonymous', 'regular']
186 user_info_exchange_server:
187 aliases: ['user-info-exchange-server']
188 type: str
189 description: User info exchange server.
190 username:
191 type: str
192 description: Username.
193 two_factor:
194 aliases: ['two-factor']
195 type: str
196 description: Two factor.
197 choices: ['disable', 'fortitoken-cloud']
198 interface:
199 type: str
200 description: Interface.
201 interface_select_method:
202 aliases: ['interface-select-method']
203 type: str
204 description: Interface select method.
205 choices: ['auto', 'sdwan', 'specify']
206 two_factor_authentication:
207 aliases: ['two-factor-authentication']
208 type: str
209 description: Two factor authentication.
210 choices: ['fortitoken', 'email', 'sms']
211 two_factor_notification:
212 aliases: ['two-factor-notification']
213 type: str
214 description: Two factor notification.
215 choices: ['email', 'sms']
216 antiphish:
217 type: str
218 description: Enable/disable AntiPhishing credential backend.
219 choices: ['disable', 'enable']
220 password_attr:
221 aliases: ['password-attr']
222 type: str
223 description: Name of attribute to get password hash.
224 source_port:
225 aliases: ['source-port']
226 type: int
227 description: Source port to be used for communication with the LDAP server.
228 client_cert:
229 aliases: ['client-cert']
230 type: str
231 description: Client certificate name.
232 client_cert_auth:
233 aliases: ['client-cert-auth']
234 type: str
235 description: Enable/disable using client certificate for TLS authentication.
236 choices: ['disable', 'enable']
237 max_connections:
238 aliases: ['max-connections']
239 type: int
240 description: Max connections.
241 two_factor_filter:
242 aliases: ['two-factor-filter']
243 type: str
244 description: Filter used to synchronize users to FortiToken Cloud.
245 account_key_upn_san:
246 aliases: ['account-key-upn-san']
247 type: str
248 description: Define SAN in certificate for user principle name matching.
249 choices: ['othername', 'rfc822name', 'dnsname']
250 account_key_cert_field:
251 aliases: ['account-key-cert-field']
252 type: str
253 description: Define subject identity field in certificate for user access right checking.
254 choices: ['othername', 'rfc822name', 'dnsname', 'cn']
255 status_ttl:
256 aliases: ['status-ttl']
257 type: int
258 description: Time for which server reachability is cached so that when a server is unreachable, it will not be retried for at l...
259 source_ip_interface:
260 aliases: ['source-ip-interface']
261 type: raw
262 description: (list) Source interface for communication with the LDAP server.
263 ssl_max_proto_version:
264 aliases: ['ssl-max-proto-version']
265 type: str
266 description: Ssl max proto version.
267 choices: ['TLSv1-1', 'TLSv1-2', 'SSLv3', 'TLSv1', 'TLSv1-3']
268 vrf_select:
269 aliases: ['vrf-select']
270 type: int
271 description: VRF ID used for connection to server.
272 validate_server_certificate:
273 aliases: ['validate-server-certificate']
274 type: str
275 description: Validate server certificate.
276 choices: ['disable', 'enable']
277 group_filter:
278 aliases: ['group-filter']
279 type: str
280 description: Filter used for group matching.
281 group_member_check:
282 aliases: ['group-member-check']
283 type: str
284 description: Group member checking methods.
285 choices: ['user-attr', 'group-object', 'posix-group-object']
286 group_object_filter:
287 aliases: ['group-object-filter']
288 type: str
289 description: Filter used for group searching.
290 group_search_base:
291 aliases: ['group-search-base']
292 type: str
293 description: Search base used for group searching.
294 member_attr:
295 aliases: ['member-attr']
296 type: str
297 description: Name of attribute from which to get group membership.
298 name:
299 type: str
300 description: LDAP server entry name.
301 required: true
302 password:
303 type: raw
304 description: (list) Password for initial binding.
305 password_expiry_warning:
306 aliases: ['password-expiry-warning']
307 type: str
308 description: Enable/disable password expiry warnings.
309 choices: ['disable', 'enable']
310 password_renewal:
311 aliases: ['password-renewal']
312 type: str
313 description: Enable/disable online password renewal.
314 choices: ['disable', 'enable']
315 port:
316 type: int
317 description: Port to be used for communication with the LDAP server
318 secondary_server:
319 aliases: ['secondary-server']
320 type: str
321 description: Secondary LDAP server CN domain name or IP.
322 secure:
323 type: str
324 description: Port to be used for authentication.
325 choices: ['disable', 'starttls', 'ldaps']
326 server:
327 type: str
328 description: LDAP server CN domain name or IP.
329 server_identity_check:
330 aliases: ['server-identity-check']
331 type: str
332 description: Enable/disable LDAP server identity check
333 choices: ['disable', 'enable']
334 source_ip:
335 aliases: ['source-ip']
336 type: str
337 description: Source IP for communications to LDAP server.
338 ssl_min_proto_version:
339 aliases: ['ssl-min-proto-version']
340 type: str
341 description: Minimum supported protocol version for SSL/TLS connections
342 choices: ['default', 'TLSv1', 'TLSv1-1', 'TLSv1-2', 'SSLv3', 'TLSv1-3']
343 tertiary_server:
344 aliases: ['tertiary-server']
345 type: str
346 description: Tertiary LDAP server CN domain name or IP.
347 type:
348 type: str
349 description: Authentication type for LDAP searches.
350 choices: ['simple', 'anonymous', 'regular']
351 username:
352 type: str
353 description: Username
354 obtain_user_info:
355 aliases: ['obtain-user-info']
356 type: str
357 description: Enable/disable obtaining of user information.
358 choices: ['disable', 'enable']
359 search_type:
360 aliases: ['search-type']
361 type: list
362 elements: str
363 description: Search type.
364 choices: ['nested', 'recursive']
365 user_info_exchange_server:
366 aliases: ['user-info-exchange-server']
367 type: str
368 description: MS Exchange server from which to fetch user information.
369 account_key_name:
370 aliases: ['account-key-name']
371 type: str
372 description: Account key name, using the UPN as the search filter.
373 group_object_search_base:
374 aliases: ['group-object-search-base']
375 type: str
376 description: Search base used for group searching.
377 two_factor:
378 aliases: ['two-factor']
379 type: str
380 description: Enable/disable two-factor authentication.
381 choices: ['disable', 'fortitoken-cloud']
382 interface:
383 type: str
384 description: Specify outgoing interface to reach server.
385 interface_select_method:
386 aliases: ['interface-select-method']
387 type: str
388 description: Specify how to select outgoing interface to reach server.
389 choices: ['auto', 'sdwan', 'specify']
390 two_factor_authentication:
391 aliases: ['two-factor-authentication']
392 type: str
393 description: Authentication method by FortiToken Cloud.
394 choices: ['fortitoken', 'email', 'sms']
395 two_factor_notification:
396 aliases: ['two-factor-notification']
397 type: str
398 description: Notification method for user activation by FortiToken Cloud.
399 choices: ['email', 'sms']
400 antiphish:
401 type: str
402 description: Enable/disable AntiPhishing credential backend.
403 choices: ['disable', 'enable']
404 password_attr:
405 aliases: ['password-attr']
406 type: str
407 description: Name of attribute to get password hash.
408 source_port:
409 aliases: ['source-port']
410 type: int
411 description: Source port to be used for communication with the LDAP server.
412 client_cert:
413 aliases: ['client-cert']
414 type: str
415 description: Client certificate name.
416 client_cert_auth:
417 aliases: ['client-cert-auth']
418 type: str
419 description: Enable/disable using client certificate for TLS authentication.
420 choices: ['disable', 'enable']
421 two_factor_filter:
422 aliases: ['two-factor-filter']
423 type: str
424 description: Filter used to synchronize users to FortiToken Cloud.
425 account_key_upn_san:
426 aliases: ['account-key-upn-san']
427 type: str
428 description: Define SAN in certificate for user principle name matching.
429 choices: ['othername', 'rfc822name', 'dnsname']
430 account_key_cert_field:
431 aliases: ['account-key-cert-field']
432 type: str
433 description: Define subject identity field in certificate for user access right checking.
434 choices: ['othername', 'rfc822name', 'dnsname', 'cn']
435 status_ttl:
436 aliases: ['status-ttl']
437 type: int
438 description: Time for which server reachability is cached so that when a server is unreachable, it will not be retried for at least thi...
439 source_ip_interface:
440 aliases: ['source-ip-interface']
441 type: raw
442 description: (list) Source interface for communication with the LDAP server.
443 vrf_select:
444 aliases: ['vrf-select']
445 type: int
446 description: VRF ID used for connection to server.
447 max_connections:
448 aliases: ['max-connections']
449 type: int
450 description: Max connections.
451 ssl_max_proto_version:
452 aliases: ['ssl-max-proto-version']
453 type: str
454 description: Ssl max proto version.
455 choices: ['TLSv1-1', 'TLSv1-2', 'SSLv3', 'TLSv1', 'TLSv1-3']
456 validate_server_certificate:
457 aliases: ['validate-server-certificate']
458 type: str
459 description: Validate server certificate.
460 choices: ['disable', 'enable']
461 '''
462
463 EXAMPLES = '''
464 - name: Example playbook
465 hosts: fortimanagers
466 gather_facts: false
467 connection: httpapi
468 vars:
469 ansible_httpapi_use_ssl: true
470 ansible_httpapi_validate_certs: false
471 ansible_httpapi_port: 443
472 tasks:
473 - name: Configure LDAP server entries.
474 fortinet.fortimanager.fmgr_user_ldap:
475 bypass_validation: false
476 adom: ansible
477 state: present
478 user_ldap:
479 dn: ansible-test
480 name: ansible-test-ldap
481 password: fortinet
482 port: 9000
483 server: ansible
484
485 - name: Gathering fortimanager facts
486 hosts: fortimanagers
487 gather_facts: false
488 connection: httpapi
489 vars:
490 ansible_httpapi_use_ssl: true
491 ansible_httpapi_validate_certs: false
492 ansible_httpapi_port: 443
493 tasks:
494 - name: Retrieve all the LDAP server entries
495 fortinet.fortimanager.fmgr_fact:
496 facts:
497 selector: "user_ldap"
498 params:
499 adom: "ansible"
500 ldap: "your_value"
501 '''
502
503 RETURN = '''
504 meta:
505 description: The result of the request.
506 type: dict
507 returned: always
508 contains:
509 request_url:
510 description: The full url requested.
511 returned: always
512 type: str
513 sample: /sys/login/user
514 response_code:
515 description: The status of api request.
516 returned: always
517 type: int
518 sample: 0
519 response_data:
520 description: The api response.
521 type: list
522 returned: always
523 response_message:
524 description: The descriptive message of the api response.
525 type: str
526 returned: always
527 sample: OK.
528 system_information:
529 description: The information of the target system.
530 type: dict
531 returned: always
532 rc:
533 description: The status the request.
534 type: int
535 returned: always
536 sample: 0
537 version_check_warning:
538 description: Warning if the parameters used in the playbook are not supported by the current FortiManager version.
539 type: list
540 returned: complex
541 '''
542 from ansible.module_utils.basic import AnsibleModule
543 from ansible.module_utils.connection import Connection
544 from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass
545 from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec
546
547
548 def main():
549 urls_list = [
550 '/pm/config/adom/{adom}/obj/user/ldap',
551 '/pm/config/global/obj/user/ldap'
552 ]
553 module_arg_spec = {
554 'adom': {'required': True, 'type': 'str'},
555 'revision_note': {'type': 'str'},
556 'user_ldap': {
557 'type': 'dict', 'v_range': [['6.0.0', '']],
558 'options': {
559 'account-key-filter': {'no_log': True, 'type': 'str'},
560 'account-key-processing': {'choices': ['same', 'strip'], 'type': 'str'},
561 'ca-cert': {'type': 'str'},
562 'cnid': {'type': 'str'},
563 'dn': {'type': 'str'},
564 'dynamic_mapping': {
565 'type': 'list',
566 'options': {
567 '_scope': {'type': 'list', 'options': {'name': {'type': 'str'}, 'vdom': {'type': 'str'}}, 'elements': 'dict'},
568 'account-key-filter': {'no_log': True, 'type': 'str'},
569 'account-key-name': {'no_log': True, 'type': 'str'},
570 'account-key-processing': {'choices': ['same', 'strip'], 'type': 'str'},
571 'ca-cert': {'type': 'str'},
572 'cnid': {'type': 'str'},
573 'dn': {'type': 'str'},
574 'filter': {'type': 'str'},
575 'group': {'type': 'str'},
576 'group-filter': {'type': 'str'},
577 'group-member-check': {'choices': ['user-attr', 'group-object', 'posix-group-object'], 'type': 'str'},
578 'group-object-filter': {'type': 'str'},
579 'group-object-search-base': {'type': 'str'},
580 'group-search-base': {'type': 'str'},
581 'member-attr': {'type': 'str'},
582 'obtain-user-info': {'choices': ['disable', 'enable'], 'type': 'str'},
583 'password': {'no_log': True, 'type': 'raw'},
584 'password-expiry-warning': {'choices': ['disable', 'enable'], 'type': 'str'},
585 'password-renewal': {'choices': ['disable', 'enable'], 'type': 'str'},
586 'port': {'type': 'int'},
587 'retrieve-protection-profile': {'type': 'str'},
588 'search-type': {'type': 'list', 'choices': ['nested', 'recursive'], 'elements': 'str'},
589 'secondary-server': {'type': 'str'},
590 'secure': {'choices': ['disable', 'starttls', 'ldaps'], 'type': 'str'},
591 'server': {'type': 'str'},
592 'server-identity-check': {'choices': ['disable', 'enable'], 'type': 'str'},
593 'source-ip': {'type': 'str'},
594 'ssl-min-proto-version': {'choices': ['default', 'TLSv1', 'TLSv1-1', 'TLSv1-2', 'SSLv3', 'TLSv1-3'], 'type': 'str'},
595 'tertiary-server': {'type': 'str'},
596 'type': {'choices': ['simple', 'anonymous', 'regular'], 'type': 'str'},
597 'user-info-exchange-server': {'type': 'str'},
598 'username': {'type': 'str'},
599 'two-factor': {'v_range': [['6.2.2', '']], 'choices': ['disable', 'fortitoken-cloud'], 'type': 'str'},
600 'interface': {'v_range': [['6.2.5', '6.2.13'], ['6.4.1', '']], 'type': 'str'},
601 'interface-select-method': {
602 'v_range': [['6.2.5', '6.2.13'], ['6.4.1', '']],
603 'choices': ['auto', 'sdwan', 'specify'],
604 'type': 'str'
605 },
606 'two-factor-authentication': {'v_range': [['6.2.5', '']], 'choices': ['fortitoken', 'email', 'sms'], 'type': 'str'},
607 'two-factor-notification': {'v_range': [['6.2.5', '']], 'choices': ['email', 'sms'], 'type': 'str'},
608 'antiphish': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
609 'password-attr': {'v_range': [['7.0.0', '']], 'no_log': True, 'type': 'str'},
610 'source-port': {'v_range': [['7.0.0', '']], 'type': 'int'},
611 'client-cert': {'v_range': [['7.2.0', '']], 'type': 'str'},
612 'client-cert-auth': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
613 'max-connections': {'v_range': [['7.0.11', '7.0.16'], ['7.2.5', '7.2.12'], ['7.4.1', '']], 'type': 'int'},
614 'two-factor-filter': {'v_range': [['7.2.1', '']], 'type': 'str'},
615 'account-key-upn-san': {'v_range': [['7.2.2', '']], 'choices': ['othername', 'rfc822name', 'dnsname'], 'type': 'str'},
616 'account-key-cert-field': {'v_range': [['7.4.1', '']], 'choices': ['othername', 'rfc822name', 'dnsname', 'cn'], 'type': 'str'},
617 'status-ttl': {'v_range': [['7.4.3', '']], 'type': 'int'},
618 'source-ip-interface': {'v_range': [['7.6.0', '']], 'type': 'raw'},
619 'ssl-max-proto-version': {
620 'v_range': [['7.2.10', '7.2.12'], ['7.4.4', '7.4.10'], ['7.6.2', '']],
621 'choices': ['TLSv1-1', 'TLSv1-2', 'SSLv3', 'TLSv1', 'TLSv1-3'],
622 'type': 'str'
623 },
624 'vrf-select': {'v_range': [['7.6.2', '']], 'type': 'int'},
625 'validate-server-certificate': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
626 },
627 'elements': 'dict'
628 },
629 'group-filter': {'type': 'str'},
630 'group-member-check': {'choices': ['user-attr', 'group-object', 'posix-group-object'], 'type': 'str'},
631 'group-object-filter': {'type': 'str'},
632 'group-search-base': {'type': 'str'},
633 'member-attr': {'type': 'str'},
634 'name': {'required': True, 'type': 'str'},
635 'password': {'no_log': True, 'type': 'raw'},
636 'password-expiry-warning': {'choices': ['disable', 'enable'], 'type': 'str'},
637 'password-renewal': {'choices': ['disable', 'enable'], 'type': 'str'},
638 'port': {'type': 'int'},
639 'secondary-server': {'type': 'str'},
640 'secure': {'choices': ['disable', 'starttls', 'ldaps'], 'type': 'str'},
641 'server': {'type': 'str'},
642 'server-identity-check': {'choices': ['disable', 'enable'], 'type': 'str'},
643 'source-ip': {'type': 'str'},
644 'ssl-min-proto-version': {'choices': ['default', 'TLSv1', 'TLSv1-1', 'TLSv1-2', 'SSLv3', 'TLSv1-3'], 'type': 'str'},
645 'tertiary-server': {'type': 'str'},
646 'type': {'choices': ['simple', 'anonymous', 'regular'], 'type': 'str'},
647 'username': {'type': 'str'},
648 'obtain-user-info': {'v_range': [['6.2.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
649 'search-type': {'v_range': [['6.2.0', '']], 'type': 'list', 'choices': ['nested', 'recursive'], 'elements': 'str'},
650 'user-info-exchange-server': {'v_range': [['6.2.0', '']], 'type': 'str'},
651 'account-key-name': {'v_range': [['6.2.0', '6.4.15'], ['7.4.8', '7.4.10']], 'no_log': True, 'type': 'str'},
652 'group-object-search-base': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'},
653 'two-factor': {'v_range': [['6.2.2', '']], 'choices': ['disable', 'fortitoken-cloud'], 'type': 'str'},
654 'interface': {'v_range': [['6.2.5', '6.2.13'], ['6.4.1', '']], 'type': 'str'},
655 'interface-select-method': {'v_range': [['6.2.5', '6.2.13'], ['6.4.1', '']], 'choices': ['auto', 'sdwan', 'specify'], 'type': 'str'},
656 'two-factor-authentication': {'v_range': [['6.2.5', '']], 'choices': ['fortitoken', 'email', 'sms'], 'type': 'str'},
657 'two-factor-notification': {'v_range': [['6.2.5', '']], 'choices': ['email', 'sms'], 'type': 'str'},
658 'antiphish': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
659 'password-attr': {'v_range': [['7.0.0', '']], 'no_log': True, 'type': 'str'},
660 'source-port': {'v_range': [['7.0.0', '']], 'type': 'int'},
661 'client-cert': {'v_range': [['7.2.0', '']], 'type': 'str'},
662 'client-cert-auth': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
663 'two-factor-filter': {'v_range': [['7.2.1', '']], 'type': 'str'},
664 'account-key-upn-san': {'v_range': [['7.2.2', '']], 'choices': ['othername', 'rfc822name', 'dnsname'], 'type': 'str'},
665 'account-key-cert-field': {'v_range': [['7.4.1', '']], 'choices': ['othername', 'rfc822name', 'dnsname', 'cn'], 'type': 'str'},
666 'status-ttl': {'v_range': [['7.4.3', '']], 'type': 'int'},
667 'source-ip-interface': {'v_range': [['7.6.0', '']], 'type': 'raw'},
668 'vrf-select': {'v_range': [['7.6.2', '']], 'type': 'int'},
669 'max-connections': {'v_range': [['7.4.8', '7.4.10'], ['7.6.4', '']], 'type': 'int'},
670 'ssl-max-proto-version': {
671 'v_range': [['7.4.8', '7.4.10'], ['7.6.4', '']],
672 'choices': ['TLSv1-1', 'TLSv1-2', 'SSLv3', 'TLSv1', 'TLSv1-3'],
673 'type': 'str'
674 },
675 'validate-server-certificate': {'v_range': [['7.6.4', '7.6.4']], 'choices': ['disable', 'enable'], 'type': 'str'}
676 }
677 }
678 }
679
680 module_option_spec = get_module_arg_spec('full crud')
681 module_arg_spec.update(module_option_spec)
682 check_galaxy_version(module_arg_spec)
683 module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'user_ldap'),
684 supports_check_mode=True)
685 if not module._socket_path:
686 module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
687 connection = Connection(module._socket_path)
688 fmgr = NAPIManager('full crud', module_arg_spec, urls_list,
689 'name', 'data', module, connection)
690 fmgr.process_crud()
691 module.exit_json(meta=module.params)
692
693
694 if __name__ == '__main__':
695 main()