dynatrace storing user credentials in credentials vault

We can store credentials like username, password or even your app registration in dynatrace. These are typically used in workflows.

Goto Settings -> Preference-> Credential Vault. 

Then we can scope - scope configuration allow us to decide if this can is accessbile via workflow or sythetics.

How do you access its values? We can access its value using javascripts in Dynatrace workflow. Here is a code snippet that can be use the do this.


import { credentialVaultClient, CredentialsDetailsTokenResponseElement } from '@dynatrace-sdk/client-classic-environment-v2';

const credentials = await credentialVaultClient.getCredentialsDetails({
  id: 'CREDENTIALS_VAULT-xxxxxxxxxxxxxxxx',
});

  // depeding on what type of credential you have setup
  console.log(credentials.token);
// If it is username
console.log(credentials.username);
// and password
console.log(credentials.password);






Comments

Popular posts from this blog

gemini cli getting file not defined error

mongosh install properly

llama cpp running it in google colab