You can encrypt the password within the connector parameters, and inside the rule, you can use application.{specific attribute}
to fetch the value from the connector during execution.
String userName = (String) application.get(“User Name”);
String password = (String) application.get(“Password”);
If you’re going to add any custom attributes you can do that too, refer to the below doc