Skip to content

Commit 302cf9a

Browse files
committed
docs: Updating ci-workflows.md with call outs for Account Factory stuff
1 parent 983e28a commit 302cf9a

File tree

4 files changed

+39
-172
lines changed

4 files changed

+39
-172
lines changed

docs/2.0/docs/accountfactory/architecture/security-controls.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Gruntwork Account Factory employs a defense-in-depth approach to secure workflows across both GitHub and GitLab platforms. This document outlines the controls Pipelines uses to ensure that only infrastructure written in code and approved by a reviewer can be deployed to your AWS accounts.
44

5+
Account Factory relies on Pipelines to drive infrastructure changes via GitOps workflows, so make sure to read the [Pipelines security controls](/2.0/docs/pipelines/architecture/security-controls) for more details on how Pipelines secures workflows.
6+
57
## Least privilege principle
68

79
Pipelines adheres to the principle of least privilege, granting only the necessary permissions for infrastructure actions.

docs/2.0/docs/pipelines/architecture/audit-logs.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Audit Logs
22

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
46

57
Accessing AWS environments from a CI/CD system often involves assuming temporary credentials using OpenID Connect (OIDC). For platform-specific documentation, see:
8+
69
- [GitHub OIDC Configuration](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)
710
- [GitLab OIDC Configuration](https://docs.gitlab.com/ee/ci/cloud_services/aws/)
811

912
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.
1013

1114
## How it works
1215

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).
1417

1518
### What gets logged
1619

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.
1821

1922
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.
2023

@@ -58,13 +61,17 @@ By combining this data with a [query service](#querying-data), you can analyze t
5861
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:
5962
`<UserName>-via-GWPipelines@(PR-<RequestNumber>|<branch name>)`.
6063

61-
#### For merge request/pull request events
64+
#### For merge/pull request events
65+
6266
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+
6368
- If the user `SomeUserInYourOrg` created request number `123`, the session name would be:
6469
`SomeUserInYourOrg-via-GWPipelines@PR-123`.
6570

6671
#### For merged requests
72+
6773
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+
6875
- If the user `SomeUserInYourOrg` merged a request to the branch `main`, the session name would be:
6976
`SomeUserInYourOrg-via-GWPipelines@main`.
7077

docs/2.0/docs/pipelines/architecture/ci-workflows.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
include:
2222
- component: gitlab.com/gruntwork-io/pipelines-workflows/pipelines@3
2323
```
24+
2425
</TabItem>
2526
</Tabs>
2627
## Workflow versioning
@@ -42,33 +43,32 @@ If you [fork the Gruntwork Workflows](https://docs.gruntwork.io/2.0/docs/pipelin
4243

4344
The `pipelines-workflows` repository includes the following reusable workflows:
4445

45-
- `pipelines-drift-detection.yml` - Used for [Pipelines Drift Detection](/2.0/docs/pipelines/concepts/drift-detection) in all repositories with Drift Detection installed.
46-
- `pipelines-root.yml` - The core Pipelines workflow for the `infrastructure-live-root` repository, providing core plan/apply functionality and account vending.
47-
- `pipelines-unlock.yml` - Used to manually unlock state files in all repositories.
46+
- `pipelines-drift-detection.yml` - (Enterprise only) Used for [Pipelines Drift Detection](/2.0/docs/pipelines/concepts/drift-detection) in all repositories with Drift Detection installed.
47+
- `pipelines-root.yml` - (Account Factory only) The core Pipelines workflow for the `infrastructure-live-root` repository, providing core plan/apply functionality and account vending.
48+
- `pipelines-unlock.yml` - (AWS only) Used to manually unlock state files in all repositories.
4849
- `pipelines.yml` - The core Pipelines workflow for `infrastructure-live-access-control` and delegated repositories, supporting plan/apply operations.
4950

51+
If you are using [Gruntwork Account Factory](/2.0/docs/accountfactory/overview), the following workflows are typically present:
5052

51-
In your repositories, the following workflows are typically present:
52-
53-
#### infrastructure-live-root
53+
### infrastructure-live-root
5454

5555
- `account-factory.yml` - A standalone workflow independent of `pipelines-workflows`.
5656
- `pipelines-drift-detection.yml` (Enterprise only) - Uses the Gruntwork `pipelines-drift-detection.yml` workflow.
5757
- `pipelines-unlock.yml` - Uses the Gruntwork `pipelines-unlock.yml` workflow.
5858
- `pipelines.yml` - Uses `pipelines-root.yml`.
59-
#### infrastructure-live-access-control
59+
60+
### infrastructure-live-access-control
6061

6162
- `pipelines-drift-detection.yml` (Enterprise only) - Uses the Gruntwork `pipelines-drift-detection.yml` workflow.
62-
- `pipelines-unlock.yml` - Uses the Gruntwork `pipelines-unlock.yml` workflow.
63+
- `pipelines-unlock.yml` - Uses the Gruntwork `pipelines-unlock.yml` workflow (AWS only).
6364
- `pipelines.yml` - Uses `pipelines.yml`.
6465

65-
#### infrastructure-live-delegated ([Vended Delegated Repositories](/2.0/docs/accountfactory/guides/delegated-repositories))
66+
### infrastructure-live-delegated ([Vended Delegated Repositories](/2.0/docs/accountfactory/guides/delegated-repositories))
6667

6768
- `pipelines-drift-detection.yml` - Uses the Gruntwork `pipelines-drift-detection.yml` workflow.
6869
- `pipelines-unlock.yml` - Uses the Gruntwork `pipelines-unlock.yml` workflow.
6970
- `pipelines.yml` - Uses `pipelines.yml`.
7071

71-
7272
</TabItem>
7373
<TabItem value="GitLab" label="GitLab">
7474

0 commit comments

Comments
 (0)