Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-11475

Feedback on Authentication | Couchbase Docs

    XMLWordPrintable

Details

    Description

      Java Client certificate example below should be modified as below, so user/customer using self-signed certificates can authenticate successfully. Please also see CBSE-15086 for more context.

      KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
      keyStore.load(new FileInputStream(keyStorePath), keystorePass.toCharArray());

      CertificateAuthenticator authenticator = CertificateAuthenticator.fromKeyStore(keyStore, keystorePass);
      cluster = Cluster.connect(endpoint, ClusterOptions.clusterOptions(authenticator)
      .environment(env -> env
      .securityConfig(security -> security
      .trustStore(Paths.get(keyStorePath), keystorePass, Optional.empty())
      )
      )
      );

      Browser environment: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36

      Attachments

        Activity

          People

            richard.smedley Richard Smedley
            docsite-collector Docs Site Collector
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty