Title is pretty self-explanatory. I am looking for a way to use the credential vault to fill in a configuration entry so that we can prevent a password leak or something like that. Right now the text entries don’t seem to provide a way to reference an item in the credential vault, unless I am wrong. If there isn’t a way to do this, is this something you would consider adding in the future?
It’s up to each extension to implement such a feature. If you’re missing it for a specific one which is available on the Dynatrace hub, please raise a product idea on the community forum.
When creating an extension in extension framework 2.0 it’s possible to add credential vault support to the activation schema using this format:
The above answers is oriented towards extensions developers, not users. What if I want to use an extension published on the extensions hub, with Vault based secrets in the configuration ? it seems there is not type-ahead or suggest feature when I click on the text box ? e.g. F5 Big IP extn 2.0
So, I say the original question still remains, is it possible to use a specific format of intput to suggest that we are using a vault secret (similar to synthetics {} syntax) and not a plain text ?
Well, that’s half of it I’d say. There is no documented way to access the content of a credential vault entry. The REST api just delivers meta data and I could not find an extension function to do this. So what am I missing here?
@TorstenHellwig, afaik, Dynatrace automatically populates the values (in the example above for username and password), you will also get the credential vault entry id). So you don’t need to call anything, you just have the values directly in activation_config as for any other configuration properties.
That’s what I would have expected, but it doesn’t seem to be the case …
In the above example ‘password’ and ‘username’ would only be filled if ‘useCredentialVault’ is false.
Otherwise ‘credentialVaultId’ just contains the vault ID, but no additional fields for ‘username’ or ‘password’.
Thanks @Julius_Loman , that is interesting indeed. Exactly what I’d have expected. Wondering why it didn’t work in my example and where I went wrong. However I used a more complex example with custom schemas, but in principle it was the same config.
So in one case (not using credential vault) the config[‘username’] is filled and in the other case (using credential vault) the config[‘credentialvaultid’][‘username’] is populated.
Maybe I was looking at a way to always populate config[‘username’] so that there is no special handling in code required.
@r_weber no, it’s in the same properites, so no special code is needed.
Without vault:
[{‘useCredentialVault’: False, ‘username’: ‘user’, ‘password’: ‘password’}]
With vault:
[{‘useCredentialVault’: True, ‘credentialVaultId’: ‘CREDENTIALS_VAULT-8E8E7AC5C1C97734’, ‘username’: ‘api-dyntrace-user’, ‘password’: ‘Ap;DynTR4ceUs3r’}]
activationSchema is still a magic without (public) documentation. The best way to get with it is to find an extension which uses the feature you want, download it and look in the source how to do it.
@Julius_Loman thank you for your insight and sharing of this information, the zip file you shared helped me massively. And I was able to successfully pass credential vault id and capture username and password.
would you happen to know how to download an extension where there is a feature I want to take from for my Development? I currently am using VS code and extensions are visible in our environment but I am unable to download/view the source code. My api key has all the extensions 2.0 scopes available.
Find the extension you want, Open release notes (1), release (2), and click on download (3). You will download the extension package, which contains the extension, schema, and all python packages.