Skip to content

Commit e4d374e

Browse files
authored
Merge pull request #192 from phasehq/feat--github-actions-auth
feat: GitHub actions auth
2 parents 9dfbb15 + f05e9f1 commit e4d374e

File tree

89 files changed

+2950
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2950
-185
lines changed

public/access-control.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
import { Tag } from '@/components/Tag'
22
import { HeroPattern } from '@/components/HeroPattern'
33
import { UserAuthProviders } from '@/components/UserAuthProviders'
4+
import { DocActions } from '@/components/DocActions'
45

56
export const description =
67
'This guide explains how to authenticate with Phase and manage access with the Access Control system.'
78

89
<HeroPattern />
910

11+
<Tag variant="small">ACCESS CONTROL</Tag>
12+
1013
# Authentication & Access Control
1114

15+
Learn how to authenticate with Phase and manage access with the Access Control system.
16+
17+
<DocActions />
1218

1319
## Overview
1420

public/access-control/authentication.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Tag } from '@/components/Tag'
22
import { HeroPattern } from '@/components/HeroPattern'
33
import { UserAuthProviders } from '@/components/UserAuthProviders'
44
import { ProgrammaticAuth } from '@/components/ProgrammaticAuth'
5+
import { DocActions } from '@/components/DocActions'
56

67
export const description = 'Authenticating with Phase.'
78

@@ -13,6 +14,8 @@ export const description = 'Authenticating with Phase.'
1314

1415
Phase supports third-party authentication systems for access control. You can delegate authentication and administration to external providers such as Google, AWS IAM, GitHub, Kubernetes, GitLab, or Microsoft Azure to best suit your setup. When choosing an authentication provider, consider whether the access to Phase will be programmatic (machine-access) via REST API, SDK, CLI, etc., or user access (human-access).
1516

17+
<DocActions />
18+
1619
## User Authentication
1720

1821
User authentication in Phase is designed for seamless and secure web access. Phase supports both OAuth 2.0 and OpenID Connect (OIDC) protocols for Single Sign-On (SSO), allowing organizations to leverage their existing identity providers like Google, GitHub, GitLab, and JumpCloud. We plan to extend support to SCIM (System for Cross-domain Identity Management), which will enable automatic synchronization of user directories with Phase, including automatic provisioning and deprovisioning of user accounts based on changes in your organization's primary identity system.

public/access-control/authentication/oauth-sso.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { Tag } from '@/components/Tag'
2+
import { DocActions } from '@/components/DocActions'
3+
24
export const description = 'Authenticating via various OAuth Single sign-on providers with Phase.'
35

46
<Tag variant="small">AUTHENTICATION</Tag>
57

68
# OAuth 2.0 Single sign-on (SSO)
79

10+
<DocActions />
11+
812
## Google
913

1014
Follow these steps to set up Google SSO for your Phase application:

public/access-control/authentication/oidc-sso.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Tag } from '@/components/Tag'
2+
import { DocActions } from '@/components/DocActions'
23

34
export const description = 'Authenticating via various OIDC Single sign-on providers with Phase.'
45

@@ -8,6 +9,8 @@ export const description = 'Authenticating via various OIDC Single sign-on provi
89

910
OpenID Connect (OIDC) is an identity layer built on top of OAuth 2.0 that allows applications to verify user identities. It enables secure authentication through trusted identity providers while eliminating the need for separate credentials. Phase supports OIDC-based SSO integration with major providers like Google, allowing seamless and secure access to your applications. Currently, OIDC authentication can be set up only for a Self-hosted Phase deployment.
1011

12+
<DocActions />
13+
1114
<Note>
1215
OIDC SSO as an authentication method is only available for organizations with an `Enterprise` tier subscription. See [Pricing](https://phase.dev/pricing).
1316
</Note>

public/access-control/authentication/tokens.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Tag } from '@/components/Tag'
2+
import { DocActions } from '@/components/DocActions'
23

34
export const description =
45
'Learn how to create and manage authentication tokens in Phase.'
@@ -9,6 +10,8 @@ export const description =
910

1011
Phase provides secure authentication tokens for both human users and service accounts. These tokens enable programmatic access to Phase through our API, CLI, and SDKs while maintaining strict access controls and security standards. {{ className: 'lead' }}
1112

