greenriver / hmis-warehouse

The Open Path HMIS Warehouse (Warehouse) project was initiated by the City of Boston's Department of Neighborhood Development office to coordinate data across various HMIS installations and supply de-duplicated client information to the Boston CAS (https://github.com/greenriver/boston-cas).
http://openpath.host
GNU General Public License v3.0
30 stars 14 forks source link

Support comma-separated HMIS_HOSTNAME values for cors config #4746

Closed gigxz closed 1 week ago

gigxz commented 1 week ago

Please squash merge this PR

Description

Support comma-separated HMIS_HOSTNAME value. In production, this is only used to inform the cors config and for Okta.

For now, just raise if we have a multi-HMIS setup with okta. Omniauth code could probably be adapted if we need to support multi-HMIS okta installations in the future.

Multi-HMIS setup for local development is not supported.

Related to epic https://github.com/open-path/Green-River/issues/6612

🚨 I haven't meaningfully tested this locally, beyond ensuring that the cors init doesn't barf at the input. I can deploy to QA to test it, but will need to coordinate with devops to change the existing HMIS_HOSTNAME=qa-hmis.openpath.host to HMIS_HOSTNAME=qa-hmis.openpath.host,qa-hmis-2.openpath.host

Type of change

Checklist before requesting review

gigxz commented 1 week ago

@eanders here was my assessment on each of those:

  1. SeedMaker usage is only for Development (enforced by an env check). Local dev doesn't support multi-HMIS anyway, we would need to set up a second cert to have 2 host names. Probably worth doing but will be a separate ticket. I'll push a commit to update it in anticipation anyway
  2. setup.rake usage removed in https://github.com/greenriver/hmis-warehouse/pull/4747
  3. base_controller.rb like you said, only for development. Will reference in a ticket around that
gigxz commented 1 week ago

Tested this on QA, works as expected!