cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

scripting API queries without hardcoded access token in the script

jdport
Visitor

Hello,

I've written several scripts for various tasks with the Dynatrace API but updated security requirements are going to be prohibiting me from having our API token hard coded in the script.     I was wondering how others have dealt with this... how I can pass a credential to the API without having it in the actual script that would satisfy our security team.   

Thanks in advance for any thoughts on this.

-Jeff

 

2 REPLIES 2

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

Maybe you can use environment variables or asking token in prompt.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

alexander_dt
Dynatrace Helper
Dynatrace Helper

I'd second @AntonPineiro's response. If it's an interactive application, prompting the user is probably the safest approach. Otherwise, environment variables are also often used in this context (of course, you'll still need to make sure those are secure as well) or reading the values from a (possibly encrypted) database or configuration file.

Featured Posts