WebSphere Application Server - Express, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Configuring HTTP basic authentication programmatically

This topic explains how to configure HTTP basic authentication by programmatically modifying HTTP properties.

Before you begin

This task is one of three ways that you can configure HTTP basic authentication. You can also configure HTTP basic authentication with an assembly tool or with the administrative console.

If you programmatically configure HTTP basic authentication, the properties are configured in the Stub or Call instance. If you choose to configure HTTP basic authentication with the administrative console or an assembly tool, the Web services security binding information is modified. The values that are set programmatically take precedence over the values defined in the binding. However, you can only configure HTTP proxy authentication programmatically.

Why and when to perform this task

The HTTP basic authentication that is discussed in this topic is orthogonal to WS-Security and is distinct from basic authentication that WS-Security supports. WS-Security supports basic authentication token, not HTTP basic authentication.

Configure HTTP basic authentication programmatically with the following steps provided in this task section.

Steps for this task

  1. Set the properties in the Stub or Call instance for a Web service or a Web service client You can set the following properties:
    javax.xml.rpc.Call.USERNAME_PROPERTY
    javax.xml.rpc.Call.PASSWORD_PROPERTY
    javax.xml.rpc.Stub.USERNAME_PROPERTY
    javax.xml.rpc.Stub.PASSWORD_PROPERTY
    
  2. Set the properties in the Stub or Call instance to configure the HTTP proxy authentication.
    1. You can set the following properties for HTTP:
      com.ibm.wsspi.webservices.HTTP_PROXYHOST_PROPERTY
      com.ibm.wsspi.webservices.HTTP_PROXYPORT_PROPERTY
      com.ibm.wsspi.webservices.HTTP_PROXYUSER_PROPERTY
      com.ibm.wsspi.webservices.HTTP_PROXYPASSWORD_PROPERTY
      
  3. You can set the following properties for HTTPS:
    com.ibm.wsspi.webservices.HTTPS_PROXYHOST_PROPERTY
    com.ibm.wsspi.webservices.HTTPS_PROXYPORT_PROPERTY
    com.ibm.wsspi.webservices.HTTPS_PROXYUSER_PROPERTY
    com.ibm.wsspi.webservices.HTTPS_PROXYPASSWORD_PROPERTY
    

Result

What to do next




Sub-topics
HTTP basic authentication collection

Related concepts
Transport level security
HTTP basic authentication

Related tasks
Securing Web services for version 5.x applications based on WS-Security
HTTP SSL Configuration collection

Task topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/twbs_confighttpbasicauthprog.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)