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 17ce2527ab..67a90c21cf 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/backends/ansible_vault/tests/expected-generated-variables.yml b/src/commcare_cloud/environment/secrets/backends/ansible_vault/tests/expected-generated-variables.yml index 0f22640afa..3c674a1aec 100644 --- a/src/commcare_cloud/environment/secrets/backends/ansible_vault/tests/expected-generated-variables.yml +++ b/src/commcare_cloud/environment/secrets/backends/ansible_vault/tests/expected-generated-variables.yml @@ -11,6 +11,8 @@ BITLY_APIKEY: "{{ localsettings_private.BITLY_APIKEY | default('') }}" BITLY_LOGIN: "{{ localsettings_private.BITLY_LOGIN | default('') }}" BITLY_OAUTH_TOKEN: "{{ localsettings_private.BITLY_OAUTH_TOKEN | default('') }}" BOOKKEEPER_CONTACT_EMAILS: "{{ localsettings_private.BOOKKEEPER_CONTACT_EMAILS | default(None) }}" +CONNECTID_CLIENT_ID: "{{ secrets.CONNECTID_CLIENT_ID | default('') }}" +CONNECTID_SECRET_KEY: "{{ secrets.CONNECTID_SECRET_KEY | default('') }}" COUCH_PASSWORD: "{{ localsettings_private.COUCH_PASSWORD | default(None) }}" COUCH_USERNAME: "{{ localsettings_private.COUCH_USERNAME | default(None) }}" DATADOG_API_KEY: "{{ secrets.DATADOG_API_KEY | default(None) }}" diff --git a/src/commcare_cloud/environment/secrets/backends/aws_secrets/tests/expected-generated-variables.yml b/src/commcare_cloud/environment/secrets/backends/aws_secrets/tests/expected-generated-variables.yml index d3a5297d7b..ddcc125d80 100644 --- a/src/commcare_cloud/environment/secrets/backends/aws_secrets/tests/expected-generated-variables.yml +++ b/src/commcare_cloud/environment/secrets/backends/aws_secrets/tests/expected-generated-variables.yml @@ -11,6 +11,8 @@ BITLY_APIKEY: "{{ lookup('cchq_aws_secret', 'commcare-staging/BITLY_APIKEY', err BITLY_LOGIN: "{{ lookup('cchq_aws_secret', 'commcare-staging/BITLY_LOGIN', errors='ignore') | default('') }}" BITLY_OAUTH_TOKEN: "{{ lookup('cchq_aws_secret', 'commcare-staging/BITLY_OAUTH_TOKEN', errors='ignore') | default('') }}" BOOKKEEPER_CONTACT_EMAILS: "{{ lookup('cchq_aws_secret', 'commcare-staging/BOOKKEEPER_CONTACT_EMAILS', errors='ignore') | default(None) }}" +CONNECTID_CLIENT_ID: "{{ lookup('cchq_aws_secret', 'commcare-staging/CONNECTID_CLIENT_ID', errors='ignore') | default('') }}" +CONNECTID_SECRET_KEY: "{{ lookup('cchq_aws_secret', 'commcare-staging/CONNECTID_SECRET_KEY', errors='ignore') | default('') }}" COUCH_PASSWORD: "{{ lookup('cchq_aws_secret', 'commcare-staging/COUCH_PASSWORD', errors='ignore') | default(None) }}" COUCH_USERNAME: "{{ lookup('cchq_aws_secret', 'commcare-staging/COUCH_USERNAME', errors='ignore') | default(None) }}" DATADOG_API_KEY: "{{ lookup('cchq_aws_secret', 'commcare-staging/DATADOG_API_KEY', errors='ignore') | default(None) }}" 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: ''