Skip to content

Commit 42b1703

Browse files
valakJSJuan Valacco
and
Juan Valacco
authored
auth0 env vars naming homologation -- improve descriptions on example env vars files (#492)
Co-authored-by: Juan Valacco <97040903+jvalacco-dataherald@users.noreply.github.com>
1 parent 66bb4ec commit 42b1703

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

services/admin-console/.env.example

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
NODE_ENV="development" # development | production
22

33
# API URL
4-
NEXT_PUBLIC_API_URL='http://localhost:3001'
4+
NEXT_PUBLIC_API_URL='http://localhost:3001' # enterprise API service url
55

66
# AUTH 0 CONFIG
7-
AUTH0_BASE_URL='http://localhost:3000'
8-
AUTH0_SCOPE='openid profile email offline_access'
9-
AUTH0_SECRET='use [openssl rand -hex 32] to generate a 32 bytes value'
10-
AUTH0_ISSUER_BASE_URL='{yourIssuer}'
11-
AUTH0_API_AUDIENCE='{yourAudience}'
12-
AUTH0_CLIENT_ID='{yourClientId}'
13-
AUTH0_CLIENT_SECRET='{yourClientSecret}'
7+
AUTH0_BASE_URL='http://localhost:3000' # admin-console url
8+
AUTH0_SECRET= # use [openssl rand -hex 32] to generate a 32 bytes value
9+
AUTH0_ISSUER_BASE_URL= # your auth0 issuer url, i.e.: https://auth.dataherald.com/
10+
AUTH0_API_AUDIENCE= # your auth0 API audience, i.e.: https://dataherald.us.auth0.com/api/v2/
11+
AUTH0_CLIENT_ID= # your auth0 application client ID
12+
AUTH0_CLIENT_SECRET= # your auth0 application client secret
1413

1514
# (OPTIONAL) Posthog Analytics
1615
NEXT_PUBLIC_POSTHOG_DISABLED='true'

services/enterprise/.env.example

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
ENGINE_URL=http://{DOCKER_CONTAINER_NAME:PORT}/api/v1 # example: http://engine/api/v1 (port 80 by default)
1+
ENGINE_URL= # http://{DOCKER_CONTAINER_NAME:PORT}/api/v1 -- example: http://engine/api/v1 (port 80 by default)
22
MONGODB_DB_NAME=dataherald
33
MONGODB_URI=mongodb://admin:admin@mongodb:27017
44

55
#The encryption key should be the same as the one used in engine
66
ENCRYPT_KEY=
77

8-
AUTH0_DOMAIN='{yourDomain}'
9-
AUTH0_ISSUER='https://{yourDomain}/'
10-
AUTH0_API_AUDIENCE='{yourAudience}'
8+
AUTH0_DOMAIN= # your auth0 domain, i.e.: auth.dataherald.com
9+
AUTH0_ISSUER_BASE_URL= # your auth0 issuer url, i.e.: https://auth.dataherald.com/
10+
AUTH0_API_AUDIENCE= # your auth0 API audience, i.e.: https://dataherald.us.auth0.com/api/v2/
1111
# AUTH0_DISABLED creates a mock authentication token type for testing purposes
1212
# you can provide an email as the bearer token, note that the admin console will not be able to authenticate
1313
AUTH0_DISABED=False

services/enterprise/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ docker-compose up
3333
To connect to Auth0 you will need to fill in the following environment variables before running the app:
3434
```
3535
AUTH0_DOMAIN=
36-
AUTH0_ISSUER=
36+
AUTH0_ISSUER_BASE_URL=
3737
AUTH0_API_AUDIENCE=
3838
AUTH0_DISABED=False
3939
```

services/enterprise/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class AuthSettings(BaseSettings):
6464
auth0_domain: str = os.environ.get("AUTH0_DOMAIN")
6565
auth0_algorithms: str = os.environ.get("AUTH0_ALGORITHMS", "RS256")
6666
auth0_audience: str = os.environ.get("AUTH0_API_AUDIENCE")
67-
auth0_issuer: str = os.environ.get("AUTH0_ISSUER")
67+
auth0_issuer: str = os.environ.get("AUTH0_ISSUER_BASE_URL")
6868

6969
def __getitem__(self, key: str) -> Any:
7070
return getattr(self, key)

services/slackbot/.env.example

+5-6
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ SOCKET_MODE=true
1515
################################################################################
1616
################################################################################
1717

18-
AUTH0_DOMAIN='{yourDomain}'
19-
AUTH0_API_AUDIENCE='{yourAudience}'
20-
AUTH0_CLIENT_ID='{yourClientId}'
21-
AUTH0_CLIENT_SECRET='{yourClientSecret}'
18+
AUTH0_DOMAIN= # your auth0 domain, i.e.: auth.dataherald.com
19+
AUTH0_API_AUDIENCE= # your auth0 API audience, i.e.: https://dataherald.us.auth0.com/api/v2/
20+
AUTH0_CLIENT_ID= # your auth0 application client ID
21+
AUTH0_CLIENT_SECRET= # your auth0 application client secret
2222

23-
24-
API_URL=http://{DOCKER_CONTAINER_NAME:PORT} # example: http://api:3001
23+
API_URL= # http://{DOCKER_CONTAINER_NAME:PORT} -- example: http://api:3001
2524
PORT=3000

0 commit comments

Comments
 (0)