Amazon Security Lake - AWS AppFabric

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

Amazon Security Lake

Amazon Security Lake 会自动将来自 AWS 环境、软件即服务 (SaaS) 提供商、本地和云源的安全数据集中到存储在您的专用的数据湖中。 AWS 账户借助 Security Lake,您可以更全面地了解整个组织的安全数据。Security Lake 采用了开放网络安全架构框架 (OCSF),这是一种开源安全事件架构。借助 OCSF 的支持,该服务可以标准化 AWS 并合并来自各种企业安全数据源的安全数据。

AppFabric 审计日志提取注意事项

通过向安全湖添加自定义来源,您可以将 SaaS 审计日志存入您 AWS 账户 的 Amazon 安全湖。以下各节描述了与 Security Lake 配合使用的 AppFabric输出架构、输出格式和输出目的地。

架构和格式

Security Lake 支持以下 AppFabric 输出架构和格式:

  • OCSF - JSON

    • AppFabric 使用开放网络安全架构框架 (OCSF) 对数据进行标准化并以 JSON 格式输出数据。

输出位置

Security Lake 支持 AppFabric 使用亚马逊数据 Firehose 传输流作为 AppFabric 提取输出位置作为自定义来源。要配置 AWS Glue 表和 Firehose 交付流,以及在 Security Lake 中设置自定义来源,请使用以下步骤。

创建 AWS Glue 表

  1. 导航到 Amazon Simple Storage Service(Amazon S3),用您选择的名称创建存储桶。

  2. 导航到 AWS Glue 控制台。

  3. 对于数据目录,转到部分,然后选择添加表

  4. 为表输入您选择的名称。

  5. 请选择您在第 1 步中创建的 Amazon S3 存储桶。

  6. 对于数据格式,选择 JSON,然后选择下一步

  7. 选择或定义架构页面上,选择将架构编辑为 JSON

  8. 输入以下架构,然后完成 AWS Glue 表创建过程。

    [ { "Name": "activity_id", "Type": "string", "Comment": "" }, { "Name": "activity_name", "Type": "string", "Comment": "" }, { "Name": "actor", "Type": "struct<session:struct<created_time:bigint,uid:string,issuer:string>,user:struct<uid:string,email_addr:string,credential_uid:string,name:string,type:string>>", "Comment": "" }, { "Name": "user", "Type": "struct<uid:string,email_addr:string,credential_uid:string,name:string,type:string>", "Comment": "" }, { "Name": "group", "Type": "struct<uid:string,desc:string,name:string,type:string,privileges:array<string>>", "Comment": "" }, { "Name": "privileges", "Type": "array<string>", "Comment": "" }, { "Name": "web_resources", "Type": "array<struct<type:string,uid:string,name:string,data:struct<current_value:string,previous_value:string>>>" }, { "Name": "http_request", "Type": "struct<http_method:string,user_agent:string,url:string>", "Comment": "" }, { "Name": "auth_protocol", "Type": "string", "Comment": "" }, { "Name": "auth_protocol_id", "Type": "int", "Comment": "" }, { "Name": "category_name", "Type": "string", "Comment": "" }, { "Name": "category_uid", "Type": "string", "Comment": "" }, { "Name": "class_name", "Type": "string", "Comment": "" }, { "Name": "class_uid", "Type": "string", "Comment": "" }, { "Name": "is_mfa", "Type": "boolean", "Comment": "" }, { "Name": "raw_data", "Type": "string", "Comment": "" }, { "Name": "severity", "Type": "string", "Comment": "" }, { "Name": "severity_id", "Type": "int", "Comment": "" }, { "Name": "status", "Type": "string", "Comment": "" }, { "Name": "status_detail", "Type": "string", "Comment": "" }, { "Name": "status_id", "Type": "int", "Comment": "" }, { "Name": "time", "Type": "bigint", "Comment": "" }, { "Name": "type_name", "Type": "string", "Comment": "" }, { "Name": "type_uid", "Type": "string", "Comment": "" }, { "Name": "description", "Type": "string", "Comment": "" }, { "Name": "metadata", "Type": "struct<product:struct<uid:string,vendor_name:string,name:string>,processed_time:string,version:string,uid:string,event_code:string>" }, { "Name": "device", "Type": "struct<uid:string,hostname:string,ip:string,name:string,region:string,type:string,os:struct<name:string,type:string,version:string>,location:struct<coordinates:array<float>,city:string,state:string,country:string,postal_code:string,continent:string,desc:string>>" }, { "Name": "unmapped", "Type": "map<string,string>" } ]

在 Security Lake 中创建自定义来源

  1. 导航到 Amazon Security Lake 控制台。

  2. 在导航窗格中选择自定义来源

  3. 选择 创建自定义源

  4. 为自定义源输入名称,然后选择适用的 OCSF 事件类别。

    注意

    AppFabric 使用帐户更改身份验证用户访问管理组管理Web 资源活动Web 资源访问活动事件类。

  5. 对于 AWS 账户 ID外部 ID,请输入您的 AWS 账户 ID。然后选择 Create

  6. 保存自定义源的 Amazon S3 位置。您将使用它来设置 Amazon Data Firehose 传送流。

在 Firehose 中创建传送流

  1. 导航到亚马逊 Data Firehose 控制台。

  2. 选择 创建传输流

  3. 对于来源,选择直接 PUT

  4. 对于 目标,选择 S3

  5. 转换记录部分,选择启用记录格式转换,然后选择 Apache Parquet 作为输出格式。

  6. 对于AWS Glue 表,请选择您在上一个过程中创建的 AWS Glue 表,然后选择最新版本。

  7. 对于目标设置,请选择您使用 Security Lake 自定义源创建的 Amazon S3 存储桶。

  8. 对于动态分区,请选择启用

  9. 要进行 JSON 的内联解析,请选择启用

    • 对于 Keyname,输入 eventDayValue

    • 对于 JQ 表达式,输入 (.time/1000)|strftime("%Y%m%d")

  10. 对于 S3 存储桶前缀,输入以下值。

    ext/AppFabric/region=<region>/accountId=<account_id>/eventDay=!{partitionKeyFromQuery:eventDayValue}/

    <region><account_id>用您的和 AWS 账户 ID 替换 AWS 区域 和。

  11. 对于 S3 存储桶错误输出前缀,请输入以下值。

    ext/AppFabric/error/
  12. 对于重试持续时间,请选择 300

  13. 对于缓冲区大小,请选择 128 MiB

  14. 对于缓冲区间隔,请选择 60 秒

  15. 完成 Firehose 交付流的创建过程。

创建 AppFabric 摄取

要将数据发送到 Amazon Security Lake,您必须在 AppFabric控制台中创建一个提取,使用您之前创建的 Firehose 传输流作为输出位置。有关将 AppFabric 提取配置为使用 Firehose 作为输出位置的更多信息,请参阅创建输出位置。