couchbase - Secure connection to couchbase using java sdk with specific cipher suites and protocols in couchbase - couchbase tutorial - couchbase lite



import com.couchbase.client.core.endpoint.SSLEngineFactory
import com.couchbase.client.java.env.DefaultCouchbaseEnvironment
import com.couchbase.client.java.CouchbaseCluster

object CouchbaseConnection extends  App {
  
//Create default environment object. 
//Set the keystone file path(download keystone from couch base cluster) and keystore password

  val  env = DefaultCouchbaseEnvironment
    .builder()
    .sslEnabled(true)
    .sslKeystoreFile("./conf/couchbase.keystore") //
    .sslKeystorePassword("pR8PHe452353546474778r4reThUfu45678523422")
    .build();

//Get all SSL configuration for the default environment

 val sslEngineFactory = new SSLEngineFactory(env)
  val sslEngine:SSLEngine = sslEngineFactory.get()

//Set the list of enabled ciphers and transport protocols
  sslEngine.setEnabledCipherSuites(Array("TLS_RSA_WITH_AES_256_CBC_SHA"))
  sslEngine.setEnabledProtocols(Array("TLSv1.2"))

  val cluster = CouchbaseCluster.create(env,"127.0.0.1")
  // Open a bucket person
  val bucket = cluster.openBucket("person","test123")
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy Couchbase tutorial team

This couchbase tutorial provides you the following points such as couchbase , couchbase vs mongodb , couchbase vs couchdb , couchbase server , couchbase lite , couchbase download , couchbase hosting , couchbase mobile , what is couchbase , couchbase db , couchbase sync gateway , couchbase ports , couchbase pricing , couchbase training , couchbase nosql , couchbase vs cassandra , couchbase n1ql , couchbase client , couchbase community edition , couchbase memcached , couchbase couchdb , couchbase query , couchbase nodejs , couchbase connect , couchbase views , couchbase java client , couchbase lite android , couchbase cluster , couchbase install , couchbase lite ios , couchbase documentation , couchbase cli , spring data couchbase , couchbase bucket , couchbase node , couchbase architecture , php couchbase , couchbase android , couchbase server download , couchbase cache , couchbase transactions , couchbase github , spring couchbase , couchbase index , couchbase logs , couchbase create primary index , couchbase cas , couchbase version , couchbase drop index , spring boot couchbase , create primary index couchbase

Related Searches to Secure connection to couchbase using java sdk with specific cipher suites and protocols in couchbase