Skip to content

Commit

Permalink
auth0 env vars naming homologation -- improve descriptions on example…
Browse files Browse the repository at this point in the history
… env vars files
  • Loading branch information
Juan Valacco committed May 22, 2024
1 parent 66bb4ec commit 75e2c19
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
15 changes: 7 additions & 8 deletions services/admin-console/.env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
NODE_ENV="development" # development | production

# API URL
NEXT_PUBLIC_API_URL='http://localhost:3001'
NEXT_PUBLIC_API_URL='http://localhost:3001' # enterprise API service url

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

# (OPTIONAL) Posthog Analytics
NEXT_PUBLIC_POSTHOG_DISABLED='true'
Expand Down
8 changes: 4 additions & 4 deletions services/enterprise/.env.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ENGINE_URL=http://{DOCKER_CONTAINER_NAME:PORT}/api/v1 # example: http://engine/api/v1 (port 80 by default)
ENGINE_URL= # http://{DOCKER_CONTAINER_NAME:PORT}/api/v1 -- example: http://engine/api/v1 (port 80 by default)
MONGODB_DB_NAME=dataherald
MONGODB_URI=mongodb://admin:admin@mongodb:27017

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

AUTH0_DOMAIN='{yourDomain}'
AUTH0_ISSUER='https://{yourDomain}/'
AUTH0_API_AUDIENCE='{yourAudience}'
AUTH0_DOMAIN= # your auth0 domain, i.e.: auth.dataherald.com
AUTH0_ISSUER_BASE_URL= # your auth0 issuer url, i.e.: https://auth.dataherald.com/
AUTH0_API_AUDIENCE= # your auth0 API audience, i.e.: https://dataherald.us.auth0.com/api/v2/
# AUTH0_DISABLED creates a mock authentication token type for testing purposes
# you can provide an email as the bearer token, note that the admin console will not be able to authenticate
AUTH0_DISABED=False
Expand Down
2 changes: 1 addition & 1 deletion services/enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docker-compose up
To connect to Auth0 you will need to fill in the following environment variables before running the app:
```
AUTH0_DOMAIN=
AUTH0_ISSUER=
AUTH0_ISSUER_BASE_URL=
AUTH0_API_AUDIENCE=
AUTH0_DISABED=False
```
Expand Down
2 changes: 1 addition & 1 deletion services/enterprise/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class AuthSettings(BaseSettings):
auth0_domain: str = os.environ.get("AUTH0_DOMAIN")
auth0_algorithms: str = os.environ.get("AUTH0_ALGORITHMS", "RS256")
auth0_audience: str = os.environ.get("AUTH0_API_AUDIENCE")
auth0_issuer: str = os.environ.get("AUTH0_ISSUER")
auth0_issuer: str = os.environ.get("AUTH0_ISSUER_BASE_URL")

def __getitem__(self, key: str) -> Any:
return getattr(self, key)
Expand Down
11 changes: 5 additions & 6 deletions services/slackbot/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ SOCKET_MODE=true
################################################################################
################################################################################

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


API_URL=http://{DOCKER_CONTAINER_NAME:PORT} # example: http://api:3001
API_URL= # http://{DOCKER_CONTAINER_NAME:PORT} -- example: http://api:3001
PORT=3000

0 comments on commit 75e2c19

Please sign in to comment.