Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-28464

Client Cert based auth(X509) does not work on Vulcan

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Critical
    • 5.5.0
    • 5.5.0
    • ns_server
    • None
    • Untriaged
    • Yes

    Description

      Tested with Java SDK 2.5.1 against Vulcan 5.5.0-1979

      Java SDK spews password for 'default' bucket does not match.

      With same SDK, Spock 5.1.0-5511 worked.

       

      Here is steps to setup client certificate

      https://hub.internal.couchbase.com/confluence/display/JP/Setup+Client+Cert+based+Authentication

      Rest is java code and here is the snippet

      String username = "sdkqecertreaduser";
      JsonObject content = JsonObject.create().put("hello", "world");
      UserRole[] roles = {new UserRole("data_reader", bucketname)};
       
      assertEquals(0, initCert(username, host));
      assertEquals(true, addKey(key, content, bucketname, host));
      assertEquals(true, createUser(username, roles, bucketname, host));
       
      CouchbaseEnvironment env = DefaultCouchbaseEnvironment
              .builder()
              .sslEnabled(true)
              .sslKeystoreFile("cert/keystore.jks")
              .sslKeystorePassword("123456")
              .connectTimeout(50000)
              .computationPoolSize(5)
              .bootstrapCarrierSslPort(11207)
              .certAuthEnabled(true)
              .bootstrapHttpDirectPort(8091)
              .bootstrapHttpSslPort(18091)
              .bootstrapCarrierDirectPort(11210)
              .build();
       
      String[] nodes = {host};
      CouchbaseCluster cluster = CouchbaseCluster.create(env, nodes);
       
      Bucket bucket = null;
      try {
          bucket = cluster.openBucket(bucketname);
          result = true;
      } catch (Exception e){
          e.printStackTrace();
          result = false;
      }
      if (result) {
          try {
              assertNotEquals(bucket.get(key, 3, TimeUnit.SECONDS), null);
              Thread.sleep(1000);
       
              // Close all buckets and disconnect
              cluster.disconnect();
              result = true;
          } catch (Exception e) {
              e.printStackTrace();
              result = false;
          }
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jaekwon.park Jae Park [X] (Inactive)
            jaekwon.park Jae Park [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty