Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework password expiration template messages customization (#30) #31

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pmauduit
Copy link
Member

Reading the Java class mentioned in issue #30, it seems that only 2 properties were modified in the original messages.properties from the classpath (what about the other languages ?).

This commit should provide the same behaviour as the original PR. I had to reintroduce the pwdupdateform.html fragment from upstream, and customize the (hardcoded ?) URLs to get into the console webservices meant for password management. FTR, the original template is here:
https://github.com/apereo/cas/blob/6.6.x/support/cas-server-support-thymeleaf/src/main/resources/templates/fragments/pwdupdateform.html

BTW, it looks like CAS provides such password management from the user on its own code, via an optional module:
https://apereo.github.io/cas/7.0.x/password_management/Password-Management-Reset.html
but since we already have the feature provided by the console, it makes probably more sense to make use of them instead.

Note: I am not sure why the password.expiration.warning does not seem to be used in any templates in the CAS6.6 codebase.

Note2: we might want to be able to customize the console's endpoint url from the datadir, but since they were hardcoded in the java class, at least we are isofunctional here.

tests: runtime, using https://github.com/georchestra/sample-docker-composition/tree/main/cas/password-expiration

  • tested with english & french locales.

… password rotation policy is enabled"

This reverts commit 480baea.
Reading the Java class mentioned in issue #30, it seems that
only 2 properties were modified in the original messages.properties from
the classpath (what about the other languages ?).

This commit should provide the same behaviour as the original PR. I had
to reintroduce the pwdupdateform.html fragment from upstream, and
customize the (hardcoded ?) URLs to get into the console webservices
meant for password management. FTR, the original template is here:
https://github.com/apereo/cas/blob/6.6.x/support/cas-server-support-thymeleaf/src/main/resources/templates/fragments/pwdupdateform.html

BTW, it looks like CAS provides such password management from the user
on its own code, via an optional module:
https://apereo.github.io/cas/7.0.x/password_management/Password-Management-Reset.html
but since we already have the feature provided by the console, it makes
probably more sense to make use of them instead.

Note: I am not sure why the `password.expiration.warning` does not
seem to be used in any templates in the CAS6.6 codebase.

Note2: we might want to be able to customize the console's endpoint url
from the datadir, but since they were hardcoded in the java class, at
least we are isofunctional here.

tests: runtime, using
https://github.com/georchestra/sample-docker-composition/tree/main/cas/password-expiration
- tested with english & french locales.
unrelated but makes the CICD fail.
@pmauduit pmauduit changed the title Rework passwordexpiration 30 Rework password expiration template messages customization (#30) Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant