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

cbq needs dummy user when using encrypted private key with passphrase

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.1.0
    • 7.1.0
    • query
    • 7.1.0-1540
    • Untriaged
    • 1
    • Unknown

    Description

      To repro, setup client certificate and convert private key to encrypted pkcs8.

      # /opt/couchbase/bin/cbq -e https://172.23.104.90 -cacert ../ca.pem -cert travel-sample.pem -key travel-sample-pkcs8-crypt-v2.key -p mypass
       ERROR 100 : x509KeyPair: parsePrivateKey returned err: parsePrivateKey: failed to parse private key. Error: asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:64 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} int @2; asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:64 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} int @2; x509: failed to parse EC private key: asn1: structure error: tags don't match (2 vs {class:0 tag:16 length:64 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} int @2 
       Path to history file for the shell : /root/.cbq_history 
      cbq> \quit;
      

      Works with dummy user:

      # /opt/couchbase/bin/cbq -e https://172.23.104.90 -cacert ../ca.pem -cert travel-sample.pem -key travel-sample-pkcs8-crypt-v2.key -p mypass -u foo
       Connected to : https://172.23.104.90:18091/. Type Ctrl-D or \QUIT to exit. Path to history file for the shell : /root/.cbq_history 
      cbq> \quit;
      

      Attachments

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

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty