Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9273881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:13:06+00:00 2026-06-18T16:13:06+00:00

I have been trying this OpenIG Identity Gateway from the ForgeRock guys to integrate

  • 0

I have been trying this OpenIG Identity Gateway from the ForgeRock guys to integrate some legacy systems in this case in particular I’m using it with OpenACS+.LRN a project, from Ars Digita and different institutions.

Here’s the problem: Using the recipes found in the OpenIG documentation to extract hidden values and reply the cookies of the requests to avoid security issues, I got a successful POST request to get logged into the system but after the request, the OpenACS log tells me thet the initial petition requested something like http://10.10.10.10/register rather than the real client petition http://openacs-domain.com/register and breaks to a 302 redirect to the IP direction to make a new login.

I have modified the /etc/hosts to check if it performs the name resolution with no success.

The curious thing is that if I back to the domain when the initial request was made, I have a valid initiated session and everything is cool.

I hope I have been descriptive enough and somebody has a solution for this. I will attach my config.json

    {
  "heap": {
    "objects": [
    {
        "name": "HandlerServlet",
        "comment": "Entry point that transforms Servlet request to handler request.",
        "type": "HandlerServlet",
        "config": {
            "handler": "DispatchHandler",
            "baseURI":"http://10.10.10.10"
        }
    },
    {      
        "name": "DispatchHandler",
        "type": "DispatchHandler",
        "config": {
            "bindings": [  
                {                      
                    "condition": "${exchange.request.uri.path == '/register/'}",
                    "handler": "LoginChain"
                },
                {                      
                    "handler": "OutgoingChain",
                },
            ]  
        }  
    },
    {
        "name": "LoginChain",
        "type": "Chain",
        "config": {
            "filters": ["SwitchFilter", "HiddenValueExtract"],
            "handler": "OutgoingChain"
        }  
    },
    {
        "name": "HiddenValueExtract",
        "type": "EntityExtractFilter",
        "config": {
            "messageType": "response",
            "target": "${exchange.hiddenValue}",
            "bindings": [
                {
                    "key": "time",
                    "pattern": "time\"\s.*value=\"(.{10})\"",
                    "template": "$1"
                },
                {
                    "key": "tokenId",
                    "pattern": "token_id\"\s.*value=\"(.{3})\"",
                    "template": "$1"
                },
                {
                    "key": "hash",
                    "pattern": "hash\"\s.*value=\"(.*)\"",
                    "template": "$1"
                }
            ]
        }       
    },
    {
        "name": "SwitchFilter",
        "type": "SwitchFilter",
        "config": {
            "onResponse": [
                {
                    "condition": "${exchange.response.status == 200}",
                    "handler": "LoginRequestHandler"
                }
            ]
        }
    },
    {
        "name": "LoginRequestHandler",
        "type": "Chain",
        "config": {
            "filters": ["LoginRequest"],
            "handler": "OutgoingChain"
        }  
    },
    {  
        "name": "LoginRequest",
        "type": "StaticRequestFilter",
        "config": {
            "method": "POST",
            "uri": "http://10.10.10.10/register/",
            "form": {
                "form:mode": ["edit"],
                "form:id": ["login"],
                "__confirmed_p": ["0"],
                "__refreshing_p": ["0"],
                "return_url": ["/dotlrn/control-panel"],
                "time": ["${exchange.hiddenValue.time}"],
                "token_id": ["${exchange.hiddenValue.tokenId}"],
                "hash": ["${exchange.hiddenValue.hash}"]
                "email": ["user.example@gmail.com"],
                "password": ["password"]
            }
            "headers": {
                "cookie": ["${exchange.response.headers['Set-Cookie'][0]}"],
            }  
        }  
    },
    {
        "name": "OutgoingChain",
        "type": "Chain",
        "config": {
            "filters": ["CaptureFilter"],
            "handler": "ClientHandler"
        }  
    },
    {  
        "name": "CaptureFilter",
        "type": "CaptureFilter",
        "config": {
            "captureEntity": false,
            "file": "/tmp/gateway.log",
        }      
    },
    {
        "name": "ClientHandler",
        "comment": "Responsible for sending all requests to remote servers.",
        "type": "ClientHandler",
        "config": {
            }
        }
    ]
  },
  "servletObject": "HandlerServlet",
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:13:07+00:00Added an answer on June 18, 2026 at 4:13 pm

    This is the final version:

    {
    
    
    "heap": {
        "objects": [
        {
            "name": "LogSink",
            "comment": "Default sink for logging information.",
            "type": "ConsoleLogSink",
            "config": {
                "level": "DEBUG",
            }
        },
        {
            "name": "DispatchServlet",
            "type": "DispatchServlet",
            "config": {
                "bindings": [
                    {
                        "pattern":"^/saml",
                        "object":"FederationServlet"
                    },
                    {
                        "pattern":"",
                        "object":"HandlerServlet"
                    }
                ]
            }
        },
        {
            "name": "FederationServlet",
            "type": "org.forgerock.openig.saml.FederationServlet",
            "config": {
                "assertionMapping": {
                    "userName":"mail",
                    "password":"employeenumber"
                },
                "subjectMapping":"subjectName",
                "redirectURI":"/register",
                "logoutURI":"/register/logout"
             }
        },
        {
            "name": "HandlerServlet",
            "comment": "Entry point that transforms Servlet request to handler request.",
            "type": "HandlerServlet",
            "config": {
                "handler": "DispatchHandler",
                "baseURI":"http://www.plataformaciapem.org.mx"
            }
        },
        {      
            "name": "DispatchHandler",
            "type": "DispatchHandler",
            "config": {
                "bindings": [  
                    {                      
                        "condition": "${exchange.request.uri.path != '/register/'}",
                        "handler": "ClientHandler"
                    },
                    {
                        "condition": "${empty exchange.session.userName}",
                        "handler": "SPInitiatedSSORedirectHandler",
                    },
                    {                      
                        "handler": "LoginChain",
                    },
                ]  
            }  
        },
         {
            "name": "SPInitiatedSSORedirectHandler",
               "type": "StaticResponseHandler",
               "config": {
                   "status": 302,
                   "reason": "Found",
                   "headers": {
                       "Location": ["http://www.plataformaciapem.org.mx/saml/SPInitiatedSSO"]
                   }
               }
        },
        {
            "name": "LoginChain",
            "type": "Chain",
            "config": {
                "filters": ["SwitchFilter", "HiddenValueExtract"],
                "handler": "OutgoingChain"
            }  
        },
        {
            "name": "HiddenValueExtract",
            "type": "EntityExtractFilter",
            "config": {
                "messageType": "response",
                "target": "${exchange.hiddenValue}",
                "bindings": [
                    {
                        "key": "time",
                        "pattern": "time\"\s.*value=\"(.{10})\"",
                        "template": "$1"
                    },
                    {
                        "key": "tokenId",
                        "pattern": "token_id\"\s.*value=\"(.{3})\"",
                        "template": "$1"
                    },
                    {
                        "key": "hash",
                        "pattern": "hash\"\s.*value=\"(.*)\"",
                        "template": "$1"
                    }
                ]
            }       
        },
        {
            "name": "SwitchFilter",
            "type": "SwitchFilter",
            "config": {
                "onResponse": [
                    {
                        "condition": "${exchange.response.status == 200}",
                        "handler": "LoginRequestHandler"
                    }
                ]
            }
        },
        {
            "name": "LoginRequestHandler",
            "type": "Chain",
            "config": {
                "filters": ["LoginRequest"],
                "handler": "OutgoingChain"
            }  
        },
        {  
            "name": "LoginRequest",
            "type": "StaticRequestFilter",
            "config": {
                "method": "POST",
                "uri": "http://www.plataformaciapem.org.mx/register/",
                "form": {
                    "form:mode": ["edit"],
                    "form:id": ["login"],
                    "__confirmed_p": ["0"],
                    "__refreshing_p": ["0"],
                    "return_url": ["/dotlrn/control-panel"],
                    "time": ["${exchange.hiddenValue.time}"],
                    "token_id": ["${exchange.hiddenValue.tokenId}"],
                    "hash": ["${exchange.hiddenValue.hash}"]
                    "email": ["${exchange.session.userName}"],
                    "password": ["${exchange.session.password}"],
                }
                "headers": {
                    "cookie": ["${exchange.response.headers['Set-Cookie'][0]}"],
                }  
            }  
        },
        {
            "name": "OutgoingChain",
            "type": "Chain",
            "config": {
                "filters": ["CaptureFilter"],
                "handler": "ClientHandler"
            }  
        },
        {  
            "name": "CaptureFilter",
            "type": "CaptureFilter",
            "config": {
                "captureEntity": false,
                "file": "/tmp/gateway.log",
            }      
        },
        {
            "name": "ClientHandler",
            "comment": "Responsible for sending all requests to remote servers.",
            "type": "ClientHandler",
            "config": {
                }
            }
        ]
      },
      "servletObject": "DispatchServlet",
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Guide me through this exception. I have been trying to send a file from
I have been trying this for hours without success. http://replicaisland.googlecode.com/svn/trunk/ I have added the
I've been trying this: NSNumberFormatter *testNumber=[NSNumberFormatter new]; if (![testNumber numberFromString:someNSString]) I have been told
Is there anyone who knows this? I have been trying this for the last
i have been trying to validate This Form: <table> <form action=test.html method=post id=contactform name=contactform>
I have been trying to do this on an app for a long time
I have been trying to figure this out for quite a while, but what
I have been trying to get this one section of my UI to immediatly
I have been trying to figure this out for way to long tonight. I
I have been trying to make this to be a little jQuery plugin that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.