credentialSecret when deploying on IBM Cloud Code Engine

I have been trying to get credentialSecret working when deploying Node-Red in IBM Cloud using Code Engine. I have tried setting as an environment variable on the code engine application, within the git repo bluemix-settings files, and in Cloudant settings document, so far, no success. Is there an example of where to specify credentialSecret when deploying on IBM Cloud with Cloud Engine? I tried all the various sources I could find so far.

Overall goal is to be able to encrypt and decrypt when code engine spawns instances using twin-bcrypt or bcrypt.

The bluemix-settings.js file is pretty much the equivalent of the standard Node-RED settings file. Adding credentialSecret to that file should be all that's needed.

But I must admit I have never tried running on Code Engine.

Maybe I put it within the wrong pipeline, there are 3, I'll keep checking. My updates to packages.json are picked up though. Here is the location I put it within the file based on the threads I found.

var settings = module.exports = {
    credentialSecret: "xxxxxxxxxxx",

    uiPort: process.env.PORT || 1880,
    mqttReconnectTime: 15000,
    debugMaxLength: 1000,

When specifying credentialSecret, does that mean the hash generated will be the same each time bcrypt encrypts a value or will the hash output change but the system can still decrypt knows the credential used for encryption. Maybe I’ve been testing wrong by checking if the hash before and after restarts expecting it to match.

To verify the parameter is being picked up, I have an injection node outputting the serviceCredential environment variable, that may be the wrong approach as well though

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.