US-EPA-CAMD / easey-ui

Project Management repo for EPA Clean Air Markets Division (CAMD) Business Suite of applications
MIT License
0 stars 0 forks source link

Add Basic "Down for Maintenance" Message #6272

Open mark-hayward-erg opened 3 months ago

mark-hayward-erg commented 3 months ago

We need to add a simple method for disabling user logins to ECMPS 2.0 (driven by downtime that will be necessary during the transition to ICAM for authentication).

A more robust version of this will be implemented later (see #6243)

We should add a new environment variable (EASEY_AUTH_API_DISABLE_LOGIN) for the auth-api app.

If EASEY_AUTH_API_DISABLE_LOGIN is set to true, display the message "ECMPS is currently down for maintenance." instead of the normal "Log In" form:

Image

Acceptance criteria:

IkeC-dpc commented 3 months ago

Verified #6272 in ECMPS DEV: https://ecmps-dev.app.cloud.gov/

Steps:

  1. Go to ECMPS DEV and ensure that the "Login" is Enabled
  2. Set the Environment Variable EASEY_AUTH_API_DISABLE_LOGIN to "true"
  3. Then go back to ECMPS DEV and ensure that the "Login" in now Disabled
  4. Set the Environment Variable EASEY_AUTH_API_DISABLE_LOGIN to "false"
  5. Then go back to ECMPS DEV and ensure that the "Login" in now Enabled

Screenshots:

image image
ibarra-michelle commented 2 months ago

FYI - @mark-hayward-erg @spetros-do

Unable to verify in test. The EASEY_AUTH_API_DISABLE_LOGIN is missing from the test env, however, I do see it in the dev env.

Steps:

  1. Login to cloud.gov, target the easey-org and test space.
  2. View the auth-api's environmental variables (cf env auth-api)
  3. The EASEY_AUTH_API_DISABLE_LOGIN is missing from the User-Provided env variables list.
spetros-do commented 2 months ago

@ibarra-michelle @mark-hayward-erg We plan to implement same solution to test env.

ibarra-michelle commented 2 months ago

Verified in test, pending text change. I was able to set the EASEY_AUTH_API_DISABLE_LOGIN to true, restage the app, clicked the "Log in" button, then and I received the notification, "ECMPS 2.0 Login is disabled due to Maintenance. please contact information for further assistance." (see the screenshot below). I set the EASEY_AUTH_API_DISABLE_LOGIN to false, restaged the app, and was able to successfully login to ECMPS 2.0.

Ticket #6243 will address updating the disabled message to state, "The ECMPS 2.0 Login has been disabled due to maintenance. Please read the notifications in home page’s "What's New" box and ECMPS Newsletter. For further assistance, please contact us.” Note, a link to our current ECMPS Beta "Contact Us" form as that will likely change.

image