March 27, 2018 at 2:00 pm #21328handatParticipant
I’ve configured the PEP filter and it works well when the SSO session is valid. However, if it is expired, then a 500 error is thrown and execution does not continue to the next filter in the chain so it cannot replace the error page with something custom. How can I handle this error condition so that I can display a custom error page? The failureHandler in the PEP filter is only used when access is denied, ie 403. How to overwrite the 500 error for the PEP filter?March 27, 2018 at 4:59 pm #21330shanParticipant
You can add a SingleSignOn filter (>= IG 5) or a scripted authentication/validation filter (< IG 5) to check if a session is present and valid. I haven’t used SingleSignOn yet but apparently it will redirect you to a login page and that’s all it can do. But with a scripted filter, you can do whatever you want.March 29, 2018 at 9:28 am #21344Joachim AndresParticipant
You may use a SwitchFilter which preceeds the PolicyEnforcementFilter and which acts on the response.
So, onResponse and if the error is a 500, divert to your very own failureHandler. It is important that the SwitchFilter preceeds the PEF as on the response filters are executed in the reverse order.
JoachimMarch 29, 2018 at 9:38 am #21345handatParticipant
Actually, I figured it out. I was mistakenly expecting the filter that follows the PEP filter to be able to handle the error, but it turns out the filter before the PEP filter actually does it. I had the PEP filter sandwiched between two custom scripted filters and debugging the wrong filter, ie the one after and not the one before.
You must be logged in to reply to this topic.