Skip to content

Commit 0b6e6b1

Browse files
cursoragentmsukkari
andcommitted
docs: add GCP IAP to external identity providers documentation
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
1 parent 2b35bb0 commit 0b6e6b1

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

docs/docs/configuration/idp.mdx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,4 +570,47 @@ A JumpCloud connection can be used for [authentication](/docs/configuration/auth
570570
</Steps>
571571
</Accordion>
572572

573+
### Google Cloud IAP
574+
575+
[Google Cloud IAP Documentation](https://cloud.google.com/iap/docs)
576+
577+
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.
578+
579+
<Note>
580+
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.
581+
</Note>
582+
583+
<Accordion title="instructions">
584+
<Steps>
585+
<Step title="Enable IAP for your application">
586+
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.
587+
588+
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**.
589+
590+
The audience will be in the format: `/projects/<project-number>/global/backendServices/<service-id>` or `/projects/<project-number>/apps/<project-id>`.
591+
</Step>
592+
<Step title="Define environment variables">
593+
Set the IAP audience as an environment variable. This can be named whatever you like (ex. `GCP_IAP_AUDIENCE`).
594+
</Step>
595+
<Step title="Define the identity provider config">
596+
Create a `identityProvider` object in the [config file](/docs/configuration/config-file) with the following fields:
597+
598+
```json wrap icon="code"
599+
{
600+
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
601+
"identityProviders": [
602+
{
603+
"provider": "gcp-iap",
604+
"purpose": "sso",
605+
"audience": {
606+
"env": "GCP_IAP_AUDIENCE"
607+
}
608+
}
609+
]
610+
}
611+
```
612+
</Step>
613+
</Steps>
614+
</Accordion>
615+
573616

0 commit comments

Comments
 (0)