You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Pankaj Kumar Bhadani <pa...@ericsson.com> on 2021/09/16 09:16:32 UTC

Ignite SSL mode with PEM format certs

Hi Team,

I am using ignite-core in containerized environment, and I have integrated ignite with my containerize application it works fine.
I now want to enable SSL within the ignite nodes for cluster communication.

I have got certs in pem format

  *   srvcert.pem
  *   cacertbundle.pem
  *   srvprivkey.pem

Ignite API for SSL configuration

SslContextFactory factory = new SslContextFactory();

                                factory.setKeyStoreFilePath("certs/srvcert.pem");
                                factory.setKeyStorePassword(PASSWORD1.toCharArray());
                                factory.setTrustStoreFilePath("certs/srvcert.pem");
                                factory.setTrustStorePassword(PASSWORD2.toCharArray());
                                factory.setProtocol("TLSv1.2");
                                igniteCfg.setSslContextFactory(factory);

Is there a way ignite can consume the certs in pem format that is available?

If not what is the best way out here. And if any documentation for same is available

Thanks,
Pankaj Bhadani


Re: Ignite SSL mode with PEM format certs

Posted by Stephen Darlington <st...@gridgain.com>.
Ignite just plugs into the Java-standard SSL libraries. There are libraries you could integrate that enable Java to use PEM certs. Alternatively, you could just convert the certificates before loading them into Ignite. See here: https://stackoverflow.com/questions/2138940/import-pem-into-java-key-store <https://stackoverflow.com/questions/2138940/import-pem-into-java-key-store>

Regards,
Stephen

> On 16 Sep 2021, at 10:16, Pankaj Kumar Bhadani <pa...@ericsson.com> wrote:
> 
> Hi Team,
>  
> I am using ignite-core in containerized environment, and I have integrated ignite with my containerize application it works fine.
> I now want to enable SSL within the ignite nodes for cluster communication.
>  
> I have got certs in pem format
> srvcert.pem
> cacertbundle.pem
> srvprivkey.pem
>  
> Ignite API for SSL configuration
>  
> SslContextFactory factory = new SslContextFactory();
>  
>                                 factory.setKeyStoreFilePath("certs/srvcert.pem");
>                                 factory.setKeyStorePassword(PASSWORD1.toCharArray());
>                                 factory.setTrustStoreFilePath("certs/srvcert.pem");
>                                 factory.setTrustStorePassword(PASSWORD2.toCharArray());
>                                 factory.setProtocol("TLSv1.2");
>                                 igniteCfg.setSslContextFactory(factory);
>  
> Is there a way ignite can consume the certs in pem format that is available?
>  
> If not what is the best way out here. And if any documentation for same is available
>  
> Thanks,
> Pankaj Bhadani



RE: Ignite SSL mode with PEM format certs

Posted by Pankaj Kumar Bhadani <pa...@ericsson.com>.
FYI.

From: Pankaj Kumar Bhadani
Sent: Thursday, September 16, 2021 2:47 PM
To: 'user@ignite.apache.org' <us...@ignite.apache.org>; 'Ilya Kazakov' <ka...@gmail.com>
Subject: Ignite SSL mode with PEM format certs

Hi Team,

I am using ignite-core in containerized environment, and I have integrated ignite with my containerize application it works fine.
I now want to enable SSL within the ignite nodes for cluster communication.

I have got certs in pem format

  *   srvcert.pem
  *   cacertbundle.pem
  *   srvprivkey.pem

Ignite API for SSL configuration

SslContextFactory factory = new SslContextFactory();

                                factory.setKeyStoreFilePath("certs/srvcert.pem");
                                factory.setKeyStorePassword(PASSWORD1.toCharArray());
                                factory.setTrustStoreFilePath("certs/srvcert.pem");
                                factory.setTrustStorePassword(PASSWORD2.toCharArray());
                                factory.setProtocol("TLSv1.2");
                                igniteCfg.setSslContextFactory(factory);

Is there a way ignite can consume the certs in pem format that is available?

If not what is the best way out here. And if any documentation for same is available

Thanks,
Pankaj Bhadani