13+
<DocActions />
14+
1215
## Service Account Tokens
1316

1417
Service Account Tokens are used to authenticate your Service Account when making API requests. These tokens inherit the permissions and access levels of the service account they belong to.
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
import { Tag } from '@/components/Tag'
2+
import { DocActions } from '@/components/DocActions'
3+
4+
<Tag variant="small">ACCESS CONTROL</Tag>
5+
6+
export const description =
7+
'This guide explains how to use External Identities to authenticate with Phase and manage access with the Access Control system.'
8+
9+
10+
# External Identities
11+
12+
External Identities allow you to use third-party platforms and services to serve as identity providers for clients seeking programmatic access to Phase. Instead of manually provisioning access tokens for each client on each machine or an instance on your infrastructure, you can use External Identities to establish a trusted relationship with a principal that will be used to validate the identity of the client and grant access to Phase. This enables dynamic authentication and authorization for clients such as the CLI, SDKs, Kubernetes Operator, or your own applications.
13+
14+
<DocActions />
15+
16+
Example use case: Imagine you have a fleet of EC2 instances in an autoscaling group (ASG) that runs an instance of your application. The Phase CLI is configured to inject secrets into your applications at runtime. Instead of manually provisioning access tokens for each client on each machine, you can use External Identities to establish a trusted relationship with an instance profile attached to the ASG.
17+
18+
The authentication flow will be as follows:
19+
20+
<Diagram caption="External Identity authentication flow with AWS IAM">
21+
{`
22+
sequenceDiagram
23+
participant Client as Client
24+
participant Phase as Phase
25+
participant AWS as AWS STS
26+
27+
Note over Client,AWS: 1. GetCallerIdentity()
28+
Client->>AWS: Fetch GetCallerIdentity from STS
29+
AWS-->>Client: Return AWS Sigv4 signed GetCallerIdentity
30+
31+
Note over Client,Phase: 2. Authenticate
32+
Client->>Phase: POST Sigv4 signed GetCallerIdentity to /identities/external/v1/aws/iam/auth/
33+
34+
Note over Phase,AWS: 3. Validate signature
35+
Phase->>AWS: Forward Sigv4 signed GetCallerIdentity
36+
AWS-->>Phase: Return IAM user/role metadata
37+
38+
Note over Phase: 4. Check entity trust relationship - is client a trusted principal?
39+
Phase->>Client: Return Access Token with a specified TTL
40+
41+
Note over Client,Phase: 5. Authenticate to API with Access Token
42+
Client->>Phase: Make authenticated requests using the Access Token
43+
`}
44+
</Diagram>
45+
46+
Benefits:
47+
- Automate the creation and provisioning of access tokens for every client on your infrastructure.
48+
- Automatic token revocation after expiry
49+
- Centralized management of trust relationships
50+
51+
## Prerequisites
52+
- Server-side encryption (SSE) enabled for the Service Account you want to use the External Identity with.
53+
- A third-party platform or service that supported by Phase
54+
55+
## Supported External Identity Providers
56+
Phase currently supports the following external identity providers:
57+
58+
- [**AWS IAM**](#aws-iam): Bind an AWS IAM User to a phase Service Account
59+
60+
## Configure an External Identity
61+
62+
To set up an External Identity for use with a Phase Service Account, follow these steps. First, navigate to the **Access Control** page from the sidebar, and select **External Identities**. Then, choose a provider:
63+
64+
![external identities page](/assets/images/console/access-control/external-identities/external-identities.png)
65+
66+
Then, enter the required information to configure the external identity. For all providers, you will need to provide basic information about the identity and how tokens are generated:
67+
68+
<Properties>
69+
<Property name="Identity Name" type="string">
70+
A name for the external identity.
71+
</Property>
72+
<Property name="Description" type="string">
73+
Optionally, a description for the external identity.
74+
</Property>
75+
<Property name="Token name" type="string">
76+
Optional name for tokens that will be generated for Service Accounts using this external identity. The default is the provider shortcode, e.g. `aws-iam`.
77+
</Property>
78+
<Property name="Token Default TTL" type="number">
79+
The default TTL (in seconds) for tokens generated for Service Accounts using this external identity. Default is 3600 seconds (1 hour).
80+
</Property>
81+
<Property name="Token Max TTL" type="number">
82+
The default TTL (in seconds) for tokens generated for Service Accounts using this external identity. Default is 86400 seconds (24 hours).
83+
</Property>
84+
</Properties>
85+
86+
Additionally, you will need to provide provider-specific information depending on the selected provider.
87+
88+
### AWS IAM
89+
90+
For AWS IAM, you will need to provide the following information:
91+
92+
<Properties>
93+
<Property name="Trusted principal ARNs" type="comma-separated-string">
94+
The ARN(s) of the AWS IAM User(s) to bind to the Phase Service Account. Separate multiple ARNs with commas.
95+
</Property>
96+
<Property name="Signature expiry" type="number">
97+
The duration (in seconds) for which the signed requests from the AWS IAM User will be valid. Default is 60 seconds. Lower the better. This is to protect against replay attacks.
98+
</Property>
99+
<Property name="STS endpoint" type="string">
100+
Optionally, specify a custom AWS STS endpoint. If not provided, the default AWS STS endpoint will be used (`https://sts.amazonaws.com`).
101+
</Property>
102+
</Properties>
103+
104+
![configure new identity](/assets/images/console/access-control/external-identities/configure-new-identity.png)
105+
106+
107+
## Manage External Identities
108+
109+
Once an External Identity is created, it will appear in the list on the **External Identities** page. From here, you can view details, edit configurations, or delete the identity.
110+
111+
![external identities list](/assets/images/console/access-control/external-identities/external-identities-list.png)
112+
113+
## Bind an External Identity to a Service Account
114+
115+
<Note>
116+
To use an External Identity, the Service Account must have [Server-side KMS](/access-control/service-accounts#server-side-kms) enabled.
117+
</Note>
118+
119+
Once you have configured an External Identity, you can bind it to a Phase Service Account. To do this, navigate to the **Service Accounts** page, select the desired Service Account and click **Mange** to open the account detail page. Scroll down to the **External Identities** section and click **Manage External Identities**:
120+
121+
![manage external identities button](/assets/images/console/access-control/external-identities/manage-account-identities-button.png)
122+
123+
From the dialog, select the External Identity you want to bind to this Service Account and enable it using the toggle switch. Click **Save** to apply the changes:
124+
125+
![add external identity to service account](/assets/images/console/access-control/external-identities/manage-account-identities-dialog.png)
126+
127+

public/access-control/network.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { Tag } from '@/components/Tag'
2+
import { DocActions } from '@/components/DocActions'
23

34
<Tag variant="small">ACCESS CONTROL</Tag>
45

56
# Network
67

78
You can control access to resources in Phase from specific IPv4 or IPv6 sources by defining individual IPs or CIDR ranges in a Network Access Policy. You may attach such Network Access Policy to a User and/or Service Accounts individually or enforce it across your entire organization via a Global Policy. This allows you to put an additional layer of security on top of the existing access control mechanisms, by making sure that a client can only gain access to resources in Phase via mediums and/or assets such as the Phase Console, CLI, SDKs, Kubernetes Operator, REST API, etc. while being in the confines of your network.
89

10+
<DocActions />
11+
912
<Note>
1013
The ability to create and manage network access policies is available for organizations with a `Pro` or an `Enterprise` tier subscription.
1114
</Note>

public/access-control/roles.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { Tag } from '@/components/Tag'
2+
import { DocActions } from '@/components/DocActions'
23

34
<Tag variant="small">ACCESS CONTROL</Tag>
45

56
# Roles
67

78
Roles in Phase define the level of access and permissions granted to users within an organization. They determine what actions a user can perform and what resources they can access. Phase offers both managed roles with predefined permissions and the ability to create custom roles for more specific access control needs.
89

10+
<DocActions />
11+
912
## Assigning Roles to Users
1013

1114
To assign a role to a user or change a user's role:
@@ -37,6 +40,7 @@ The organization owner. This role is automatically assigned when a user creates
3740
| **Member Personal Access Tokens** | Full access |||||
3841
| **Service Accounts** | Full access |||||
3942
| **Service Account Tokens** | Full access |||||
43+
| **External Identities** | Full access |||||
4044
| **Roles** | Full access |||||
4145
| **Integration Credentials** | Full access |||||
4246
| **Network Access Policies** | Full access |||||
@@ -47,6 +51,7 @@ The organization owner. This role is automatically assigned when a user creates
4751
|----------|--------|------|--------|--------|--------|
4852
| **Environments** | Full access |||||
4953
| **Secrets** | Full access |||||
54+
| **DynamicSecretLeases** | Full access |||||
5055
| **Lockbox** | Full access |||||
5156
| **Logs** | Full access |||||
5257
| **Tokens (Legacy)** | Full access |||||
@@ -70,6 +75,7 @@ Admin users have access to most resources and permissions, and have global acces
7075
| **Member Personal Access Tokens** | Full access |||||
7176
| **Service Accounts** | Full access |||||
7277
| **Service Account Tokens** | Full access |||||
78+
| **External Identities** | Full access |||||
7379
| **Roles** | Full access |||||
7480
| **Integration Credentials** | Full access |||||
7581
| **Network Access Policies** | Full access |||||
@@ -80,6 +86,7 @@ Admin users have access to most resources and permissions, and have global acces
8086
|----------|--------|------|--------|--------|--------|
8187
| **Environments** | Full access |||||
8288
| **Secrets** | Full access |||||
89+
| **DynamicSecretLeases** | Full access |||||
8390
| **Lockbox** | Full access |||||
8491
| **Logs** | Full access |||||
8592
| **Tokens (Legacy)** | Full access |||||
@@ -105,6 +112,7 @@ Management users with broad access to environments, secrets, and service account
105112
| **Member Personal Access Tokens** | No access |||||
106113
| **Service Accounts** | Full access |||||
107114
| **Service Account Tokens** | Full access |||||
115+
| **External Identities** | Full access |||||
108116
| **Roles** | Full access |||||
109117
| **Integration Credentials** | Full access |||||
110118
| **Network Access Policies** | Full access |||||
@@ -115,6 +123,7 @@ Management users with broad access to environments, secrets, and service account
115123
|----------|--------|------|--------|--------|--------|
116124
| **Environments** | Custom access |||||
117125
| **Secrets** | Full access |||||
126+
| **DynamicSecretLeases** | Full access |||||
118127
| **Lockbox** | Full access |||||
119128
| **Logs** | Full access |||||
120129
| **Tokens (Legacy)** | Full access |||||
@@ -138,6 +147,7 @@ Default role for Service Accounts, providing programmatic access to secrets with
138147
| **Member Personal Access Tokens** | No access |||||
139148
| **Service Accounts** | Read access |||||
140149
| **Service Account Tokens** | Read access |||||
150+
| **External Identities** | Read access |||||
141151
| **Roles** | Read access |||||
142152
| **Integration Credentials** | Read access |||||
143153
| **Network Access Policies** | Read access |||||
@@ -148,6 +158,7 @@ Default role for Service Accounts, providing programmatic access to secrets with
148158
|----------|--------|------|--------|--------|--------|
149159
| **Environments** | Full access |||||
150160
| **Secrets** | Full access |||||
161+
| **DynamicSecretLeases** | Full access |||||
151162
| **Lockbox** | No access |||||
152163
| **Logs** | No access |||||
153164
| **Tokens (Legacy)** | No access |||||
@@ -171,6 +182,7 @@ Developers have limited permissions at the organization level and must be given
171182
| **Member Personal Access Tokens** | No access |||||
172183
| **Service Accounts** | No access |||||
173184
| **Service Account Tokens** | No access |||||
185+
| **External Identities** | No access |||||
174186
| **Roles** | Read access |||||
175187
| **Integration Credentials** | Custom access |||||
176188
| **Network Access Policies** | Read access |||||
@@ -181,6 +193,7 @@ Developers have limited permissions at the organization level and must be given
181193
|----------|--------|------|--------|--------|--------|
182194
| **Environments** | Custom access |||||
183195
| **Secrets** | Full access |||||
196+
| **DynamicSecretLeases** | Full access |||||
184197
| **Lockbox** | Full access |||||
185198
| **Logs** | Read access |||||
186199
| **Tokens (Legacy)** | Custom access |||||

0 commit comments

Comments
 (0)