Internal IP adress in user connection exept of external

Hi,

i have app deployed on local server. App is accesible via url https://someapp.sk:8080/app but in user sessions i can see only internal user IP adress such as 192.168.1.1 and so on.

App is deployed via uberJar file. How can i achieve i will get public ip address in cuba application so i can use ip restrictions on user?

Hi,
Check these topics:

Hi Alex,

how to approach this if my jetty.xml looks like this due HTTPS enabled. Sorry for question but this is totaly new for me :slight_smile:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
    <Call name="addConnector">
        <Arg>
            <New class="org.eclipse.jetty.server.ServerConnector">
                <Arg name="server">
                    <Ref refid="Server"/>
                </Arg>
                <Set name="port">8090</Set>
            </New>
        </Arg>
    </Call>
    <Call name="addConnector">
        <Arg>
            <New class="org.eclipse.jetty.server.ServerConnector">
                <Arg name="server">
                    <Ref refid="Server"/>
                </Arg>
                <Arg>
                    <New class="org.eclipse.jetty.util.ssl.SslContextFactory">
                        <Set name="keyStorePath">some.keystore</Set>
                        <Set name="keyStorePassword">pass</Set>
                        <Set name="keyManagerPassword">pass</Set>
                        <Set name="trustStorePath">some.keystore</Set>
                        <Set name="trustStorePassword">pass</Set>
                    </New>
                </Arg>
                <Set name="port">8443</Set>
            </New>
        </Arg>
    </Call>
</Configure>

@AlexBudarov is there any solution how to use ForwardRequestCustomizer with https active?

what am i going for is using builtin “ip acces rule” for user.

Hi,

In the documentation there are two examples:

With ForwardRequestCustomizer:
https://doc.cuba-platform.com/manual-7.2/proxy_configuration_uberjar.html

With SSL:
https://doc.cuba-platform.com/manual-7.2/uberjar_https.html

You can combine them two.
I don’t have working production jetty-env.xml files with me, so I can’t give you exact working example.

Also note that UberJar is based on Jetty server. Jetty is not part of CUBA, it is a separate library, so you can find in the internet about how to configure all Jetty-associated settings.

Even combined it is not working as expected. Still getting local network IP address except of external one.