Handle Credentials/Environment in Microservice

Hello,

I have a microservice that need credentials to other services. For example it need a connection string to azure for uploading files.

Currently I setup this credentials inside of the application.properties like this:
azure.blob.connection-string=${AZURE_CONNECTION_STRING}

AZURE_CONNECTION_STRING is an environment variable. On my local machine I have access to environment settings. But when I deploy the microservice I can’t control environment variables there. How to handle environment varibales in cloud? Is there a better way to deal with credentials inside of a microservice?

Hi David,

recommended approach is to use tenant options:
https://www.cumulocity.com/api/core/#tag/Options

if you prefix the key with “credentials.” the value will be stored encrypted and will only be decrypted for microservices.

1 Like