-
-
Save sauthieg/4e53a822d68935c072a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"heap": { | |
"objects": [ | |
{ | |
"name": "LogSink", | |
"comment": "Default sink for logging information.", | |
"type": "ConsoleLogSink", | |
"config": { | |
"level": "DEBUG" | |
} | |
}, | |
{ | |
"name": "DispatchHandler", | |
"type": "DispatchHandler", | |
"config": { | |
"bindings": [ | |
{ | |
"condition": "${matches(exchange.request.uri.path, '^/saml')}", | |
"handler": "SamlFederationHandler" | |
}, | |
{ | |
"condition": "${empty exchange.session.username}", | |
"handler": "SPInitiatedSSORedirectHandler" | |
}, | |
{ | |
"condition": "${not exchange.session.authConfirmed}", | |
"handler": "LoginChain" | |
}, | |
{ | |
"handler": "OutgoingChain" | |
} | |
] | |
} | |
}, | |
{ | |
"name": "SamlFederationHandler", | |
"type": "org.forgerock.openig.handler.saml.SamlFederationHandler", | |
"config": { | |
"assertionMapping": { | |
"username": "mail", | |
"password": "employeenumber" | |
}, | |
"subjectMapping": "subjectName", | |
"redirectURI": "http://jasper.com/jasperserver" | |
} | |
}, | |
{ | |
"name": "SPInitiatedSSORedirectHandler", | |
"type": "StaticResponseHandler", | |
"config": { | |
"status": 302, | |
"reason": "Found", | |
"headers": { | |
"Location": [ | |
"http://www.panda.com/saml/SPInitiatedSSO" | |
] | |
} | |
} | |
}, | |
{ | |
"name": "LoginChain", | |
"type": "Chain", | |
"config": { | |
"filters": [ | |
"LoginRequest", "PortalLoginCaptureFilter" | |
], | |
"handler": "ClientHandler" | |
} | |
}, | |
{ | |
"name": "LoginRequest", | |
"type": "StaticRequestFilter", | |
"config": { | |
"method": "POST", | |
"uri": "http://jasper.com/jasperserver/j_spring_security_check", | |
"form": { | |
"j_username": [ | |
"${exchange.session.username}" | |
], | |
"j_password": [ | |
"${exchange.session.password}" | |
] | |
} | |
} | |
}, | |
{ | |
"name": "PortalLoginCaptureFilter", | |
"type": "AssignmentFilter", | |
"config": { | |
"onResponse": [ | |
{ | |
"comment": "Are you sure that a succesful authentication only gives you a 302 ?", | |
"condition": "${exchange.response.status == 302}", | |
"target": "${exchange.session.authConfirmed}", | |
"value": "${true}" | |
} | |
] | |
} | |
}, | |
{ | |
"name": "OutgoingChain", | |
"type": "Chain", | |
"config": { | |
"filters": [ ], | |
"handler": "ClientHandler" | |
} | |
}, | |
{ | |
"name": "ClientHandler", | |
"type": "ClientHandler", | |
"config": {} | |
} | |
] | |
}, | |
"handlerObject": "DispatchHandler" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment