cisco.ise.trusted_certificate 模块 – 受信任证书的资源模块

注意

此模块是 cisco.ise 集合(版本 2.9.6)的一部分。

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

要安装它,请使用:ansible-galaxy collection install cisco.ise。您需要满足其他要求才能使用此模块,请参阅 要求 以了解详细信息。

要在 playbook 中使用它,请指定:cisco.ise.trusted_certificate

cisco.ise 1.0.0 中的新增功能

概要

  • 管理资源受信任证书的更新和删除操作。

  • 此 API 基于给定的 ID 从受信任证书存储中删除受信任证书。

  • 更新 Cisco ISE 信任存储中存在的受信任证书。

注意

此模块具有相应的 操作插件

要求

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

  • ciscoisesdk >= 2.2.3

  • python >= 3.5

参数

参数

注释

authenticateBeforeCRLReceived

布尔值

如果未收到 CRL,则切换以启用或禁用 CRL 验证。

选择

  • false

  • true

automaticCRLUpdate

布尔值

切换以启用或禁用自动 CRL 更新。

选择

  • false

  • true

automaticCRLUpdatePeriod

整数

自动 CRL 更新周期。

automaticCRLUpdateUnits

字符串

自动 CRL 更新的时间单位。

crlDistributionUrl

字符串

CRL 分发 URL。

crlDownloadFailureRetries

整数

如果 CRL 下载失败,则重试前的等待时间。

crlDownloadFailureRetriesUnits

字符串

如果 CRL 下载失败,则重试前的时间单位。

description

字符串

信任证书的描述。

downloadCRL

布尔值

切换以启用或禁用 CRL 下载。

选择

  • false

  • true

enableOCSPValidation

布尔值

切换以启用或禁用 OCSP 验证。

选择

  • false

  • true

enableServerIdentityCheck

布尔值

切换以启用或禁用 HTTPS 或 LDAP 服务器证书名称是否符合配置的服务器 URL 的验证。

选择

  • false

  • true

id

字符串

Id 路径参数。信任证书的 ID。

ignoreCRLExpiration

布尔值

切换以启用或禁用忽略 CRL 过期。

选择

  • false

  • true

ise_debug

布尔值

用于 Identity Services Engine SDK 启用调试的标志。

选择

  • false ← (默认)

  • true

ise_hostname

字符串 / 必需

Identity Services Engine 主机名。

ise_password

字符串 / 必需

用于身份验证的 Identity Services Engine 密码。

ise_single_request_timeout

整数

在 cisco.ise 3.0.0 中添加

RESTful HTTP 请求的超时时间(以秒为单位)。

默认: 60

ise_username

字符串 / 必需

用于身份验证的 Identity Services Engine 用户名。

ise_uses_api_gateway

布尔值

在 cisco.ise 1.1.0 中添加

一个标志,用于通知 SDK 是否使用 Identity Services Engine 的 API 网关发送请求。

如果为 true,则使用 ISE 的 API 网关并将请求发送到 https://{{ise_hostname}}。

如果为 false,则将请求发送到 https://{{ise_hostname}}:{{port}},其中端口值取决于所使用的服务(ERS、Mnt、UI、PxGrid)。

选择

  • false

  • true ← (默认)

ise_uses_csrf_token

布尔值

在 cisco.ise 3.0.0 中添加

一个标志,用于通知 SDK 是否将 CSRF 令牌发送到 ISE 的 ERS API。

如果为 True,则 SDK 假定您的 ISE CSRF 检查已启用。

如果为 True,则假定您需要 SDK 为您自动管理 CSRF 令牌。

选择

  • false ← (默认)

  • true

ise_verify

布尔值

一个标志,用于启用或禁用 SSL 证书验证。

选择

  • false

  • true ← (默认)

ise_version

字符串

通知 SDK 要使用的 Identity Services Engine 的版本。

默认: "3.1_Patch_1"

ise_wait_on_rate_limit

布尔值

用于 Identity Services Engine SDK 启用自动速率限制处理的标志。

选择

  • false

  • true ← (默认)

name

字符串

证书的友好名称。

nonAutomaticCRLUpdatePeriod

整数

非自动 CRL 更新周期。

nonAutomaticCRLUpdateUnits

字符串

非自动 CRL 更新的时间单位。

