fortinet.fortios.fortios_system_saml 模块 – Fortinet FortiOS 和 FortiGate 中 SAML 身份验证的全局设置。

注意

此模块是 fortinet.fortios 集合 (版本 2.3.8) 的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用: ansible-galaxy collection install fortinet.fortios。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求

要在 playbook 中使用它,请指定: fortinet.fortios.fortios_system_saml

fortinet.fortios 2.0.0 中的新增功能

概要

  • 此模块能够通过允许用户设置和修改系统功能和 saml 类别来配置 FortiGate 或 FortiOS (FOS) 设备。示例包括所有参数,在使用前需要将值调整到数据源。已在 FOS v6.0.0 上测试。

要求

执行此模块的主机需要以下要求。

  • ansible>=2.15

参数

参数

注释

access_token

字符串

基于令牌的身份验证。从 FortiGate 的 GUI 生成。

enable_log

布尔值

启用/禁用任务日志记录。

选项

  • false ← (默认)

  • true

member_path

字符串

要操作的成员属性路径。

如果有多个属性,则以斜杠字符分隔。

标有 member_path 的参数对于执行成员操作是合法的。

member_state

字符串

在指定的属性路径下添加或删除成员。

指定 member_state 时,将忽略 state 选项。

选项

  • "present"

  • "absent"

system_saml

字典

SAML 身份验证的全局设置。

artifact_resolution_url

字符串

SP 工件解析 URL。

binding_protocol

字符串

IdP 绑定协议。

选项

  • "post"

  • "redirect"

cert

字符串

用于签署 SAML 消息的证书。源证书.local.name。

default_login_page

字符串

选择默认登录页面。

选项

  • "normal"

  • "sso"

default_profile

字符串

新 SSO 管理员的默认配置文件。源 system.accprofile.name。

entity_id

字符串

SP 实体 ID。

idp_artifact_resolution_url

字符串

IDP 工件解析 URL。

idp_cert

字符串

IDP 证书名称。源证书.remote.name。

idp_entity_id

字符串

IDP 实体 ID。

idp_single_logout_url

字符串

IDP 单点注销 URL。

idp_single_sign_on_url

字符串

IDP 单点登录 URL。

life

整数

断言有效的时长范围(以分钟为单位)。

portal_url

字符串

SP 门户 URL。

role

字符串

SAML 角色。

选项

  • "identity-provider"

  • "service-provider"

server_address

字符串

服务器地址。

service_providers

列表 / 元素=字典

授权的服务提供商。

assertion_attributes

列表 / 元素=字典

自定义的 SAML 属性,用于与断言一起发送。

name

字符串 / 必需

名称。

type

字符串

类型。

选项

  • "username"

  • "email"

  • "profile-name"

idp_artifact_resolution_url

字符串

IDP 工件解析 URL。

idp_entity_id

字符串

IDP 实体 ID。

idp_single_logout_url

字符串

IDP 单点注销 URL。

idp_single_sign_on_url

字符串

IDP 单点登录 URL。

name

字符串 / 必需

名称。

prefix

字符串

前缀。

sp_artifact_resolution_url

字符串

SP 工件解析 URL。

sp_binding_protocol

字符串

SP 绑定协议。

选项

  • "post"

  • "redirect"

sp_cert

字符串

SP 证书名称。源证书.remote.name。

sp_entity_id

字符串

SP 实体 ID。

sp_portal_url

字符串

SP 门户 URL。

sp_single_logout_url

字符串

SP 单点注销 URL。

sp_single_sign_on_url

字符串

SP 单点登录 URL。

single_logout_url

字符串

SP 单点注销 URL。

single_sign_on_url

字符串

SP 单点登录 URL。

status

字符串

启用/禁用 SAML 身份验证。

选项

  • "enable"

  • "disable"

tolerance

整数

断言有效的时长范围的容差(以分钟为单位)。

vdom

字符串

虚拟域,在之前定义的虚拟域中。vdom 是 FortiGate 的虚拟实例,可以将其配置和用作不同的单元。

默认: "root"

备注

注意

  • 旧版 fortiosapi 已弃用,httpapi 是运行 playbook 的首选方法。

示例

- name: Global settings for SAML authentication.
  fortinet.fortios.fortios_system_saml:
      vdom: "{{ vdom }}"
      system_saml:
          artifact_resolution_url: "<your_own_value>"
          binding_protocol: "post"
          cert: "<your_own_value> (source certificate.local.name)"
          default_login_page: "normal"
          default_profile: "<your_own_value> (source system.accprofile.name)"
          entity_id: "<your_own_value>"
          idp_artifact_resolution_url: "<your_own_value>"
          idp_cert: "<your_own_value> (source certificate.remote.name)"
          idp_entity_id: "<your_own_value>"
          idp_single_logout_url: "<your_own_value>"
          idp_single_sign_on_url: "<your_own_value>"
          life: "30"
          portal_url: "<your_own_value>"
          role: "identity-provider"
          server_address: "<your_own_value>"
          service_providers:
              -
                  assertion_attributes:
                      -
                          name: "default_name_20"
                          type: "username"
                  idp_artifact_resolution_url: "<your_own_value>"
                  idp_entity_id: "<your_own_value>"
                  idp_single_logout_url: "<your_own_value>"
                  idp_single_sign_on_url: "<your_own_value>"
                  name: "default_name_26"
                  prefix: "<your_own_value>"
                  sp_artifact_resolution_url: "<your_own_value>"
                  sp_binding_protocol: "post"
                  sp_cert: "<your_own_value> (source certificate.remote.name)"
                  sp_entity_id: "<your_own_value>"
                  sp_portal_url: "<your_own_value>"
                  sp_single_logout_url: "<your_own_value>"
                  sp_single_sign_on_url: "<your_own_value>"
          single_logout_url: "<your_own_value>"
          single_sign_on_url: "<your_own_value>"
          status: "enable"
          tolerance: "5"

返回值

常用的返回值已在 此处 记录,以下是此模块特有的字段。

描述

build

字符串

FortiGate 镜像的构建编号

返回: 始终

示例: "1547"

http_method

字符串

上次用于将内容置备到 FortiGate 的方法

返回: 始终

示例: "PUT"

http_status

字符串

FortiGate 在上次应用的操作中给出的最后结果

返回: 始终

示例: "200"

mkey

字符串

上次调用 FortiGate 时使用的主密钥 (ID)

返回: 成功

示例: "id"

name

字符串

用于完成请求的表的名称

返回: 始终

示例: "urlfilter"

path

字符串

用于完成请求的表的路径

返回: 始终

示例: "webfilter"

revision

字符串

内部修订号

返回: 始终

示例: "17.0.2.10658"

serial

字符串

设备的序列号

返回: 始终

示例: "FGVMEVYYQT3AB5352"

status

字符串

操作结果指示

返回: 始终

示例: "success"

vdom

字符串

使用的虚拟域

返回: 始终

示例: "root"

版本

字符串

FortiGate 版本

返回: 始终

示例: "v5.6.3"

作者

  • 郑链 (@chillancezen)

  • 薛杰 (@JieX19)

  • 陆洪斌 (@fgtdev-hblu)

  • 沈芳 (@frankshen01)

  • Miguel Angel Munoz (@mamunozgonzalez)

  • Nicolas Thomas (@thomnico)