Issue
I have several environments (dev, test, and prod) and I'm using some 3rd-party services, and for each environment, I have different access tokens/secret keys for these 3rd-party services.
I'm using Jenkins for CI/CD and the project uploaded as Azure App Service Currently, in the deploy stage, I decide which key/token to use and it stored in assets. But the problem that assets are public folders, and it means that everyone can see all these keys.
Is there a way to hide them somehow?
Solution
In general, since you are deploying to Azure, you should make use of the managed service in Azure such as Keyvault
to store to your keys according to your environment, Also you could leverage AppSettings
in Azure Appservice to store some of the environment variables which has tight integration and more secured.
Answered By - Sajeetharan
Answer Checked By - Timothy Miller (JavaFixing Admin)