Я думаю, что смог решить эту проблему.
Я изменил метод org.wso2.carbon.identity.application.authenticator.samlsso.manager.DefaultSAML2SSOManager.buildAuthnRequest(HttpServletRequest, boolean, String, AuthenticationContext)
. Сразу после инструкции
//Get the inbound SAMLRequest
AuthnRequest inboundAuthnRequest = getAuthnRequest(context);
я добавил следующий фрагмент кода:
Integer attrConsServiceIndex = inboundAuthnRequest.getAttributeConsumingServiceIndex();
if( attrConsServiceIndex != null && attrConsServiceIndex > 0 ) {
if( log.isInfoEnabled() ) {
log.info("Inbound SAML Request AttributeConsumingServiceIndex "+ attrConsServiceIndex+" Settato nella auth request SAML");
}
authRequest.setAttributeConsumingServiceIndex(attrConsServiceIndex);
}
Таким образом, если приложение, обрабатываемое поставщиком услуг, отправляет AttributeConsumingServiceIndex, отличный от 0, этоустановите в AuthnRequest, что WSO2 IS строит для внешнего IdP. Я не знаю, есть ли другой способ ее решения, но насколько я исследовал, это единственное решение, которое я нашел
Надеюсь, это полезно
Angelo