Support multiple assets with path as "/"

Tagged: ,

This topic has 6 replies, 3 voices, and was last updated 5 years, 10 months ago by pankajgoyal0801.

  • Author
    Posts
  • #13019
     pankajgoyal0801
    Participant

    Hi,

    I have two assets accessible as below :
    1) http://asset1.example.com/
    2) http://asset2.example.com/

    How can I support these two assets using OpenIG? As there is no path component, I cannot use requestPath match condition in 99-default.json.

    I don’t know whether it is possible or not?

    #13020
     Laurent Vaills
    Participant

    Hi,

    You should be able to differentiate these 2 assets by using request.uri.host in either the function matches like this : ${matches(request.uri.path, '^asset1') or like this : ${request.uri.host = 'asset1.example.com}

    Regards,
    Laurent

    #13024
     pankajgoyal0801
    Participant

    How can I use request.uri.host because it will always contain “openig.example.com”?

    #13026
     Laurent Vaills
    Participant

    Can you please detail a bit more the context in which you’re using OpenIG ?

    #13027
     pankajgoyal0801
    Participant

    Machine 1 – asset1 (asset1.example.com)
    Machine 2 – openig (openig.example.com)

    Browser – openig.example.com/asset1 – (Working if I use requestPath match condition)
    But if I access openig.example.com/ and I have multiple assets, then I am stuck into that problem.

    I am seeing that I can add Alias in Tomcat Conf where openig is deployed. If I add asset1.example.com as alias and redirect asset1.example.com requests from browser to Machine 2, then I think matching request uri host part will help…

    Have you got my point?

    #13067
     Mark de Reeper
    Participant

    Hi,

    In this use-case you need to alias the two different FQDN’s (asset1.example.com and asset2.example.com) to point to the instance of OpenIG and from there OpenIG can proxy though to the appropriate application, end users should not be able to hit the applications directly and always go via OpenIG for it to be working as a true proxy.

    Thanks

    Mark

    #13069
     pankajgoyal0801
    Participant

    Yes. I tried that and it worked !!

    Thanks !! :)

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?