We had a similar situation ourselves. A web service call was being made from the mapping rules that included required data for the SP. When the WS call failed, we needed to halt the process. The problem is the decision to send the user has already been made and the mapping rules are only building the SAML message for the SP. There's no way to change that decision. I check for a null return value and a 200 return code, otherwise an STSModuleException is thrown with a message that this is NOT a STS Module exception.
else throw STSModuleException("Non 200 return code from 103 call. This is an application error, NOT an ISAM one. Check java logs.")
This is the only way I've gotten it to work and we've passed this by various IBM folks with the same answer. Good luck to you! It's not graceful, but it does prevent the flow from continuing to send the user along to the SP with incomplete information.
------------------------------
David Gianetti
------------------------------
Original Message:
Sent: Fri May 28, 2021 10:09 AM
From: Michael Lee
Subject: Need SAML 2.0 mapping rule to determine whether to continue with federation or redirect elsewhere.
Hi,
I have a SAML federation whose IdP mapping rule has logic to make a web service call. Depending on the results of that call, I want the mapping rule to make a determination to either continue with the federation logic with the redirect to the partner with the SAML assertion or abort the federation and redirect to another URL to display a message. How can I accomplish stopping the federation and sending a redirect to another URL?
Thanks,
Mike
------------------------------
Michael Lee
------------------------------