You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an OIDC provider is configured for a CHT instance, the logic page should show a button to allow the user to "Login with SSO". Selecting this button should cause the user to be re-directed to the SSO login page.
Get the redirect URL from openid-client (might be the buildAuthorizationUrl function?)
Consider making an oidc service in the API to manage the openid-client functionality
The client_secret for communicating with the OIDC provider should be stored/loaded as a CHT credentials value. See the outbound push password_key functionality for an example of how to do this.
When a user visits /medic/login, the renderLogin function in api/src/controllers/login.js should serve the login page with the redirect button enabled/disabled based on config.
jkuester
changed the title
Update API login controller to redirect to OIDC provider when one is configured
Update CHT login page to have button for redirecting to OIDC provider
Jan 30, 2025
The client_secret for communicating with the OIDC provider should be stored/loaded as a CHT credentials value. See the outbound push password_key functionality for an example of how to do this.
@dianabarsan can you confirm for me that this makes sense before we go through the trouble of implementing it this way? Basically for the CHT to be a confidential OIDC client, it needs a shared secret with the OIDC Provider. (E.g. a random value generated by the OIDC Provider.) The CHT api server needs to be able to access this secret when communicating with the OIDC Provider so that the OIDC Provider knows it is talking to the expected client. We could just load the secret from the app_settings, but it seems more secure to treat the secret as a password (since it basically is) and load it from the credentials store. Is there a better way for storing sensitive values in the CHT or is this what you would recommend? Thanks!
openid-client
(might be thebuildAuthorizationUrl
function?)openid-client
functionalitypassword_key
functionality for an example of how to do this./medic/login
, therenderLogin
function inapi/src/controllers/login.js
should serve the login page with the redirect button enabled/disabled based on config.The text was updated successfully, but these errors were encountered: