Skip to content

Instantly share code, notes, and snippets.

Created October 5, 2014 22:29
Show Gist options
  • Save anonymous/7518a962f3765d532dde to your computer and use it in GitHub Desktop.
Save anonymous/7518a962f3765d532dde to your computer and use it in GitHub Desktop.
{
"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": "${exchange.session.authConfirmed !='true'}",
"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"
],
"filters": [
"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": {
"onRequest": [
{
"target": "${exchange.session.username}",
"value": "${exchange.request.form['j_username'][0]}"
},
{
"target": "${exchange.session.password}",
"value": "${exchange.request.form['j_password'][0]}"
},
{
"comment": "Indicates authentication has not yet been confirmed.",
"target": "${exchange.session.authConfirmed}",
"value": "${false}"
}
],
"onResponse": [
{
"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