From 0a0810d55b00ae04295b50c36655348c2b7fd4ea Mon Sep 17 00:00:00 2001 From: Cal Ellowitz Date: Mon, 28 Oct 2024 14:42:43 -0400 Subject: [PATCH] add settings for connectid messaging --- environments/production/public.yml | 2 ++ environments/staging/public.yml | 2 ++ .../commcarehq/templates/localsettings.py.j2 | 16 ++++++++++++++++ .../environment/secrets/secrets.yml | 6 ++++++ 4 files changed, 26 insertions(+) diff --git a/environments/production/public.yml b/environments/production/public.yml index 0e6cdecb47..7cd1a98833 100644 --- a/environments/production/public.yml +++ b/environments/production/public.yml @@ -255,6 +255,8 @@ localsettings: USER_REPORTING_METADATA_BATCH_ENABLED: True WS4REDIS_CONNECTION_HOST: "redis.production.commcare.local" CONNECTID_URL: 'https://connectid.dimagi.com/o/userinfo' + CONNECTID_CHANNEL_URL: 'https://connectid.dimagi.com/messaging/create_channel/' + CONNECTID_MESSAGE_URL: 'https://connectid.dimagi.com/messaging/send_fcm/' ASYNC_INDICATORS_TO_QUEUE: 20000 # comment these two lines out to make a new rackspace machine diff --git a/environments/staging/public.yml b/environments/staging/public.yml index d074b75579..ddf635db1f 100644 --- a/environments/staging/public.yml +++ b/environments/staging/public.yml @@ -210,6 +210,8 @@ localsettings: } } CONNECTID_URL: 'https://connectid.dimagi.com/o/userinfo' + CONNECTID_CHANNEL_URL: 'https://connectid.dimagi.com/messaging/create_channel/' + CONNECTID_MESSAGE_URL: 'https://connectid.dimagi.com/messaging/send_fcm/' # comment these two lines out to make a new rackspace machine diff --git a/src/commcare_cloud/ansible/roles/commcarehq/templates/localsettings.py.j2 b/src/commcare_cloud/ansible/roles/commcarehq/templates/localsettings.py.j2 index dd900f8eff..fe88ec6649 100644 --- a/src/commcare_cloud/ansible/roles/commcarehq/templates/localsettings.py.j2 +++ b/src/commcare_cloud/ansible/roles/commcarehq/templates/localsettings.py.j2 @@ -1202,6 +1202,22 @@ FCM_CREDS = json.loads({{ FCM_CREDS }}) CONNECTID_USERINFO_URL = "{{ localsettings.CONNECTID_URL }}" {% endif %} +{% if CONNECTID_SECRET_KEY is defined %} +CONNECTID_SECRET_KEY = "{{ CONNECTID_SECRET_KEY }}" +{% endif %} + +{% if CONNECTID_CLIENT_ID is defined %} +CONNECTID_CLIENT_ID = "{{ CONNECTID_CLIENT_ID }}" +{% endif %} + +{% if localsettings.CONNECTID_CHANNEL_URL is defined %} +CONNECTID_CHANNEL_URL = "{{ localsettings.CONNECTID_CHANNEL_URL }}" +{% endif %} + +{% if localsettings.CONNECTID_MESSAGE_URL is defined %} +CONNECTID_MESSAGE_URL = "{{ localsettings.CONNECTID_MESSAGE_URL }}" +{% endif %} + {% if localsettings.MAX_MOBILE_UCR_LIMIT is defined %} MAX_MOBILE_UCR_LIMIT = {{ localsettings.MAX_MOBILE_UCR_LIMIT }} {% endif %} diff --git a/src/commcare_cloud/environment/secrets/secrets.yml b/src/commcare_cloud/environment/secrets/secrets.yml index cecfded230..8cefe14a4f 100644 --- a/src/commcare_cloud/environment/secrets/secrets.yml +++ b/src/commcare_cloud/environment/secrets/secrets.yml @@ -184,3 +184,9 @@ - name: EPIC_CLIENT_ID legacy_namespace: secrets default: '' +- name: CONNECTID_SECRET_KEY + legacy_namespace: secrets + default: '' +- name: CONNECTID_CLIENT_ID + legacy_namespace: secrets + default: ''