-
Notifications
You must be signed in to change notification settings - Fork 14
[ENG-8927] Add dev mode for forcing errors/exceptions #93
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
[ENG-8927] Add dev mode for forcing errors/exceptions #93
Conversation
Allow force-triggering selected http errors in dev mode
* Allow force-throwing authentication exceptions only in dev mode
cslzchen
left a comment
There was a problem hiding this 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.
| * <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> |
There was a problem hiding this comment.
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}| // OSF CAS Customization: a new private field devMode that stores osf-cas customized dev mode options | ||
| @NestedConfigurationProperty | ||
| private DevModeProperties devMode = new DevModeProperties(); |
There was a problem hiding this comment.
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.
|
Correction: should be |
ea4fb51
into
CenterForOpenScience:feature/angular-like-pages
* 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
…-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)
Ticket
https://openscience.atlassian.net/browse/ENG-8927
Purpose
Changes
See Purpose
Dev Notes
N/A
QA Notes
N/A
Dev-Ops Notes
ALLOW_FORCE_AUTHN_EXCEPTIONandALLOW_FORCE_HTTP_ERRORto true for staging and test serversALLOW_FORCE_AUTHN_EXCEPTIONandALLOW_FORCE_HTTP_ERRORto false for the production server