WAS v8.5 > Secure applications > Secure web services > Secure web servicesAuthenticate web services clients using HTTP basic authentication
A simple way to provide authentication data for the service client is to authenticate to the protected service endpoint using HTTP basic authentication. HTTP basic authentication uses a user name and password to authenticate a service client to a secure endpoint.
We can use either message-level security (WS-Security) or transport-level security:
- Use message-level security when security is essential to the web service application. HTTP basic authentication uses a user name and password to authenticate a service client to a secure endpoint. The basic authentication is encoded in the HTTP request that carries the SOAP message. When the application server receives the HTTP request, the user name and password are retrieved and verified using the authentication mechanism specific to the server.
- Use transport-level security to enable basic authentication. Transport-level security can be enabled or disabled independently from message-level security. Transport-level security provides minimal security. We can use this configuration when a web service is a client to another web service.
WebSphere Application Server can have several resources, including web services, protected by a Java EE security model.
HTTP basic authentication is orthogonal to the security support provided by WS-Security or HTTP Secure Sockets Layer (SSL) configuration.
A simple way to provide authentication data for the service client is to authenticate to the protected service endpoint using HTTP basic authentication. The basic authentication is encoded in the HTTP request that carries the SOAP message. When the application server receives the HTTP request, the user name and password are retrieved and verified using the authentication mechanism specific to the server.
Although the basic authentication data is base64-encoded, sending data over HTTPS is recommended. The integrity and confidentiality of the data can be protected by the SSL protocol.
In some cases, a firewall is present using a pass-through HTTP proxy server. The HTTP proxy server forwards the basic authentication data into the Java EE application server. The proxy server can also be protected. Applications can specify the proxy data by setting properties in a stub object.
- Develop and assemble a web services application.
We can configure and assemble HTTP authentication for the application using an assembly tool, or programmatically. Modify the HTTP properties programmatically if you want the values that are set programmatically to take precedence over the values that are defined in the binding. If we configure HTTP basic authentication programmatically, the properties are configured in the Stub or Call instance. However, you only can programmatically configure HTTP proxy authentication.
- Configure HTTP basic authentication for JAX-RPC web services programmatically
- Configure HTTP basic authentication for JAX-RPC web services with an assembly tool
- Deploy the application.
- Configure HTTP authentication for the application.
If we choose to configure HTTP basic authentication with the dmgr console, the Web Services Security binding information is modified.
Related
Development and assembly tools
Secure web services
Programming models for web services message-level security
Deploy web services
Configure HTTP basic authentication for JAX-RPC web services with the dmgr console
Configure HTTP basic authentication for JAX-RPC web services programmatically
Configure HTTP basic authentication for JAX-RPC web services with an assembly tool
Secure web services applications at the transport level
HTTP basic authentication page