有关 API 密钥管理的问题:警告、配置、安全性和使用
15710
Created On 12/10/24 10:34 AM - Last Modified 01/25/25 03:55 AM
Question
- Is the warning "
The latest API KeyGen was executed on Mon Jan 01 00:00:00 2024 with the deprecated algorithm" a bug and can we safely ignore it? - 如果我们需要配置API 密钥证书,我们应该在 Panorama 的 On-Prem Strata 防火墙或/和每个 Strata 防火墙上进行配置吗?
- 使用贬值算法的 API 密钥是否存在安全问题?
- Panorama 是否使用 API 密钥与防火墙通信?
- 如何检查我们当前是否正在使用 API?
Environment
- PA 系列下一代防火墙
- PAN OS 11.1
Answer
- 这是 PAN-OS 11.1.0 中引入的新功能。如果未配置 API 密钥证书,则 11.1 中将支持旧版 API 密钥。它将在 12.0/12.1 中被弃用,并在 13.0 中完全禁用。
您暂时可以忽略此警告,但建议尽快配置更安全的 API 密钥基础设施,以避免未来版本中出现潜在问题。 -
您需要为所有设备配置API 密钥证书。对于由 Panorama 管理的设备,您可以使用设备模板执行此操作。
即使您仅为 Panorama 生成 API 密钥证书,防火墙上仍会持续显示警告:
Panorama 的提交:
防火墙提交:
- 现有的 API Key 包含设备主密钥加密的用户名和密码。
这存在密钥被误用并泄露用户凭证的潜在风险。 -
默认下,Panorama 不使用 API 密钥与防火墙通信。它主要使用管理连接。但是,如果 Panorama 向特定防火墙发出 API 查询,则 Panorama 可以使用 API 密钥。
- Below are some of the ways to check:
- 检查管理员帐户设置。超级用户和 Panorama/设备管理员等动态角色具有 API 访问权限。如果您使用的是基于角色的管理员类型,则可以检查管理员角色的 API 访问权限。如果您没有任何具有 API 权限的管理员帐户,则您没有使用 API。
- Check the API metrics logs by executing the below commands on Panorama and Firewalls, if it returns an empty reply, it indicates that API is not used:
less webserver-log restapi_metrics.logless webserver-log api_metrics.log - Execute the below commands to check for API keys usage:
On Panorama, run the command "show api key expiration". If it returns an empty reply, this means no API keys are actively in use.
On Firewalls, run the command "show api-key-expiration-ts". Similarly, if it returns an empty reply, it indicates that no API keys are actively in use.