mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 01:27:03 +02:00
Fix missing .env file
This commit is contained in:
parent
f16d657c6a
commit
2f9e16194e
3 changed files with 13 additions and 9 deletions
|
@ -15,10 +15,14 @@ from djangooidc import exceptions as o_e
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Initialize provider using pyOICD
|
try:
|
||||||
OP = getattr(settings, "OIDC_ACTIVE_PROVIDER")
|
# Initialize provider using pyOICD
|
||||||
CLIENT = Client(OP)
|
OP = getattr(settings, "OIDC_ACTIVE_PROVIDER")
|
||||||
logger.debug("client initialized %s" % CLIENT)
|
CLIENT = Client(OP)
|
||||||
|
logger.debug("client initialized %s" % CLIENT)
|
||||||
|
except Exception as err:
|
||||||
|
logger.warning(err)
|
||||||
|
logger.warning("Unable to configure OpenID Connect provider. Users cannot log in.")
|
||||||
|
|
||||||
|
|
||||||
def error_page(request, error):
|
def error_page(request, error):
|
||||||
|
|
|
@ -10,10 +10,6 @@ services:
|
||||||
- db
|
- db
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
entrypoint: python /app/docker_entrypoint.py
|
entrypoint: python /app/docker_entrypoint.py
|
||||||
env_file:
|
|
||||||
# Non-version controlled file containing DJANGO_SP_PRIVATE_KEY
|
|
||||||
# and other sensitive values
|
|
||||||
- .env
|
|
||||||
environment:
|
environment:
|
||||||
# Send stdout and stderr straight to the terminal without buffering
|
# Send stdout and stderr straight to the terminal without buffering
|
||||||
- PYTHONUNBUFFERED=yup
|
- PYTHONUNBUFFERED=yup
|
||||||
|
@ -27,6 +23,9 @@ services:
|
||||||
- DJANGO_DEBUG=True
|
- DJANGO_DEBUG=True
|
||||||
# Tell Django where it is being hosted
|
# Tell Django where it is being hosted
|
||||||
- DJANGO_BASE_URL="localhost:8080"
|
- DJANGO_BASE_URL="localhost:8080"
|
||||||
|
# --- These keys are obtained from `.env` file ---
|
||||||
|
# Set a private JWT signing key for Login.gov
|
||||||
|
- DJANGO_SECRET_LOGIN_KEY
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -46,7 +46,7 @@ env_debug = env.bool("DJANGO_DEBUG", default=False)
|
||||||
env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG")
|
env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG")
|
||||||
env_base_url = env.str("DJANGO_BASE_URL")
|
env_base_url = env.str("DJANGO_BASE_URL")
|
||||||
|
|
||||||
secret_login_key = b64decode(secret("DJANGO_SECRET_LOGIN_KEY"))
|
secret_login_key = b64decode(secret("DJANGO_SECRET_LOGIN_KEY", ""))
|
||||||
secret_key = secret("DJANGO_SECRET_KEY")
|
secret_key = secret("DJANGO_SECRET_KEY")
|
||||||
|
|
||||||
# region: Basic Django Config-----------------------------------------------###
|
# region: Basic Django Config-----------------------------------------------###
|
||||||
|
@ -389,6 +389,7 @@ OIDC_ALLOW_DYNAMIC_OP = False
|
||||||
# (code does not currently support user selection)
|
# (code does not currently support user selection)
|
||||||
OIDC_ACTIVE_PROVIDER = "login.gov"
|
OIDC_ACTIVE_PROVIDER = "login.gov"
|
||||||
|
|
||||||
|
|
||||||
OIDC_PROVIDERS = {
|
OIDC_PROVIDERS = {
|
||||||
"login.gov": {
|
"login.gov": {
|
||||||
"srv_discovery_url": "https://idp.int.identitysandbox.gov",
|
"srv_discovery_url": "https://idp.int.identitysandbox.gov",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue