Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "heap": {
- "objects": [
- {
- "name": "LogSink",
- "comment": "Default sink for logging information.",
- "type": "ConsoleLogSink",
- "config": {
- "level": "ALL"
- }
- },
- {
- "name": "DispatchServlet",
- "type": "DispatchServlet",
- "config": {
- "bindings": [
- {
- "pattern":"^/saml",
- "object":"FederationServlet"
- },
- {
- "pattern":".*",
- "object":"HandlerServlet"
- }
- ]
- }
- },
- {
- "name": "FederationServlet",
- "type": "org.forgerock.openig.saml.FederationServlet",
- "config": {
- "assertionMapping": {
- "userName":"uname",
- "password":"pwd"
- },
- "subjectMapping":"subjectName",
- "redirectURI":"http://192.168.45.127:8080/wp-login.php"
- }
- },
- {
- "name": "HandlerServlet",
- "type": "HandlerServlet",
- "config": {
- "handler": "DispatchHandler",
- "baseURI":"http://10.10.0.3"
- }
- },
- {
- "name": "DispatchHandler",
- "type": "DispatchHandler",
- "config": {
- "bindings": [
- {
- "condition": "${exchange.request.uri.path == '/wp-login.php'}",
- "handler": "LoginChain",
- },
- {
- "condition": "${empty exchange.session.userName}",
- "handler": "SPInitiatedSSORedirectHandler",
- },
- {
- "handler": "ClientHandler",
- },
- ]
- }
- },
- {
- "name": "SPInitiatedSSORedirectHandler",
- "type": "StaticResponseHandler",
- "config": {
- "status": 302,
- "reason": "Found",
- "headers": {
- "Location": ["http://192.168.45.127:8080/saml/SPInitiatedSSO"]
- }
- }
- },
- {
- "name": "LoginChain",
- "type": "Chain",
- "config": {
- "filters": ["LoginRequestFilter", "CaptureFilter"],
- "handler": "ClientHandler"
- }
- },
- {
- "name": "LoginRequestFilter",
- "type": "StaticRequestFilter",
- "config": {
- "method": "POST",
- "uri": "http://10.10.0.3/wp-login.php",
- "form": {
- "log": ["${exchange.session.userName}"],
- "pwd": ["${exchange.session.password}"],
- "rememberme": ["forever"],
- "redirect_to" : ["http://192.168.45.127:8080/wp-admin/"],
- "testcookie": ["1"]
- }
- }
- },
- {
- "name": "CaptureFilter",
- "comment": "Log all requests to file",
- "type": "CaptureFilter",
- "config": {
- "captureEntity": true,
- "file": "/tmp/gateway.log"
- }
- },
- {
- "name": "ClientHandler",
- "type": "ClientHandler",
- "config": {
- }
- },
- ]
- },
- "servletObject": "DispatchServlet",
- }
Advertisement
Add Comment
Please, Sign In to add comment