Giter Site home page Giter Site logo

Comments (4)

ibmmqmet avatar ibmmqmet commented on June 7, 2024

The environment variable to use is MQSSLKEYR. See docs here

MQS_KEYSTORE_CONF is used for Advanced Message Security configuration. It's a config file that in turn points at keystores and other values.

The gskit libraries underpinning this package only deal with KDB formats. Some of the command line tools will process JKS stores for convenience, but it's not been enabled for the C library runtime.

from mq-mqi-nodejs.

orweinberger avatar orweinberger commented on June 7, 2024

Thanks @ibmmqmet, I'm using the MQSSLKEYR to refer to the KDB path in the correct manner (defining the path without extension). I have both the kdb and sth files in the same directory and using the same base file name. I'm getting an error message saying MQRC_KEY_REPOSITORY_ERROR [2381] even though I'm able to use the mq client cli tools to connect successfully using these files.

I'm wondering if this has something to do with the KeyRepository configuration as it mentions it in the documentation. Is there an example on how to set this value using this module?

EDIT:

After a bit of digging, I've tried to:

var sco = new mq.MQSCO();
sco.KeyRepository = "/my/path/to/kdb";

var cno = new mq.MQCNO();
cno.SSLConfig = sco;

...

mq.Connx(qMgr, cno, function(err, hConn) {
...
});

But I'm still getting the same error message.

from mq-mqi-nodejs.

ibmmqmet avatar ibmmqmet commented on June 7, 2024

Assuming you have mykey.kdb, .rdb and .sth along with the CCDT, then you should be able to run with no code changes at all. The kdb must include the signing information for the qmgrs cert to validate that, and - if the SSLCAUTH setting on the svrconn requires it - the client's certificate with an appropriate label. See here for a lot more detail on that.

And of course make sure the CLNTCONN definition matches the SVRCONN definition for cipherspec.

Error log entries from both the queue manager and the client can give much more information than the simple MQRC value.

I do have a sample that I need to tidy up for doing TLS completely programmatically where the CD, SCO and CNO structures are involved but you don't need that when you use the CCDT.

export MQ_CONNECT_TYPE=CLIENT  # This may not be needed but it forces client connections
export MQSSLKEYR=`pwd`/mykey # Assume things are all in current directory
export MQCHLLIB=`pwd`
export MQCHLTAB=AMQCLCHL.TAB

node amqsput

I will often run programs under strace just to check that the correct files are being successfully opened; it's the quickest way to verify some of the environment variables are taking effect. And MQ trace would be more detailed debug.

from mq-mqi-nodejs.

ibmmqmet avatar ibmmqmet commented on June 7, 2024

The latest update (0.8.0) includes a new sample amqsconntls to show how to programmatically work with TLS configurations.

from mq-mqi-nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.