netapp_eseries.santricity.na_santricity_ldap 模块 – NetApp E 系列管理 LDAP 集成用于身份验证

注意

此模块是 netapp_eseries.santricity 集合 (版本 1.4.1) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install netapp_eseries.santricity

要在剧本中使用它,请指定: netapp_eseries.santricity.na_santricity_ldap

概要

  • 配置 E 系列系统以允许通过 LDAP 服务器进行身份验证

参数

参数

注释

api_password

字符串 / 必需

用于验证 SANtricity Web Services Proxy 或嵌入式 Web Services API 的密码。

api_url

字符串 / 必需

SANtricity Web Services Proxy 或嵌入式 Web Services API 的 URL。

示例 https://prod-1.wahoo.acme.com:8443/devmgr/v2

api_username

字符串 / 必需

用于验证 SANtricity Web Services Proxy 或嵌入式 Web Services API 的用户名。

bind_password

字符串

这是绑定用户帐户的密码。

当指定 bind_user 时必需。

bind_user

字符串

这是将用于查询 LDAP 服务器的用户帐户。

当指定 bind_password 时必需。

示例:CN=MyBindAcct,OU=ServiceAccounts,DC=example,DC=com

group_attributes

列表 / 元素=字符串

应考虑用于组到角色映射的用户属性。

通常,这与诸如“memberOf”之类的内容一起使用,并且用户的访问权限将根据组成员资格或缺乏组成员资格进行测试。

默认值: ["memberOf"]

identifier

字符串

这是配置的唯一标识符(对于配置了多个域的情况)。

默认值: "default"

names

列表 / 元素=字符串

身份验证时将用于标识要使用哪个域的域名。

默认为使用服务器的 DNS 名称。

唯一的要求是名称可以解析。

示例:user@example.com

role_mappings

字典

在这里,您可以指定哪些组应该对存储系统具有什么权限。

例如,组 A 中的所有用户都将被分配所有 4 个可用角色,这将允许访问系统的全部管理功能(超级用户)。组 B 中的用户只有 storage.monitor 角色,这将只允许只读访问。

这被指定为正则表达式到角色列表的映射。请参阅示例。

将分配给与提供的正则表达式匹配的组/组的角色。

storage.admin 允许用户完全读写访问存储对象和操作。

storage.monitor 允许用户只读访问存储对象和操作。

support.admin 允许用户访问硬件、诊断信息、主要事件日志和其他关键的支持相关功能,但不包括存储配置。

security.admin 允许用户访问身份验证/授权配置,以及审计日志配置和证书管理。

search_base

字符串

搜索基用于查找用户的组成员身份。

示例:ou=users,dc=example,dc=com

server_url

字符串

这是 LDAP 服务器 URL。

连接字符串应指定为使用 ldap 或 ldaps 协议以及端口信息。

ssid

字符串

要管理的阵列的 ID。此值对于每个阵列必须唯一。

默认值: "1"

state

字符串

state==”present” 时,将向存储系统添加已定义的 LDAP 域。

state==”absent” 时,将从存储系统中删除指定的域。

state==”disabled” 将导致删除存储系统上所有现有的 LDAP 域。

选项

  • "present" ← (默认)

  • "absent"

  • "disabled"

user_attribute

字符串

这是当用户尝试进行身份验证时,我们将用来匹配提供的用户名的属性。

默认值: "sAMAccountName"

validate_certs

布尔值

是否应验证 https 证书?

选项

  • false

  • true ← (默认)

备注

注意

  • 支持检查模式

  • 此模块允许您定义一个或多个 LDAP 域,这些域由唯一的标识符标识,用于身份验证。授权由角色映射决定,这意味着不同的用户组可以对系统的某些方面和 API 拥有不同的(或没有)访问权限。

  • 如果 LDAP 服务器不可用/无法访问,本地用户帐户仍然可用。

  • 通常,您需要获取组织的 LDAP 服务器的详细信息,然后才能配置系统以使用 LDAP 身份验证;每个实现都可能大相径庭。

  • 此 API 当前仅支持嵌入式 Web 服务 API v2.0 及更高版本,或 Web 服务代理 v3.0 及更高版本。

  • E 系列 Ansible 模块需要 Web 服务代理 (WSP) 实例可用以管理存储系统,或者支持嵌入式 Web 服务 API 的 E 系列存储系统。

  • 嵌入式 Web 服务目前可在 E2800、E5700、EF570 和更新的硬件型号上使用。

  • netapp_eseries.santricity.netapp_e_storage_system 可用于配置由 WSP 实例管理的系统。

示例

- name: Disable LDAP authentication
  na_santricity_ldap:
    ssid: "1"
    api_url: "https://192.168.1.100:8443/devmgr/v2"
    api_username: "admin"
    api_password: "adminpass"
    validate_certs: true
    state: absent

- name: Remove the "default" LDAP domain configuration
  na_santricity_ldap:
    ssid: "1"
    api_url: "https://192.168.1.100:8443/devmgr/v2"
    api_username: "admin"
    api_password: "adminpass"
    validate_certs: true
    state: absent
    identifier: default

- name: Define a new LDAP domain, utilizing defaults where possible
  na_santricity_ldap:
    ssid: "1"
    api_url: "https://192.168.1.100:8443/devmgr/v2"
    api_username: "admin"
    api_password: "adminpass"
    validate_certs: true
    state: enabled
    bind_username: "CN=MyBindAccount,OU=ServiceAccounts,DC=example,DC=com"
    bind_password: "mySecretPass"
    server: "ldap://example.com:389"
    search_base: "OU=Users,DC=example,DC=com"
    role_mappings:
      ".*dist-dev-storage.*":
        - storage.admin
        - security.admin
        - support.admin
        - storage.monitor

返回值

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

描述

msg

字符串

成功消息

返回:成功时

示例:"The ldap settings have been updated."

作者

  • Michael Price (@lmprice)

  • Nathan Swartz (@swartzn)

  • Vu Tran (@VuTran007)