# Is it possible to use password in gatling script in encrypted form

**URL:** <https://community.gatling.io/t/is-it-possible-to-use-password-in-gatling-script-in-encrypted-form/8072>\
**Category:** Gatling (Open-Source)\
**Created:** [June 28, 2023, 5:22am UTC](https://community.gatling.io/t/is-it-possible-to-use-password-in-gatling-script-in-encrypted-form/8072 "2023-06-28T05:22:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajat](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@rajat](https://community.gatling.io/u/rajat)\
**Post date:** [June 28, 2023, 5:22am UTC](https://community.gatling.io/t/is-it-possible-to-use-password-in-gatling-script-in-encrypted-form/8072/1 "2023-06-28T05:22:58Z")

</div>

can someone pls help me - how can we use password in encrypted form in our gatling script.  
it should also be masked in logs .Below is the code which i am using-

private val httpProtocol = http  
.proxy(Proxy(“[proxy.abc.com](http://proxy.abc.com)”, 8080).credentials("username ",“password”))

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [June 28, 2023, 5:52am UTC](https://community.gatling.io/t/is-it-possible-to-use-password-in-gatling-script-in-encrypted-form/8072/2 "2023-06-28T05:52:24Z")

</div>

It’s your responsibility to provide an encryption mechanism if you want one.

---

<div class="post-metadata">

**Author:** ![GeMi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/gemi/32/939_2.png) [@GeMi](https://community.gatling.io/u/GeMi)\
**Post date:** [June 28, 2023, 10:02am UTC](https://community.gatling.io/t/is-it-possible-to-use-password-in-gatling-script-in-encrypted-form/8072/3 "2023-06-28T10:02:24Z")

</div>

You can use as parameter as in example here:

> <https://github.com/gemiusz/gatling-examples-maven-java/blob/master/src/test/java/pl/gemiusz/Case0011ProxyCommandLineParametersSimulation.java>

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/2X/b/b148e0742de35c6280726cabf3ecd3de2d320f63.png) [@system](https://community.gatling.io/u/system)\
**Post date:** [July 28, 2023, 10:02am UTC](https://community.gatling.io/t/is-it-possible-to-use-password-in-gatling-script-in-encrypted-form/8072/4 "2023-07-28T10:02:29Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
