Skip to content

Commit caf43a9

Browse files
authored
docs: Added self-hosted examples section (#1270)
1 parent 7c66b1e commit caf43a9

File tree

4 files changed

+69
-0
lines changed

4 files changed

+69
-0
lines changed
328 KB
Loading
371 KB
Loading
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Examples
2+
3+
This page provides some example configuration for different scenarios.
4+
5+
---
6+
7+
## Auth
8+
9+
Examples for configuring different [Dex connectors](https://dexidp.io/docs/connectors/)
10+
11+
### Azure
12+
13+
For Azure, we recommend creating an [OpenID connector](https://dexidp.io/docs/connectors/oidc/).
14+
15+
- Follow the steps to create the Azure App at [Azure Docs](https://learn.microsoft.com/en-us/power-pages/security/authentication/openid-settings#create-an-app-registration-in-azure)
16+
17+
- Make sure to set the RedirectURI to ```<logfire_url>/auth-api/callback```
18+
- Make sure to copy the secret value when you create it
19+
20+
- To finish the configuration on your Helm values file, you will need:
21+
- Directory (Tenant) ID and Application (client) ID, you can get both of these from the Azure App overview page
22+
- The client secret value you copied on the previous step
23+
24+
It should look something like this:
25+
```yaml
26+
connectors:
27+
- type: oidc
28+
id: azuread
29+
name: Microsoft
30+
config:
31+
issuer: https://login.microsoftonline.com/<tenant_id>/v2.0
32+
clientID: <App client ID>
33+
clientSecret: <Client secret value>
34+
insecureSkipEmailVerified: true
35+
```
36+
37+
### Github
38+
39+
For GitHub you can use the [GitHub connector](https://dexidp.io/docs/connectors/github/)
40+
41+
- Follow the steps for creating an OAuth app [in the GitHub docs](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app)
42+
43+
![Github OAuth App](../../images/self-hosted/dex-github-oauth-app.png)
44+
45+
!!! note
46+
Make sure to set the callback URL to ```<logfire_url>/auth-api/callback```
47+
48+
![Github OAuth App Permissions](../../images/self-hosted/dex-github-oauth-app2.png)
49+
!!! note
50+
For personal apps, setting at least email read access is required here. For Organizations, this is not needed.
51+
52+
- After creating the app, on the ```General``` tab at the left, at the Client secrets section, click ```Generate a new client secret```, and copy the value.
53+
54+
- On your values file:
55+
```yaml
56+
logfire-dex:
57+
...
58+
config:
59+
connectors:
60+
- type: "github"
61+
id: "github"
62+
name: "GitHub"
63+
config:
64+
# You get clientID and clientSecret by creating a GitHub OAuth App
65+
# See https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app
66+
clientID: client_id
67+
clientSecret: client_secret
68+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ nav:
176176
- Installation: reference/self-hosted/installation.md
177177
- Scaling: reference/self-hosted/scaling.md
178178
- Troubleshooting: reference/self-hosted/troubleshooting.md
179+
- Examples: reference/self-hosted/examples.md
179180
- SDK CLI: reference/cli.md
180181
- SDK API:
181182
- Logfire: reference/api/logfire.md

0 commit comments

Comments
 (0)