Skip to content

Conversation

@cslzchen
Copy link
Contributor

Ticket

https://openscience.atlassian.net/browse/ENG-8927

Purpose

  • Add configuration settings to set dev mode options
  • Only allow forcing errors/exceptions in dev mode

Changes

See Purpose

Dev Notes

N/A

QA Notes

N/A

Dev-Ops Notes

  • Set ALLOW_FORCE_AUTHN_EXCEPTION and ALLOW_FORCE_HTTP_ERROR to true for staging and test servers
  • Set ALLOW_FORCE_AUTHN_EXCEPTION and ALLOW_FORCE_HTTP_ERROR to false for the production server

Copy link
Contributor Author

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For CR: as mentioned in other PRs, for overlayed and customized classes (CasServerProperties.java in this PR's case), only need to check the commented part for our customizations.

Comment on lines +21 to +23
* <p>OSF CAS Customization: add {@link DevModeProperties devMode} to {@link CasServerProperties}; this allows
* dev mode options to be easily accessed from {@link org.apereo.cas.configuration.CasConfigurationProperties}
* by calling {@code casProperties.getServer().getDevMode()}.</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For CR: needs to overlay class CasServerProperties (cas.server in settings) to add our DevModeProperties (.dev-mode.* in settings), e.g.:

cas.server.dev-mode.allow-force-authn-exception=${ALLOW_FORCE_AUTHN_EXCEPTION:false}
cas.server.dev-mode.allow-force-http-error=${ALLOW_FORCE_HTTP_ERROR:false}

Comment on lines +66 to +68
// OSF CAS Customization: a new private field devMode that stores osf-cas customized dev mode options
@NestedConfigurationProperty
private DevModeProperties devMode = new DevModeProperties();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For CR: the only customization in this class is to simply adding DevModeProperties as NestedConfigurationProperty.

@cslzchen cslzchen changed the title [ENG-8927] Add dev mode for forcing errors/excpetions [ENG-8927] Add dev mode for forcing errors/exceptions Sep 15, 2025
@cslzchen
Copy link
Contributor Author

cslzchen commented Sep 15, 2025

Correction: should be CasServerProperties instead of CasConfigurationPropertiesin in dd91514, will fix commit message during squash merge.

@cslzchen cslzchen merged commit ea4fb51 into CenterForOpenScience:feature/angular-like-pages Sep 15, 2025
1 check passed
cslzchen added a commit that referenced this pull request Sep 30, 2025
* Overlay CasServerProperties as of apereo-cas 6.2.8
* Create a new DevModeProperties to set dev mode options and add it to CasServerProperties
* Enable dev mode for SimpleUrlHandlerMapping and OsfPrincipalFromNonInteractiveCredentialsAction
* Only force-triggering selected http errors and authentication exceptions in dev mode
cslzchen added a commit that referenced this pull request Sep 30, 2025
…-pages

Update CAS FE to match angular OSF

* [ENG-8793] [ENG-8785] [ENG-8793] Remove branded login + Update no service pages + Update OAuth workflow (#98)
* [ENG-8788] [ENG-8786] Institutions page and TOS page redesign (#99)
* [ENG-8789] [ENG-8790] [ENG-8791] Exception Page rework (#95)
* [ENG-8787] Username/password and 2FA login page (#97)
* [ENG-8791] Inserting CasProperties into Spring Dispatcher and Improve header and left pane UI/UX (#92)
* [ENG-8927] Add dev mode for forcing errors/exceptions (#93)
* [NOTICKET] Remove OSF Collections URL from cas.properties (#91)
* [ENG-8556] Update CAS pages to match Angular update: header, footer and left pane (#88)
* [ENG-8754] Force throw a few HTTP errors for testing purpose (#90)
* [ENG-8792] Force CAS to throw exceptions and display error pages (#87)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants