DataPower

 View Only

 Gatewayscript and password alias mapping

Andreas Brand's profile image
Andreas Brand posted Tue December 09, 2025 05:12 AM

Good afternoon.


I have a working gateway script that sends a request to another server using “urlopen.HttpUserAgent.” The connection is secured with basic authentication. Unfortunately, the credentials are visible in the gateway script. This is bad because the script is managed in a GIT.


My question: I would like to connect urlopen with a “password alias mapping.” However, I have not been able to find any information on whether and how this can be done. There is a parameter called ‘agent’ in urlopen, but there is no corresponding link to “basic authentication policy.”
 
Has anyone been able to connect a “password alias mapping” to a gateway script? Or what approach would you choose to avoid having to store the password in the gateway script?


We are running Datapower IDG.10.5.0.19.

Thank you very much for your input.

Best regards, 
Res

Joseph Morgan's profile image
Joseph Morgan IBM Champion

Is it not using the User Agent configuration of the service to which the GWS action is ultimately associated?  That is, configure or customize a user agent for the service and setup the Basic Authentication policy for the url of the urlopen.   If that works, you can use the Password Alias.

P.S.  Let me know.  I'm talking off the top of my head here.