Forum Discussion

SaraCavelind's avatar
SaraCavelind
Contributor
11 years ago

Dynamic basic authentication for environments

Hi!
I have defined three environments in the project "Environment" tab.
In each environments I have defined two custom properties NAME,PASSWORD (with different values for each env).
In the WS-Security Configuration for the project I have defined a outgoing WS Security configuration (default values filled in, but also defined a username type). I have set username and password to be like ${#Project#USERNAME} and ${#Project#PASSWORD} for the password hoping that these values will be taken from the current environment and expanded in the outgoing configuration.

In the service endpoints I have then set OUTGOING WSS to my Outgoing WS;mode = Complement.

My idea was that for each environment define username and password, and by having the outgoing WS change values be able to easily have different environments with different usernames and passwords.

I can't get it to work. It seems somehow the environment info isn't used..??
Any clues..?
Wrong way, known bugg etc??

I'm using soapUI Pro 4.5.2

3 Replies

  • Hi,

    That is a bug (# SOAP-456). The WSS configuration is not following the environment. We're looking to have it fixed in a future release.

    Regards,

    Giscard
    SmartBear Support
  • Hi!
    So what is the suggested approach to eliminate the work in having multiple environments that requires authentication?
  • Hi Sara,

    The "workaround" is not use environments if you need to use outgoing ws-security with username and password set. You can set the user name and password in the "Service Endpoint" area and "assign" it to the endpoints that need it. Please see screen shot below.


    Regards,
    Marcus
    SmartBear Support