Hi,

I am trying add ssl security for the ignite to access iginte REST API using
HTTPS. I have fallowed below steps:

I have enabled the ssl by adding below configurations.

        <property name="connectorConfiguration">
            <bean
class="org.apache.ignite.configuration.ConnectorConfiguration">
                <property name="jettyPath"
value="/home/test/jetty-server.xml" />
                <property name="sslEnabled" value="true"/>

                <property name="sslClientAuth" value="true"/>
            </bean>
        </property>

            <property name="sslContextFactory">
                  <bean class="org.apache.ignite.ssl.SslContextFactory">
                        <property name="protocol" value="SSL"/>
                        <property name="keyStoreFilePath"
value="/opt/ssl/ignite-keystore.jks" />
                        <property name="keyStorePassword" value="test1234"
/>
                        <property name="trustStoreFilePath"
value="/opt/ssl/ignite-truststore.jks" />
                        <property name="trustStorePassword"
value="test1234" />
                  </bean>
            </property>


I am able to see [authentication=off, tls/ssl=on]  in the logs.


Getting below error when I tried to access REST API using HTTPS request .

curl https://localhost:8443/ignite?cmd=version
curl: (35) SSL received a record that exceeded the maximum permissible
length.

If i try with http it's working
curl http://localhost:8080/ignite?cmd=version


Please let me know the configurations to enable SSL and access REST API
using HTTPS

-- 
*Regards*
*Sheshananda Naidu,*
*+91-9035063060*
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd";>
<Configure id="Server" class="org.eclipse.jetty.server.Server">
    <Arg name="threadPool">
        <!-- Default queued blocking thread pool -->
        <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
            <Set name="minThreads">20</Set>
            <Set name="maxThreads">200</Set>
        </New>
    </Arg>
    <New id="httpCfg" class="org.eclipse.jetty.server.HttpConfiguration">
        <Set name="secureScheme">https</Set>
        <Set name="securePort">8443</Set>
        <Set name="sendServerVersion">true</Set>
        <Set name="sendDateHeader">true</Set>
    </New>
    <Call name="addConnector">
        <Arg>
            <New class="org.eclipse.jetty.server.ServerConnector">
                <Arg name="server"><Ref refid="Server"/></Arg>
                <Arg name="factories">
                    <Array type="org.eclipse.jetty.server.ConnectionFactory">
                        <Item>
                            <New class="org.eclipse.jetty.server.HttpConnectionFactory">
                                <Ref refid="httpCfg"/>
                            </New>
                        </Item>
                    </Array>
                </Arg>
                <Set name="host">
                  <SystemProperty name="IGNITE_JETTY_HOST" default="localhost"/>
                </Set>
                <Set name="port">
                  <SystemProperty name="IGNITE_JETTY_PORT" default="8080"/>
                </Set>
                <Set name="idleTimeout">30000</Set>
                <Set name="reuseAddress">true</Set>
            </New>
        </Arg>
    </Call>
    <Set name="handler">
        <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
            <Set name="handlers">
                <Array type="org.eclipse.jetty.server.Handler">
                    <Item>
                        <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
                    </Item>
                </Array>
            </Set>
        </New>
    </Set>
    <Set name="stopAtShutdown">false</Set>
</Configure>

Reply via email to