Open tommysitu opened 7 years ago
Hi Tommy, I'm starting to working on this issue. I was super busy in these weeks~~
After studying the code, here is a draft in my mind:
username
and password
fields in the HoverflyConfig
class;Please feel free to add comments, they will be very helpful :)
Thanks
Hi Simono,
Thanks for this. I had a look at this stackoverflow which shows how to do it use an authenticator
implementation.
Unfortunately, it doesn't look like it can be done with system properties only, which is a bit annoying.
The config suggestion with a username and password looks good to me. My other suggestion would be to support environment variables as well, this way people would be less likely to commit the password.
@simomo thank you for looking into this.
On top of what you and @mogronalol suggested:
HOVERFLY_USERNAME
and HOVERFLY_PASSWORD
using System.getenv()
HoverflyConfigValidator
HoverflyClient.java
from Hoverfly.java
. As you can see Hoverfly.java
is growing big quickly, there are lots of duplicated error handling logic.
When connecting to remote hoverfly instance, it is likely that the authentication is enabled:
https://docs.hoverfly.io/en/stable/pages/tutorials/advanced/proxyauth/proxyauth.html#proxyauth
The remote hoverfly instance config should allow user to provide username and password for the basic authentication of the hoverfly proxy.