Configure the server to validate basic authentication information
Basic authentication (BasicAuth) refers to the user ID and the password of a valid user in the registry of the target server. We can specify how the server validates the BasicAuth information.
Important: There is an important distinction between Version 5.x and Version 6.0.x and later applications. The information supports Version 5.x applications only used with WAS v6.0.x and later. The information does not apply to Version 6.0.x and later applications.
After a request is received containing basic authentication information, the server needs to log in to form a credential. The credential is used for authorization. If the user ID and the password supplied is invalid, an exception is thrown and the request ends without invoking the resource.
Specify how the server validates the BasicAuth authentication information:
- Launch an assembly tool. For more information, see the related information on Assembly Tools.
- Switch to the Java EE perspective. Click Window > Open Perspective > J2EE.
- Click EJB Projects > application_name > ejbModule > META-INF.
- Right-click the webservices.xml file, and click Open with > Web services editor.
- Click the Binding Configurations tab, which is located at the bottom of the web services editor within an assembly tool.
- Expand the Request receiver binding configuration details > Login mapping section.
- Click Edit to view the login mapping information or click Add to add new login mapping information. The login mapping dialog is displayed. Select or enter the following information:
- Authentication method
- Type of authentication that occurs. Select BasicAuth to use basic authentication.
- Configuration name
- Specifies the JAAS login configuration name. For the BasicAuth authentication method, enter WSLogin for the JAAS login Configuration name.
- Use token valid type
- Determines to specify a custom token type. For the default authentication method selections, we do not need to specify this option.
- Token value type URI and Token value type URI local name
- When you select BasicAuth, we cannot edit the token value type URI and local name values. Specifies custom authentication types. For BasicAuth authentication leave these fields blank.
- Callback handler factory class name
- Creates a JAAS CallbackHandler implementation that understands the following callbacks:
- javax.security.auth.callback.NameCallback
- javax.security.auth.callback.PasswordCallback
- com.ibm.wsspi.wssecurity.auth.callback.BinaryTokenCallback
- com.ibm.wsspi.wssecurity.auth.callback.XMLTokenReceiverCallback
- com.ibm.wsspi.wssecurity.auth.callback.PropertyCallback
- Callback handler factory property name and Callback handler factory property value
- Specifies callback handler properties for custom callback handler factory implementations. You do not need to specify any properties for the default callback handler factory implementation. For BasicAuth, we do not need to enter any property values.
- Login mapping property name and Login mapping property value
- Specifies properties for a custom login mapping. For the default implementations including BasicAuth, leave these fields blank.
What to do next
Specify how the server handles the BasicAuth authentication method. See the task for configuring the server to handle basic authentication if we have not previously specified this information.
Related concepts
BasicAuth authentication method Development and assembly tools
Related tasks
Configure the server to handle basic authentication information Configure the server security bindings using an assembly tool Configure the server security bindings using the administrative console