Share Feedback to help us keep improving.
10.5. 事件流的静态通用识别符(UUID)
您可以使用静态 Unique Universal Identifier (UUID)配置事件流,以确保其 Webhook URL 保持一致,即使事件流服务被重新创建。
当外部系统(如防火墙或第三方 Webhook)无法轻松重新配置以使用新 URL 时,此功能与灾难恢复场景相关。以下是考虑使用静态 UUID 时的关键概念:
- 灾难恢复支持
-
静态 UUID 确保外部 Webhook URL 遵循
https://your-eda-server.com/api/eda/v1/external_event_stream/{uuid}/,在服务重新创建时不会改变。 - uniqueness
- 您提供的 UUID 必须在系统中的所有现有事件流中唯一。
- 安全警告
- 静态 UUID 使您的 Webhook URL 可预测,因此可能会降低安全性。只有在 URL 一致性至关重要且您实施了强大的额外安全措施(如强大的身份验证和网络限制)时,才使用此功能。对于正常操作,请始终使用自动生成的(动态)UUID。
您必须确保有额外的安全措施,如强大的凭证类型(HMAC、mTLS)和网络限制。
10.5.1. 使用静态 UUID (API 方法)更新事件流 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
如果要使用静态的自定义 UUID,则必须使用 API 更新事件流。用于创建的 API 端点为 POST /api/eda/v1/event-streams/。
先决条件
- Ansible Automation Platform 2.6-next
流程
- 登录到 Ansible Automation Platform。
- 在导航面板中,选择 Overview。
在 URL 中,将 Overview 替换为 API 端点
api/eda/v1/(例如https://<platformURL>.com/api/eda/v1/)。Api V1 Root页面显示 EDA 资源 URL 列表。{ "config": "http://<aap.platform>.com/api/eda/v1/config/", "status": "http://<aap.platform>/api/eda/v1/status/", "openapi-json": "http://<aap.platform>/api/eda/v1/openapi.json", "openapi-yaml": "http://<aap.platform>/api/eda/v1/openapi.yaml", "openapi-docs": "http://<aap.platform>/api/eda/v1/docs/", "openapi-redoc": "http://<aap.platform>/api/eda/v1/redoc/", "session-login": "http://<aap.platform>/api/eda/v1/auth/session/login/", "session-logout": "http://<aap.platform>/api/eda/v1/auth/session/logout/", "token-refresh": "http://<aap.platform>/api/eda/v1/auth/token/refresh/", "current-user": "http://<aap.platform>/api/eda/v1/users/me/", "project-list": "http://<aap.platform>/api/eda/v1/projects/", "rulebook-list": "http://<aap.platform>/api/eda/v1/rulebooks/", "activation-list": "http://<aap.platform>/api/eda/v1/activations/", "activationinstance-list": "http://<aap.platform>/api/eda/v1/activation-instances/", "auditrule-list": "http://<aap.platform>/api/eda/v1/audit-rules/", "user-list": "http://<aap.platform>/api/eda/v1/users/", "controller-token-list": "http://<aap.platform>/api/eda/v1/users/me/awx-tokens/", "credentialtype-list": "http://<aap.platform>/api/eda/v1/credential-types/", "edacredential-list": "http://<aap.platform>/api/eda/v1/eda-credentials/", "credentialinputsource-list": "http://<aap.platform>/api/eda/v1/credential-input-sources/", "decisionenvironment-list": "http://<aap.platform>/api/eda/v1/decision-environments/", "organization-list": "http://<aap.platform>/api/eda/v1/organizations/", "team-list": "http://<aap.platform>/api/eda/v1/teams/", "eventstream-list": "http://<aap.platform>/api/eda/v1/event-streams/"-
在列表的末尾,单击
"eventstream-list"URL。这会进入 Event Stream List 页面。 找到并复制您要更新的事件流 UUID 的
"id"。这可以在事件流数据的末尾找到。}, "id": *1*, "owner": "admin", "url": "https://<platformURL>/eda-event-streams/api/eda/v1/external_event_stream/bab8dddd-51cc-424f-87a4-0ed8ebe0a755/post/", "created_at": "2025-11-18T16:30:45.622363Z", "modified_at": "2025-11-18T16:30:45.622374Z", "test_content_type": "", "test_content": "", "test_error_message": "", "test_headers": "", "events_received": 0, "last_event_received_at": null-
粘贴 URL 末尾的 id (例如 https://<platformURL>.com/api/eda/v1/<id""> )并按 Enter。此时会显示 Event Stream Instance 页面,包括当前的
"uuid"值。 -
在 Event Stream Instance 页面的末尾,将
"uuid"字段的值更新为您选择的唯一静态字符串。 - 点 Patch。
验证
- 确认事件流的 UUID 已更新为新的静态字符串。