|
1 | 1 | # Audit Logs |
2 | 2 |
|
3 | | -Gruntwork Pipelines provides an audit log that records which user performed specific operations in your AWS accounts as a result of a [Pipelines Action](/2.0/docs/pipelines/architecture/actions.md). |
| 3 | +For certain cloud environments (for now, only AWS), Gruntwork Pipelines provides an audit log that records which user performed specific operations in your AWS accounts as a result of a [Pipelines Action](/2.0/docs/pipelines/architecture/actions.md). Pipelines does this via integration with native tooling for the cloud provider. |
| 4 | + |
| 5 | +## AWS |
4 | 6 |
|
5 | 7 | Accessing AWS environments from a CI/CD system often involves assuming temporary credentials using OpenID Connect (OIDC). For platform-specific documentation, see: |
| 8 | + |
6 | 9 | - [GitHub OIDC Configuration](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services) |
7 | 10 | - [GitLab OIDC Configuration](https://docs.gitlab.com/ee/ci/cloud_services/aws/) |
8 | 11 |
|
9 | 12 | Shared credentials can complicate tracking who performed specific actions in AWS accounts. Gruntwork Pipelines addresses this challenge by using [AWS CloudTrail](https://aws.amazon.com/cloudtrail/) with a naming convention that includes context from the triggering Pipelines Action. This approach associates every API operation performed by Pipelines with a username and a specific pull request or branch, enabling your security team to efficiently investigate access-related issues and analyze individual user actions. |
10 | 13 |
|
11 | 14 | ## How it works |
12 | 15 |
|
13 | | -Gruntwork Pipelines creates an audit log that tracks which user performed what action in which AWS account. It does this by setting the [AWS STS](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) session name to include the initiating username, the Pipelines name, and the merge request/pull request or branch that triggered the action. Logging is handled through [AWS CloudTrail](https://aws.amazon.com/cloudtrail/), where session names appear in the `User name` field, making it easy to identify which user performed an action. For information on locating logs, see [where you can find logs](#where-you-can-find-logs) and [querying data](#querying-data). |
| 16 | +Gruntwork Pipelines creates an audit log that tracks which user performed what action in which AWS account. It does this by setting the [AWS STS](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) session name to include the initiating username, the Pipelines name, and the merge/pull request or branch that triggered the action. Logging is handled through [AWS CloudTrail](https://aws.amazon.com/cloudtrail/), where session names appear in the `User name` field, making it easy to identify which user performed an action. For information on locating logs, see [where you can find logs](#where-you-can-find-logs) and [querying data](#querying-data). |
14 | 17 |
|
15 | 18 | ### What gets logged |
16 | 19 |
|
17 | | -Logs are generated for all operations performed by Gruntwork Pipelines across every AWS account. These logs leverage [AWS STS](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) session names to clearly label sessions with the username that requested the change and the associated merge request/pull request or branch. |
| 20 | +Logs are generated for all operations performed by Gruntwork Pipelines in AWS across every AWS account. These logs leverage [AWS STS](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) session names to clearly label sessions with the username that requested the change and the associated merge/pull request or branch. |
18 | 21 |
|
19 | 22 | Each CloudTrail event linked to API calls from Pipelines [Actions](/2.0/docs/pipelines/architecture/actions.md) includes the session name in the `userIdentity` field. For example, if the user `SomeUserInYourOrg` initiated the 123rd request in your repository, the `userIdentity` field in a corresponding CloudTrail event would provide details such as the following. |
20 | 23 |
|
@@ -58,13 +61,17 @@ By combining this data with a [query service](#querying-data), you can analyze t |
58 | 61 | Pipelines employs a naming scheme that integrates the user who triggered the Pipelines [Action](/2.0/docs/pipelines/architecture/actions.md) along with the request or branch that initiated the action. The AWS STS session name is formatted as follows: |
59 | 62 | `<UserName>-via-GWPipelines@(PR-<RequestNumber>|<branch name>)`. |
60 | 63 |
|
61 | | -#### For merge request/pull request events |
| 64 | +#### For merge/pull request events |
| 65 | + |
62 | 66 | When Pipelines runs in response to a request event (opened, updated, or reopened), the session name includes the user who made the most recent commit on the branch and the request number. For instance: |
| 67 | + |
63 | 68 | - If the user `SomeUserInYourOrg` created request number `123`, the session name would be: |
64 | 69 | `SomeUserInYourOrg-via-GWPipelines@PR-123`. |
65 | 70 |
|
66 | 71 | #### For merged requests |
| 72 | + |
67 | 73 | When Pipelines runs after a request is merged, the session name reflects the user who performed the merge and the deploy branch name (e.g., `main`). For example: |
| 74 | + |
68 | 75 | - If the user `SomeUserInYourOrg` merged a request to the branch `main`, the session name would be: |
69 | 76 | `SomeUserInYourOrg-via-GWPipelines@main`. |
70 | 77 |
|
|
0 commit comments