Ansible Galaxy FortiADC Collection

FortiADC/Galaxy Version Mapping Guide

  • FortiADC Galaxy Versioning

User's Guide

  • Install FortiADC Ansible Galaxy
  • Run Your First Playbook

modules index

  • Configuration Modules
    • fadcos_admin – admin configuration in Fortinet’s FortiADC
    • fadcos_application_profile – application profile configuration in Fortinet’s FortiADC
    • fadcos_backup_config – Download FortiADC config file in Fortinet’s FortiADC
    • fadcos_cert_verify – certificate verification configuration in Fortinet’s FortiADC
    • fadcos_client_ssl_profile – client ssl profile configuration in Fortinet’s FortiADC
    • fadcos_error_page – Error page upload in Fortinet’s FortiADC
    • fadcos_health_check – health check configuration in Fortinet’s FortiADC
    • fadcos_interface – interface configuration in Fortinet’s FortiADC
    • fadcos_load_balance_content_routing – configure content routing in Fortinet’s FortiADC
    • fadcos_load_balance_content_routing_child_match_condition – configure content routing child match condition in Fortinet’s FortiADC
    • fadcos_load_balance_method – configure LB method in Fortinet’s FortiADC
    • fadcos_load_balance_persistence – configure load balance persistence in Fortinet’s FortiADC
    • fadcos_load_balance_persistence_child_iso8583_bitmap – configure ISO8583 Bitmap persistence rule in Fortinet’s FortiADC
    • fadcos_load_balance_persistence_child_radius_attribute – configure RADIUS Attribute persistence rule in Fortinet’s FortiADC
    • fadcos_local_cert_group – local cert group configuration in Fortinet’s FortiADC
    • fadcos_nat_pool – nat pool configuration in Fortinet’s FortiADC
    • fadcos_nat_pool_member – nat pool member configuration in Fortinet’s FortiADC
    • fadcos_real_server – real server configuration in Fortinet’s FortiADC
    • fadcos_real_server_pool – real server pool configuration in Fortinet’s FortiADC
    • fadcos_real_server_pool_member – real server pool member configuration in Fortinet’s FortiADC
    • fadcos_real_server_ssl_profile – real server ssl profile configuration in Fortinet’s FortiADC
    • fadcos_route_static – route static configuration in Fortinet’s FortiADC
    • fadcos_system_certificate_local – Generate Certificate Signing Request in Fortinet’s FortiADC
    • fadcos_system_certificate_local_upload – upload local certificate to Fortinet’s FortiADC
    • fadcos_system_control – system control in Fortinet’s FortiADC
    • fadcos_system_ha – HA configuration in Fortinet’s FortiADC
    • fadcos_system_ha_remote_ip_monitor – HA remote ip monitor configuration in Fortinet’s FortiADC
    • fadcos_system_setting – system setting configuration in Fortinet’s FortiADC
    • fadcos_system_snmp_community – configure SNMP community settings in Fortinet’s FortiADC
    • fadcos_system_snmp_community_child_host – configure child host of SNMP community in Fortinet’s FortiADC
    • fadcos_system_snmp_sysinfo – configure SNMP system information in Fortinet’s FortiADC
    • fadcos_system_snmp_user – configure SNMP community settings in Fortinet’s FortiADC
    • fadcos_system_snmp_user_child_host – configure child host of SNMP community in Fortinet’s FortiADC
    • fadcos_system_time_ntp – manage system time ntp in Fortinet’s FortiADC
    • fadcos_system_vdom – Configure the parameters of each VDOM in Fortinet’s FortiADC
    • fadcos_vdom – vdom configuration in Fortinet’s FortiADC
    • fadcos_virtual_server – virtual server configuration in Fortinet’s FortiADC
    • fadcos_virtual_server_basic – virtual server basic configuration in Fortinet’s FortiADC
    • fadcos_vm_license – VM license upload in Fortinet’s FortiADC
    • fadcos_waf_adaptive_learning – Configuring an Adaptive Learning policy
    • fadcos_waf_adaptive_learning_child_url_list – Configure the URL List settings of an Adaptive Learning policy
    • fadcos_waf_advanced_protection – Configure an Advanced Protection policy
    • fadcos_waf_advanced_protection_child_rule – Configure a rule object of an Advanced Protection policy
    • fadcos_waf_allowed_origin – Configuring an Allowed Origin List
    • fadcos_waf_allowed_origin_list – Configuring a list entry of a Allowed Origin List
    • fadcos_waf_api_discovery – Configuring API Discovery
    • fadcos_waf_api_discovery_child_security_rule – Configure security rules of an API discovery policy
    • fadcos_waf_api_gateway_policy – Configuring an API Gateway policy
    • fadcos_waf_api_gateway_rule – Configure rule objects of an API Gateway policy
    • fadcos_waf_api_gateway_user – Configure user profiles of an API Gateway policy
    • fadcos_waf_brute_force_login – Configuring a Brute Force Attack Detection policy
    • fadcos_waf_brute_force_login_child_match_condition – Configure the Match Condition object of a Brute Force Attack Detection policy
    • fadcos_waf_cookie_security – Configure a Cookie Security policy
      • Synopsis
      • Requirements
      • FortiADC Version Compatibility
      • Parameters
      • Examples
      • Return Values
      • Status
      • Authors
    • fadcos_waf_cookie_security_child_cookie_list – Configure the cookie list of a a Cookie Security policy
    • fadcos_waf_cors_headers – Configuring a CORS Headers List
    • fadcos_waf_cors_headers_child_list – Configure the list entries of a CORS Headers List
    • fadcos_waf_cors_protection – Configure a CORS Protections Policy
    • fadcos_waf_cors_protection_rule_list – Configuring a Rule object of a CORS Protection Policy
    • fadcos_waf_credential_stuffing_defense – Configuring a Credential Stuffing Defense policy
    • fadcos_waf_csrf_protection – Configuring a CSRF protection policy
    • fadcos_waf_csrf_protection_child_page_list – Configure the Page List of a CSRF protection policy
    • fadcos_waf_csrf_protection_child_url_list – Configure the URL List of a CSRF protection policy
    • fadcos_waf_data_leak_prevention – Configuring a DLP Policy
    • fadcos_waf_data_leak_prevention_child_rule – Configuring Rule objects of a DLP Policy
    • fadcos_waf_data_leak_prevention_dictionary – Configuring Dictionary objects of a DLP Policy
    • fadcos_waf_data_leak_prevention_sensors – Configuring Sensor objects of a DLP Policy
    • fadcos_waf_file_restriction_rule – Configuring a File Restriction rule
    • fadcos_waf_heuristic_sql_xss_injection_detection – Configuring an SQL/XSS Injection Detection policy
    • fadcos_waf_hidden_field_rule – Configuring a Hidden Field rule
    • fadcos_waf_http_header_security – Configuring an HTTP Header Security policy
    • fadcos_waf_http_header_security_child_rule_list – Configure the HTTP Header Security Rules section of an HTTP Header Security policy
    • fadcos_waf_http_protocol_constraint – Configuring an HTTP Protocol Constraint policy
    • fadcos_waf_json_validation_detection – Configuring JSON detection
    • fadcos_waf_openapi_validation_detection – Configuring OpenAPI Detection
    • fadcos_waf_parameter_validation_rule – Configuring a Parameter Validation rule
    • fadcos_waf_profile – Configuring a WAF Profile
    • fadcos_waf_sensitive_data_type – Configuring a Sensitive Data Type object
    • fadcos_waf_url_protection – Configuring a URL Protection policy
    • fadcos_waf_web_attack_signature – Configuring a Web Attack Signature policy
    • fadcos_waf_xml_validation_detection – Configuring XML Detection

