收集 Okta 用户上下文日志
本文档介绍了如何通过使用第三方 API 设置 Google Security Operations Feed 来收集 Okta 用户上下文日志。
准备工作
确保您满足以下前提条件:
- Google SecOps 实例
- 对 Okta 租户或管理控制台的特权访问权限
- Okta 中的 API 令牌创建权限
配置 IP 许可名单
在创建 Feed 之前,您必须在 Okta 防火墙或网络设置中将 Google SecOps IP 范围列入许可名单。
获取 Google SecOps IP 范围
- 从 Google IP 地址范围 JSON 文件中提取 IP 范围。
向 Okta 用户上下文添加 IP 范围
- 登录 Okta 管理控制台。
- 依次前往安全性 > 网络。
- 在 IP 地址限制下,点击修改。
- 以 CIDR 表示法将每个 Google SecOps IP 范围添加到受信任的 IP 地址。
- 点击保存。
配置 Okta User Context API 访问权限
如需让 Google SecOps 拉取用户上下文数据,您需要创建具有读取权限的 API 令牌。
创建 API 令牌
- 登录 Okta 管理控制台。
- 依次前往安全性 > API。
- 选择令牌标签页。
- 点击 Create Token。
- 提供以下配置详细信息:
- 名称:输入一个描述性名称(例如
Google SecOps Integration)。 - 说明(可选):输入说明。
- 名称:输入一个描述性名称(例如
- 点击 Create Token。
记录 API 凭据
创建 API 令牌后,您将收到以下凭据:
- API 令牌:您的 API 令牌值(例如
00QCGr-1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1)
所需 API 权限
API 令牌需要在 Okta 中具备以下权限:
| 权限/角色 | 访问权限级别 | 用途 |
|---|---|---|
| 只读管理员 | 读取 | 访问用户个人资料数据 |
| 超级用户 | 读取 | 对所有用户数据的完全访问权限 |
设置 Feed
如需配置 Feed,请按以下步骤操作:
- 依次前往 SIEM 设置> Feed。
- 点击添加新 Feed。
- 在下一页上,点击配置单个 Feed。
- 在 Feed 名称字段中,输入 Feed 的名称(例如
Okta User Context)。 - 选择第三方 API 作为来源类型。
- 选择 Okta 用户上下文作为日志类型。
- 点击下一步。
为以下输入参数指定值:
身份验证 HTTP 标头:以以下格式输入身份验证凭据:
Authorization:SSWS your-api-token- 例如:
Authorization:SSWS 00QCGr-1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1。
- 例如:
API 主机名:Okta 实例的完全限定域名(例如 example.okta.com,而不是可能配置的任何自定义网域)。
- 例如:
company.okta.com。
- 例如:
经理 ID 参考字段:使用非 Okta ID 来引用经理时所需的 ID(可选)。
资产命名空间:资产命名空间。
注入标签:要应用于此 Feed 中事件的标签。
点击下一步。
在最终确定界面中查看新的 Feed 配置,然后点击提交。
设置完成后,Feed 会开始按时间顺序从 Okta 用户上下文实例中检索日志。
区域端点
Okta 会根据您组织的区域使用不同的 API 端点:
| 区域 | 基本网址 / 主机名 |
|---|---|
| 美国(默认) | {org-name}.okta.com |
| 欧盟(欧洲、中东和非洲地区) | {org-name}.okta-emea.com |
| 亚太地区 | {org-name}.okta.com.au |
| 预览版(测试版) | {org-name}.oktapreview.com |
使用与您的 Okta 实例区域对应的主机名。
API 速率限制
Okta API 具有以下速率限制:
- 默认速率限制:对于大多数端点,每分钟 600 个请求
- 系统日志 API:每分钟 60 次请求
- 用户端点:每分钟 600 个请求
Google SecOps 会自动处理指数退避算法速率限制。如果您遇到问题,请与 Okta 支持团队联系,以提高 API 限额。
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
activated |
event.idm.entity.entity.labels |
如果存在 activated,则将其值添加为键为“activated”的键值对。 |
created |
event.idm.entity.entity.labels |
如果 created 存在,则将其值添加为键为“created”的键值对。 |
profile.costCenter |
event.idm.entity.entity.labels |
如果存在 profile.costCenter,则其值会作为键值对添加到键“costCenter”中。 |
profile.Function |
event.idm.entity.entity.labels |
如果 profile.Function 存在,则将其值添加为键为“Function”的键值对。 |
statusChanged |
event.idm.entity.entity.labels |
如果 statusChanged 存在,则将其值作为键值对添加到键“statusChanged”中。 |
type.id |
event.idm.entity.entity.labels |
如果 type.id 存在,则将其值作为键值对添加到键“type_id”中。 |
profile.location |
event.idm.entity.entity.location.name |
从 profile.location 中获取的值。 |
profile.AD_ObjectGUID |
event.idm.entity.entity.user.attribute.labels |
如果 profile.AD_ObjectGUID 存在,则将其值添加为键为“AD_ObjectGUID”的键值对。 |
profile.ADpwdLastSet |
event.idm.entity.entity.user.attribute.labels |
如果 profile.ADpwdLastSet 存在,则将其值添加为键为“ADpwdLastSet”的键值对。 |
profile.AFF_Code |
event.idm.entity.entity.user.attribute.labels |
如果存在 profile.AFF_Code,则将其值作为键值对添加到键“AFF_Code”中。 |
profile.Desk_Location_WD |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Desk_Location_WD 存在,则将其值添加为键为“Desk_Location_WD”的键值对。 |
profile.Mailing_Address_WD |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Mailing_Address_WD 存在,则将其值添加为键为“Mailing_Address_WD”的键值对。 |
profile.Manager_UPN |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Manager_UPN 存在,则将其值作为键值对添加到键“Manager_UPN”中。 |
profile.PRIVATE_CONF_Profile |
event.idm.entity.entity.user.attribute.labels |
如果 profile.PRIVATE_CONF_Profile 存在,则将其值作为键值对添加到键“PRIVATE_CONF_Profile”中。 |
profile.Region_WD |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Region_WD 存在,则将其值添加为键为“Region_WD”的键值对。 |
profile.Subsidiary_Company |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Subsidiary_Company 存在,则将其值作为键值对添加到键“Subsidiary_Company”中。 |
profile.Telephone_Work |
event.idm.entity.entity.user.attribute.labels |
如果存在 profile.Telephone_Work,则将其值作为键值对添加到键“Telephone_Work”中。 |
profile.Temp_WD_Primary_Email |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Temp_WD_Primary_Email 存在,则将其值作为键值对添加到键“Temp_WD_Primary_Email”中。 |
profile.VMware_WS1_Username |
event.idm.entity.entity.user.attribute.labels |
如果 profile.VMware_WS1_Username 存在,则将其值作为键值对添加到键“VMware_WS1_Username”中。 |
profile.Work_Street_Address_WD |
event.idm.entity.entity.user.attribute.labels |
如果存在 profile.Work_Street_Address_WD,则将其值添加为键为“Work_Street_Address_WD”的键值对。 |
profile.Workato_WD_Primary_Email |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Workato_WD_Primary_Email 存在,则将其值添加为键为“Workato_WD_Primary_Email”的键值对。 |
profile.Workday_ID |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Workday_ID 存在,则将其值作为键值对添加到键“Workday_ID”中。 |
profile.Worker_Type_WD |
event.idm.entity.entity.user.attribute.labels |
如果 profile.Worker_Type_WD 存在,则将其值添加为键为“Worker_Type_WD”的键值对。 |
profile.businessUnit |
event.idm.entity.entity.user.attribute.labels |
如果 profile.businessUnit 存在,则将其值作为键值对添加到键“businessUnit”中。 |
profile.companyName |
event.idm.entity.entity.user.attribute.labels |
如果 profile.companyName 存在,则将其值作为键值对添加到键“companyName”中。 |
profile.contingentSupplierName |
event.idm.entity.entity.user.attribute.labels |
如果存在 profile.contingentSupplierName,则将其值作为键值对添加到键“contingentSupplierName”中。 |
profile.conversationId |
event.idm.entity.entity.user.attribute.labels |
如果存在 profile.conversationId,则将其值作为键值对添加到键“conversationId”中。 |
profile.distinguishedName |
event.idm.entity.entity.user.attribute.labels |
如果 profile.distinguishedName 存在,则将其值添加为键为“distinguishedName”的键值对。 |
profile.division |
event.idm.entity.entity.user.attribute.labels |
如果存在 profile.division,则将其值添加为键为“division”的键值对。 |
profile.emailPrefix |
event.idm.entity.entity.user.attribute.labels |
如果 profile.emailPrefix 存在,则将其值添加为键为“emailPrefix”的键值对。 |
profile.employeeType |
event.idm.entity.entity.user.attribute.labels |
如果 profile.employeeType 存在,则将其值添加为键为“employeeType”的键值对。 |
profile.homePostalAddress |
event.idm.entity.entity.user.attribute.labels |
如果 profile.homePostalAddress 存在,则将其值作为键值对添加到键“homePostalAddress”中。 |
profile.isManager |
event.idm.entity.entity.user.attribute.labels |
如果 profile.isManager 存在,则将其值添加为键为“isManager”的键值对。 |
lastLogin |
event.idm.entity.entity.user.attribute.labels |
如果 lastLogin 存在,则将其值作为键值对添加到键“lastLogin”中。 |
profile.leaveOfAbsence |
event.idm.entity.entity.user.attribute.labels |
如果 profile.leaveOfAbsence 存在,则将其值作为键值对添加到键“leaveOfAbsence”中。 |
profile.managerDn |
event.idm.entity.entity.user.attribute.labels |
如果存在 profile.managerDn,则将其值作为键值对添加到键“managerDn”中。 |
profile.payGroup |
event.idm.entity.entity.user.attribute.labels |
如果存在 profile.payGroup,则将其值作为键值对添加到键“payGroup”中。 |
profile.wdemployeeID |
event.idm.entity.entity.user.attribute.labels |
如果 profile.wdemployeeID 存在,则将其值添加为键为“wdemployeeID”的键值对。 |
profile.zipCode |
event.idm.entity.entity.user.attribute.labels |
如果 profile.zipCode 存在,则将其值作为键值对添加到键“zipCode”中。 |
profile.userType |
event.idm.entity.entity.user.attribute.roles |
如果 profile.userType 存在,则其值会添加到角色数组中。 |
profile.organization,profile.company |
event.idm.entity.entity.user.company_name |
从 profile.organization 中获取的值,如果前者不存在,则为 profile.company。 |
profile.department |
event.idm.entity.entity.user.department |
从 profile.department 中获取的值。 |
profile.email、profile.secondEmail、profile.login |
event.idm.entity.entity.user.email_addresses |
profile.email、profile.secondEmail 和 profile.login 中的值(如果 profile.login 是电子邮件地址且不是重复值)会合并到此字段中。 |
profile.employeeNumber |
event.idm.entity.entity.user.employee_id |
从 profile.employeeNumber 中获取的值。 |
profile.firstName,profile.Preferred_First_Name |
event.idm.entity.entity.user.first_name |
从 profile.firstName 中获取的值,如果前者不存在,则为 profile.Preferred_First_Name。 |
profile.EmployeeWorkGroup |
event.idm.entity.entity.user.group_identifiers |
从 profile.EmployeeWorkGroup 中获取的值。 |
profile.HireDate,profile.hiredate |
event.idm.entity.entity.user.hire_date |
如果 profile.HireDate 不存在,则从 profile.hiredate 解析值。 |
profile.lastName,profile.preferred_Last_Name |
event.idm.entity.entity.user.last_name |
如果 profile.lastName 或 profile.preferred_Last_Name 存在,则取自 profile.lastName 的值。 |
lastLogin |
event.idm.entity.entity.user.last_login_time |
值是从 lastLogin 解析的。 |
passwordChanged |
event.idm.entity.entity.user.last_password_change_time |
值是从 passwordChanged 解析的。 |
profile.manager、profile.managerEmail、profile.managerId |
event.idm.entity.entity.user.managers |
填充了一个对象,其中包含 profile.manager 中的 user_display_name、profile.managerEmail 中的 email_addresses 和 profile.managerId 中的 employee_id。 |
profile.city,profile.firstBaseCity |
event.idm.entity.entity.user.office_address.city |
从 profile.city 中获取的值,如果前者不存在,则为 profile.firstBaseCity。 |
profile.countryCode,profile.country |
event.idm.entity.entity.user.office_address.country_or_region |
从 profile.countryCode 中获取的值,如果前者不存在,则为 profile.country。 |
profile.streetAddress |
event.idm.entity.entity.user.personal_address.name |
从 profile.streetAddress 中获取的值。 |
profile.state |
event.idm.entity.entity.user.personal_address.state |
从 profile.state 中获取的值。 |
profile.primaryPhone、profile.mobilePhone、profile.mobile |
event.idm.entity.entity.user.phone_numbers |
profile.primaryPhone、profile.mobilePhone 和 profile.mobile 中的值会合并到此字段中。 |
profile.terminationDate,profile.terminationdate |
event.idm.entity.entity.user.termination_date |
如果 profile.terminationDate 不存在,则从 profile.terminationdate 解析值。 |
profile.title |
event.idm.entity.entity.user.title |
从 profile.title 中获取的值。 |
status |
event.idm.entity.entity.user.user_authentication_status |
从 status 映射:ACTIVE/RECOVERY/LOCKED_OUT/PASSWORD_EXPIRED -> ACTIVE;SUSPENDED -> SUSPENDED;DEPROVISIONED -> DELETED;否则为 UNKNOWN_AUTHENTICATION_STATUS。 |
profile.displayName |
event.idm.entity.entity.user.user_display_name |
从 profile.displayName 中获取的值。 |
profile.samAccountName、profile.samaccountname、profile.login、profile.ldapUid |
event.idm.entity.entity.user.userid |
按以下优先级填充:profile.samAccountName、profile.samaccountname、profile.login(如果不是电子邮件地址)、profile.ldapUid(如果 profile.login 不是电子邮件地址)。 |
event.idm.entity.metadata.entity_type |
设置为 USER。 |
|
id |
event.idm.entity.metadata.product_entity_id |
从 id 中获取的值。 |
event.idm.entity.metadata.product_name |
设置为 Identity Cloud。 |
|
event.idm.entity.metadata.vendor_name |
设置为 Okta。 |
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。