Skip to content

Commit 9e85624

Browse files
authored
feat: Haystack authenticates with Phoenix using API key (#13)
1 parent 1d3977d commit 9e85624

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

app/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,18 @@ cat server.crt rootCA.crt > server-fullchain.crt
6666
(Use the contents of `rootCA.crt` created in step 1 above.)
6767

6868
5. Restart Phoenix client
69+
70+
71+
### Enabling authentication in Phoenix
72+
73+
Based on [documentation](https://arize.com/docs/phoenix/self-hosting/features/authentication), set `PHOENIX_SECRET` in `docker-compose.yaml` as follows.
74+
* Add these environment variables to the `phoenix` service:
75+
```
76+
- PHOENIX_ENABLE_AUTH=True
77+
- PHOENIX_SECRET=SomeLongSecretThatIsUsedToSignJWTsForTheDeployment
78+
```
79+
* Restart and log into the Phoenix UI at http://localhost:6006 and create a system API key; copy the API key
80+
* Add PHOENIX_API_KEY environment variable in `override.env` for the Haystack service to authenticate to Phoenix:
81+
```
82+
- PHOENIX_API_KEY=<paste API key>
83+
```

app/docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ services:
3838
- PHOENIX_TLS_KEY_FILE_PASSWORD=
3939
# For verifying client certificates
4040
- PHOENIX_TLS_VERIFY_CLIENT=False
41+
42+
# See README.md to enable authentication locally
43+
# - PHOENIX_ENABLE_AUTH=True
44+
# - PHOENIX_SECRET=ThisSecretIsForLocalDevOnly202508251033
4145
volumes:
4246
- ./certs:/certs
4347

infra/app/app-config/env-config/environment_variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ locals {
2727
# }
2828
# }
2929
secrets = {
30+
PHOENIX_API_KEY = {
31+
manage_method = "manual"
32+
secret_store_name = "/${var.app_name}-${var.environment}/phoenix-api-key"
33+
}
34+
3035
# Example generated secret
3136
# RANDOM_SECRET = {
3237
# manage_method = "generated"

0 commit comments

Comments
 (0)