Appendices

  • Release Notes
Ansible Galaxy FortiADC Collection
  • »
  • Configuration Modules »
  • fadcos_waf_cookie_security – Configure a Cookie Security policy
  • View page source

fadcos_waf_cookie_security – Configure a Cookie Security policy¶

New in version 1.3.0.

  • Synopsis
  • Requirements
  • FortiADC Version Compatibility
  • Parameters
  • Examples
  • Return Values
  • Status
  • Authors

Synopsis¶

  • Configure a Cookie Security policy

Requirements¶

The below requirements are needed on the host that executes this module.

  • ansible>=2.8

FortiADC Version Compatibility¶


v7.1.4 v7.2.2 v7.4.0
fadcos_waf_cookie_security yes yes yes

Parameters¶

  • action - Type of action to perform on the object. type: str required: true
  • name - Specify the name of the type: str required: true
  • max_age - Specify the maximum age (in minutes) if the response from the backend server does not already have a "Max-Age" attribute, or does not have an "Expires" attribute. type: str required: false
  • samesite - Add SameSite attribute to prevent the browser from sending cookies along with cross-site requests, to mitigate the risk of cross-origin information leakage.type: str required: false
  • allow_suspicious_cookies - Select whether or not FortiADC will allow requests that contain unrecognizable cookies or if there are missing cookies.type: str required: false
  • cookie_replay - Disable or enable to allow FortiADC to use the IP address of a request to determine the owner of the cookie.type: str required: false
  • enc_cookie_type - Specify how cookies are encrypted.type: str required: false
  • dont_blk_until - Specify the date to begin blocking suspicious cookies.type: str required: false
  • exception - Specify exceptions identifing specific patterns that are not subject to processing by WAF rules.type: str required: false
  • http_only - Enable to add "HTTPOnly" flag to cookies.type: str required: false
  • rm_cookie - Enable so FortiADC will accept the request, but will also remove the cookie before sending it to backend web server.type: str required: false
  • sec_mode - Specify a security mode ("no", "signed", or "encrypted").type: str required: false
  • security_action - Select the action to apply.type: str required: false
  • secure - Enable to add the secure flag to cookies.type: str required: false
  • severity - Select which severity level FortiADC uses when using Cookie Security.type: str required: false
  • vdom - VDOM name if enabled.type: str required: true(if VDOM is enabled)

