fortinet.fortios.fortios_user_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_user_saml

fortinet.fortios 2.0.0 中的新功能

概要

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

要求

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

  • ansible>=2.15

参数

参数

注释

access_token

string

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

enable_log

boolean

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

选项

  • false ← (默认)

  • true

member_path

string

要操作的成员属性路径。

如果存在多个属性,则用斜杠字符分隔。

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

member_state

string

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

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

选项

  • "present"

  • "absent"

state

string / 必填

指示是创建还是删除对象。

选项

  • "present"

  • "absent"

user_saml

dictionary

SAML 服务器条目配置。

adfs_claim

string

启用/禁用断言语句中用户/组属性的 ADFS 声明。

选项

  • "enable"

  • "disable"

auth_url

string

用于验证身份验证的 URL。

cert

string

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

clock_tolerance

integer

时钟偏差容差,以秒为单位 (0 - 300)。

digest_method

string

摘要方法算法。

选项

  • "sha1"

  • "sha256"

entity_id

string

SP 实体 ID。

group_claim_type

string

断言语句中的组声明。

选项

  • "email"

  • "given-name"

  • "name"

  • "upn"

  • "common-name"

  • "email-adfs-1x"

  • "group"

  • "upn-adfs-1x"

  • "role"

  • "sur-name"

  • "ppid"

  • "name-identifier"

  • "authentication-method"

  • "deny-only-group-sid"

  • "deny-only-primary-sid"

  • "deny-only-primary-group-sid"

  • "group-sid"

  • "primary-group-sid"

  • "primary-sid"

  • "windows-account-name"

group_name

string

断言语句中的组名称。

idp_cert

string

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

idp_entity_id

string

IDP 实体 ID。

idp_single_logout_url

string

IDP 单点注销 URL。

idp_single_sign_on_url

string

IDP 单点登录 URL。

limit_relaystate

string

启用/禁用当 relay-state 参数超出 SAML 2.0 规范限制(80 字节)时对其进行限制。

选项

  • "enable"

  • "disable"

name

string / 必填

SAML 服务器条目名称。

reauth

string

启用/禁用 IDP 强制用户重新身份验证的信号。

选项

  • "enable"

  • "disable"

scim_client

string

SCIM 客户端名称。源 user.scim.name。

single_logout_url

string

SP 单点注销 URL。

single_sign_on_url

string

SP 单点登录 URL。

user_claim_type

string

断言语句中的用户名声明。

选项

  • "email"

  • "given-name"

  • "name"

  • "upn"

  • "common-name"

  • "email-adfs-1x"

  • "group"

  • "upn-adfs-1x"

  • "role"

  • "sur-name"

  • "ppid"

  • "name-identifier"

  • "authentication-method"

  • "deny-only-group-sid"

  • "deny-only-primary-sid"

  • "deny-only-primary-group-sid"

  • "group-sid"

  • "primary-group-sid"

  • "primary-sid"

  • "windows-account-name"

user_name

string

断言语句中的用户名。

vdom

string

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

默认: "root"

注释

注意

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

  • 该模块支持 check_mode。

示例

- name: SAML server entry configuration.
  fortinet.fortios.fortios_user_saml:
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
      user_saml:
          adfs_claim: "enable"
          auth_url: "<your_own_value>"
          cert: "<your_own_value> (source vpn.certificate.local.name)"
          clock_tolerance: "15"
          digest_method: "sha1"
          entity_id: "<your_own_value>"
          group_claim_type: "email"
          group_name: "<your_own_value>"
          idp_cert: "<your_own_value> (source vpn.certificate.remote.name)"
          idp_entity_id: "<your_own_value>"
          idp_single_logout_url: "<your_own_value>"
          idp_single_sign_on_url: "<your_own_value>"
          limit_relaystate: "enable"
          name: "default_name_16"
          reauth: "enable"
          scim_client: "<your_own_value> (source user.scim.name)"
          single_logout_url: "<your_own_value>"
          single_sign_on_url: "<your_own_value>"
          user_claim_type: "email"
          user_name: "<your_own_value>"

返回值

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

描述

build

string

fortigate 映像的构建号

返回: 始终

示例: "1547"

http_method

string

将内容配置到 FortiGate 中使用的最后一种方法

返回: 始终

示例: "PUT"

http_status

string

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

返回: 始终

示例: "200"

mkey

string

上次调用 FortiGate 时使用的主键 (id)

返回: 成功

示例: "id"

name

string

用于完成请求的表名称

返回: 始终

示例: "urlfilter"

path

string

用于完成请求的表的路径

返回: 始终

示例: "webfilter"

revision

string

内部修订号

返回: 始终

示例: "17.0.2.10658"

serial

string

设备的序列号

返回: 始终

示例: "FGVMEVYYQT3AB5352"

status

string

操作结果的指示

返回: 始终

示例: "success"

vdom

string

使用的虚拟域

返回: 始终

示例: "root"

版本

string

FortiGate 的版本

返回: 始终

示例: "v5.6.3"

作者

  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Hongbin Lu (@fgtdev-hblu)

  • Frank Shen (@frankshen01)

  • Miguel Angel Munoz (@mamunozgonzalez)

  • Nicolas Thomas (@thomnico)