审计日志

了解如何使用审计日志跟踪和分析你账户的活动。


信息 审计日志可供 企业版 用户使用。

审计日志记录账户在 Expo 应用服务(EAS)中执行的操作。记录的数据包括受影响实体的信息、对其进行的修改类型、执行操作的人员以及活动发生的时间。

🌐 Audit logs record actions made with Expo Application Services (EAS) by accounts. Recorded data includes information about the affected entities, the type of modification made to them, who performed the action, and when the activity occurred.

关键点

🌐 Key points

  • 审计日志只能创建,绝不能修改或删除,它们可作为事实来源,帮助监控事件并调试账户内发生的问题。
  • 审核日志可供企业计划客户使用。订阅后,Expo 内部使用的一些日志会立即可用,而其他类型的日志将在订阅激活后开始收集。
  • 审计日志会保存1.5年。如果账户被删除,其审计日志将在90天后被删除。
  • 要访问它们,请转到 账户设置/组织设置 > 审计日志

用例

🌐 Use cases

权限监控

🌐 Permission monitoring

审核日志可以跟踪你组织内的用户邀请和权限更改。一个示例安全事件可能包括被入侵的员工账户邀请攻击者进入组织,并将其权限更改为管理员

🌐 Audit logs can track user invitations and permission changes within your organization. An example security event could include a compromised employee account that invites an attacker into an organization and changes their permission to Admin.

在这种情况下,审计日志会记录是哪个员工账户邀请了攻击者并修改了权限。由于审计日志是不可变的,攻击者无法删除这些已记录的历史记录。其他组织成员将能够查看审计日志,以确定哪个账户被入侵,采取措施撤销攻击者的权限并保护该员工的账户安全。

🌐 In this scenario, audit logs would record which employee account invited the attacker and modified permissions. Since audit logs are immutable, the attacker would not be able to delete this recorded history. Other organization members will be able to review the audit logs to determine which account was compromised, take action to revoke the attacker's permissions and secure the employee's account.

访问历史记录

🌐 Access history

一个 Expo 组织账户可以包含许多项目,这些项目的开发访问权限由分配给各个团队的分发证书控制。当设备被授予加入这些团队的权限时,跟踪访问权限何时被授予和移除对于历史记录保存非常重要。尽管某个设备目前可能不在 Apple 团队中,但在发生内部安全事件时,查看之前谁拥有团队访问权限可能是有用的。

🌐 An Expo organization account can include many projects where development access is controlled by distribution certificates assigned to individual teams. When devices are granted to join these teams, it is important to track when access is granted and removed for historical record keeping. While a device may not currently be included in an Apple team, it may be useful to see who previously had access to the team in the event of an internal security incident.

Expo 团队设置中列出的 Apple 设备将仅显示当前注册到账户的设备,但通过创建审计日志,可以查看 Apple 团队和设备的历史修改。

🌐 The Apple devices listed within the Expo team's settings will only show devices that are currently registered to an account, but with the creation of audit logs, historical modifications of Apple teams and devices can be viewed.

审计日志实体

🌐 Audit log entities

虽然我们正在努力在未来添加更多实体,但以下实体已经启用:

🌐 While we are working on adding more entities in future, the following entities are already enabled:

  • 账户
  • 账户订阅
  • Android 应用凭据
  • Android 密钥库
  • App Store Connect API 密钥
  • Apple 设备
  • Apple 分发证书
  • Apple 配置文件
  • 苹果团队
  • EAS 主机别名
  • EAS 主机自定义域名
  • EAS 主机部署
  • EAS 更新分支
  • EAS 更新渠道
  • Google 服务账户密钥
  • iOS 应用凭据
  • LogRocket 组织
  • LogRocket 项目
  • 组织 SSO 配置
  • 项目
  • 用户邀请
  • 用户权限
  • 工作流程
  • 工作流程修订

结构

🌐 Structure

审计日志条目包括以下字段:

🌐 Audit log entries include the following fields:

字段描述
Actor执行特定操作的账户主体。
Entity Type被修改的对象及修改类型:CREATEUPDATEDELETE
Action Type修改类型:CREATEUPDATEDELETE
Message包含基于操作的信息。
Created At执行特定操作的时间。

此外,单击审计日志行,你可以查看与该日志相关的元数据。

🌐 Additionally, clicking on an Audit log row, you can view the metadata relevant to that log.

导出

🌐 Export

审核日志仅对企业计划客户可用。订阅后,Expo 内部使用的部分日志将立即可用,而其他类型的日志将在订阅激活后收集。

你可以导出审核日志,以便在 Expo 仪表板之外进行查看。要导出审核日志:

🌐 You can export your audit logs to review them outside of the Expo dashboard. To export audit logs:

  1. 在侧边栏菜单中,进入 账户/组织设置,点击 审计日志
  2. 点击审核日志页面右上角的 导出 按钮。
  3. 请选择你希望的时间范围。导出功能支持最长30天的时间范围。
  4. 审计日志将导出为文件以供下载。

导出的文件将包含审计日志页面上显示的所有字段,但不包括 Message 字段。

🌐 The exported file will include all the fields shown on the Audit logs page except for the Message field.

注意: 目前导出仅可通过 Expo 网站进行。没有可用于程序化导出审计日志的 API。