Examples¶

- name:
  hosts: all
  vars:
  connection: httpapi
  gather_facts: false
  tasks:
    - name: Add cookie_security
      fadcos_waf_cookie_security:
        action: add
        name: ck1
    - name: Add cookie_security again
      fadcos_waf_cookie_security:
        action: add
        name: ck1
    - name: edit acookie_security
      fadcos_waf_cookie_security:
        action: edit
        name: ck1
        max_age: 250
        samesite: lax
    - name: get acookie_security
      fadcos_waf_cookie_security:
        action: get
        name: ck1
    - name: delete cookie security
      fadcos_waf_cookie_security:
        action: delete
        name: ck1

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:

  • 200 - OK: Request returns successful.
  • 400 - Bad Request: Request cannot be processed by the API.
  • 401 - Not Authorized: Request without successful login session.
  • 403 - Forbidden: Request is missing CSRF token or administrator is missing access profile permissions.
  • 404 - Resource Not Found: Unable to find the specified resource.
  • 405 - Method Not Allowed: Specified HTTP method is not allowed for this resource.
  • 413 - Request Entity Too Large: Request cannot be processed due to large entity.
  • 424 - Failed Dependency: Fail dependency can be duplicate resource, missing required parameter, missing required attribute, or invalid attribute value.
  • 429 - Access temporarily blocked: Maximum failed authentications reached. The offended source is temporarily blocked for certain amount of time.
  • 500 - Internal Server Error: Internal error when processing the request.

For errorcode please check FortiADC API errorcode at : https://fndn.fortinet.net/index.php?/fortiapi/981-fortiadc/

Status¶

  • This module is not guaranteed to have a backwards compatible interface.

Authors¶

  • Joseph Chen

Hint

If you notice any issues in this documentation, you can create a pull request to improve it at: https://github.com/fortinet-ansible-dev/ansible-galaxy-fortiadc-sphinxdoc/pulls

Next Previous

© Copyright 2020-2023, Fortinet

Built with Sphinx using a theme provided by Read the Docs.