rejectIfNoStatusFromOCSP

布尔值

切换以在没有来自 OCSP 的状态时拒绝证书。

选择

  • false

  • true

rejectIfUnreachableFromOCSP

布尔值

切换以在无法从 OCSP 访问时拒绝证书。

选择

  • false

  • true

selectedOCSPService

字符串

所选 OCSP 服务的名称。

status

字符串

受信任证书的状态。

trustForCertificateBasedAdminAuth

布尔值

信任基于证书的管理身份验证。

选择

  • false

  • true

trustForCiscoServicesAuth

布尔值

信任 Cisco 服务的身份验证。

选择

  • false

  • true

trustForClientAuth

布尔值

信任客户端身份验证和 Syslog。

选择

  • false

  • true

trustForIseAuth

布尔值

信任 Cisco ISE 中的身份验证。

选择

  • false

  • true

备注

注意

  • 使用的 SDK 方法是 certificates.Certificates.delete_trusted_certificate_by_id、certificates.Certificates.update_trusted_certificate,

  • 使用的路径是 delete /api/v1/certs/trusted-certificate/{id},put /api/v1/certs/trusted-certificate/{id},

  • 不支持 check_mode

  • 该插件在控制节点上运行,不使用任何 Ansible 连接插件,而是使用 Cisco ISE SDK 中嵌入的连接管理器。

  • 以 ise_ 开头的参数由 Cisco ISE Python SDK 用于建立连接。

另请参阅

另请参阅

Cisco ISE 证书文档

证书 API 的完整参考。

示例

- name: Update by id
  cisco.ise.trusted_certificate:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    authenticateBeforeCRLReceived: true
    automaticCRLUpdate: true
    automaticCRLUpdatePeriod: 0
    automaticCRLUpdateUnits: string
    crlDistributionUrl: string
    crlDownloadFailureRetries: 0
    crlDownloadFailureRetriesUnits: string
    description: string
    downloadCRL: true
    enableOCSPValidation: true
    enableServerIdentityCheck: true
    id: string
    ignoreCRLExpiration: true
    name: string
    nonAutomaticCRLUpdatePeriod: 0
    nonAutomaticCRLUpdateUnits: string
    rejectIfNoStatusFromOCSP: true
    rejectIfUnreachableFromOCSP: true
    selectedOCSPService: string
    status: string
    trustForCertificateBasedAdminAuth: true
    trustForCiscoServicesAuth: true
    trustForClientAuth: true
    trustForIseAuth: true

- name: Delete by id
  cisco.ise.trusted_certificate:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: absent
    id: string

返回值

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

描述

ise_response

字典

一个字典或列表,包含 Cisco ISE Python SDK 返回的响应。

返回: 总是

示例: {"authenticateBeforeCRLReceived": "string", "automaticCRLUpdate": "string", "automaticCRLUpdatePeriod": "string", "automaticCRLUpdateUnits": "string", "crlDistributionUrl": "string", "crlDownloadFailureRetries": "string", "crlDownloadFailureRetriesUnits": "string", "description": "string", "downloadCRL": "string", "enableOCSPValidation": "string", "enableServerIdentityCheck": "string", "expirationDate": "string", "friendlyName": "string", "id": "string", "ignoreCRLExpiration": "string", "internalCA": true, "isReferredInPolicy": true, "issuedBy": "string", "issuedTo": "string", "keySize": "string", "link": {"href": "string", "rel": "string", "type": "string"}, "nonAutomaticCRLUpdatePeriod": "string", "nonAutomaticCRLUpdateUnits": "string", "rejectIfNoStatusFromOCSP": "string", "rejectIfUnreachableFromOCSP": "string", "selectedOCSPService": "string", "serialNumberDecimalFormat": "string", "sha256Fingerprint": "string", "signatureAlgorithm": "string", "status": "string", "subject": "string", "trustedFor": "string", "validFrom": "string"}

ise_update_response

字典

在 cisco.ise 1.1.0 中添加

一个字典或列表,包含 Cisco ISE Python SDK 返回的响应。

返回: 总是

示例: {"response": {"id": "string", "link": {"href": "string", "rel": "string", "type": "string"}, "message": "string"}, "version": "string"}

作者

  • Rafael Campos (@racampos)