# Avoid exposing of User Name and Password in Synthetic Monitor for SOAP Requests

**URL:** <https://community.dynatrace.com/t/avoid-exposing-of-user-name-and-password-in-synthetic-monitor-for-soap-requests/43938>\
**Category:** Open Q&A\
**Tags:** application-security\
**Created:** [February 1, 2024, 7:30pm UTC](https://community.dynatrace.com/t/avoid-exposing-of-user-name-and-password-in-synthetic-monitor-for-soap-requests/43938 "2024-02-01T19:30:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PraveenYendluri](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@PraveenYendluri](https://community.dynatrace.com/u/PraveenYendluri)\
**Post date:** [February 1, 2024, 7:30pm UTC](https://community.dynatrace.com/t/avoid-exposing-of-user-name-and-password-in-synthetic-monitor-for-soap-requests/43938/1 "2024-02-01T19:30:50Z")

</div>

We want to avoid exposing (or protecting ) user name and password in our synthetic monitor HTTP Requests.

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [February 1, 2024, 8:16pm UTC](https://community.dynatrace.com/t/avoid-exposing-of-user-name-and-password-in-synthetic-monitor-for-soap-requests/43938/2 "2024-02-01T20:16:49Z")

</div>

You should use the Credential Vaults then: [Credential vault — Dynatrace Docs](https://docs.dynatrace.com/docs/platform-modules/digital-experience/synthetic-monitoring/general-information/credential-vault-for-synthetic-monitors)

---

<div class="post-metadata">

**Author:** ![PraveenYendluri](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@PraveenYendluri](https://community.dynatrace.com/u/PraveenYendluri)\
**Post date:** [February 2, 2024, 3:09pm UTC](https://community.dynatrace.com/t/avoid-exposing-of-user-name-and-password-in-synthetic-monitor-for-soap-requests/43938/3 "2024-02-02T15:09:28Z")

</div>

Thank you very much !!

Continue to the above question: how to use/add/populate the user name and password into my SOAP Header Security Tag from Vault (may be from Azure Key Vault). Example of my SOAP Header with Security Tag

\<soapenv:Envelope xmlns:soapenv=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)” xmlns:oas=“[http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd](http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd)” xmlns:soap=“[Redirecting…](http://www.XYZ.com/Services/SOAPHeaders)” xmlns:req=“[Redirecting…](http://info.XYZ.com/Services/add/Operational/Messages/Request)”\>  
soapenv:Header  
\<wsse:Security xmlns:wsse=“[http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd](http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd)”\>  
\<wsse:UsernameToken wsu:Id=“UsernameToken-24” xmlns:wsu=“[http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd](http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd)”\>  
wsse:Username **MYUSERNAME** \</wsse:Username\>  
\<wsse:Password Type=“[OASIS Namespace](http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText)”\>  
**MYPASSWORD**  
\</wsse:Password\>  
\<wsse:Nonce EncodingType=“[OASIS Namespace](http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary)”/\>  
\</wsse:UsernameToken\>  
\</wsse:Security\>

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [February 2, 2024, 3:42pm UTC](https://community.dynatrace.com/t/avoid-exposing-of-user-name-and-password-in-synthetic-monitor-for-soap-requests/43938/4 "2024-02-02T15:42:47Z")

</div>

You should use the native Credential Vault from Dynatrace to use them into your synthetics.

Then you can replace the code with your vault like this:

```markup
<wsse:Username>'{CREDENTIALS_VAULT-ID|username}'</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
'{CREDENTIALS_VAULT-ID|password}'
</wsse:Password>

```
