The <authentication> element of the HTTP adapter
The HTTP adapter can use one of four protocols, and can also contain a server identity.
We can configure the HTTP adapter to use one of four authentication protocols by defining the <authentication> element. We can define this element only within the <connectionPolicy> element. Depending on the authentication protocol that the HTTP adapter uses, among the following ones, define the <authentication> element as follows:
- Basic Authentication
<authentication> <basic/> </authentication>
- Digest Authentication
<authentication> <digest/> </authentication>
- NTLM Authentication
<authentication> <ntlm workstation="value"/> </authentication>The workstation attribute is optional, and denotes the name of the computer on which the MobileFirst Server runs. Its default value is ${local.workstation}.
- SPNEGO/Kerberos Authentication
<authentication> <spnego stripPortOffServiceName="true"/> </authentication>The attribute stripPortOffServiceName is optional, and specifies whether the Kerberos client uses the service name without the port number. Default is false.
When we use this option, also place the krb5.conf file under Worklight Project Name/server/conf. The file must contain Kerberos configuration such as the location of the Kerberos server, and domain names. Its structure is described in the Kerberos V5 System Administrator's Guide in the mit.edu website.
Specify the Server Identity
If the adapter exposes procedures with the attribute connectAs="server", the connection policy can contain a <serverIdentity> element. This feature applies to all authentication schemes, for example:
<authentication> <basic/> <serverIdentity> <username> ${DOMAIN\user} </username> <password> ${password} </password> </serverIdentity> </authentication>
Parent topic: The adapter XML File