Skip to content

Commit 5fc21fd

Browse files
docs: add GCP IAP to external identity providers documentation (#1051)
* docs: add GCP IAP to external identity providers documentation Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com> * docs: clarify Microsoft Entra ID is Azure AD in identity provider docs Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com> * docs: change GCP IAP note to info card Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
1 parent 8af0a2c commit 5fc21fd

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

docs/docs/configuration/idp.mdx

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,16 @@ A Keycloak connection can be used for [authentication](/docs/configuration/auth)
418418
</Steps>
419419
</Accordion>
420420

421-
### Microsoft Entra ID
421+
### Microsoft Entra ID (Azure AD)
422422

423423
[Auth.js Microsoft Entra ID Provider Docs](https://authjs.dev/getting-started/providers/microsoft-entra-id)
424424

425425
A Microsoft Entra ID connection can be used for [authentication](/docs/configuration/auth).
426426

427+
<Info>
428+
Microsoft renamed Azure Active Directory (Azure AD) to Microsoft Entra ID in 2023. If you have an existing Azure AD setup, these instructions will work for you. The underlying authentication infrastructure is the same.
429+
</Info>
430+
427431
<Accordion title="instructions">
428432
<Steps>
429433
<Step title="Register an OAuth Application">
@@ -570,4 +574,47 @@ A JumpCloud connection can be used for [authentication](/docs/configuration/auth
570574
</Steps>
571575
</Accordion>
572576

577+
### Google Cloud IAP
578+
579+
[Google Cloud IAP Documentation](https://cloud.google.com/iap/docs)
580+
581+
Google Cloud Identity-Aware Proxy (IAP) can be used for [authentication](/docs/configuration/auth). IAP provides a layer of security for applications deployed on Google Cloud, allowing you to control access based on user identity and context.
582+
583+
<Info>
584+
GCP IAP works differently from other identity providers. Instead of redirecting users to an OAuth flow, IAP intercepts requests at the infrastructure level and adds a signed JWT header that Sourcebot validates. This means users are automatically authenticated when accessing Sourcebot through an IAP-protected endpoint.
585+
</Info>
586+
587+
<Accordion title="instructions">
588+
<Steps>
589+
<Step title="Enable IAP for your application">
590+
Your Sourcebot deployment must be behind Google Cloud IAP. Follow [this guide](https://cloud.google.com/iap/docs/enabling-on-premises-howto) by Google to enable IAP for your application.
591+
592+
After enabling IAP, note the **Signed Header JWT Audience**. You can find this in the Google Cloud Console under **Security → Identity-Aware Proxy → (your application) → Edit OAuth Client → Application settings**.
593+
594+
The audience will be in the format: `/projects/<project-number>/global/backendServices/<service-id>` or `/projects/<project-number>/apps/<project-id>`.
595+
</Step>
596+
<Step title="Define environment variables">
597+
Set the IAP audience as an environment variable. This can be named whatever you like (ex. `GCP_IAP_AUDIENCE`).
598+
</Step>
599+
<Step title="Define the identity provider config">
600+
Create a `identityProvider` object in the [config file](/docs/configuration/config-file) with the following fields:
601+
602+
```json wrap icon="code"
603+
{
604+
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
605+
"identityProviders": [
606+
{
607+
"provider": "gcp-iap",
608+
"purpose": "sso",
609+
"audience": {
610+
"env": "GCP_IAP_AUDIENCE"
611+
}
612+
}
613+
]
614+
}
615+
```
616+
</Step>
617+
</Steps>
618+
</Accordion>
619+
573620

0 commit comments

Comments
 (0)