Kerberos Module adds Kerberos (SPNEGO) proxy authentication support for the Mule HTTP Connector.
Configuration
Kerberos Proxy Authentication
Use <kerberos:proxy-authentication> to configure Kerberos proxy authentication for the Mule HTTP Connector.
To use this module, set these system properties when starting Mule:
-
HTTP Service Implementation: For Mule 4.10.x, this module requires the Netty HTTP service.
Add this JVM property:
-Dmule.http.service.implementation=NETTY
-
Kerberos Configuration File: Provide the path to your organization’s krb5.conf file. You can reuse an existing path if other modules already use it.
Add this JVM property:
-Djava.security.krb5.conf=/path/to/your/krb5.conf
Parameters
| Name | Type | Description | Default Value | Required |
|---|---|---|---|---|
Host |
String |
Proxy host. |
x |
|
Port |
Number |
Proxy port. |
x |
|
Principal |
String |
Kerberos principal, for example, |
x |
|
Realm |
String |
Kerberos realm, for example, |
x |
|
Use Ticket Cache |
Boolean |
If |
false |
|
Keytab Path |
String |
Path to a keytab file. |
Required when |
|
Ticket Cache Path |
String |
Path to Kerberos credential cache file. Only used when |
||
Non Proxy Hosts |
String |
Hosts to reach directly, bypassing the proxy. |
||
Service Type |
String |
Kerberos service type for building the SPN. |
HTTP |
XML Example
Use <kerberos:proxy-authentication> to configure Kerberos proxy authentication in an HTTP Connector request configuration. This example shows how to set parameters such as host, port, principal, realm, useTicketCache, and serviceType.
<mule xmlns:kerberos="http://www.mulesoft.org/schema/mule/kerberos"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/kerberos http://www.mulesoft.org/schema/mule/kerberos/current/mule-kerberos.xsd">
<http:request-config name="httpCfg">
<http:proxy-config>
<kerberos:proxy-authentication
host="proxy.example.com"
port="8080"
principal="user@EXAMPLE.COM"
realm="EXAMPLE.COM"
keytabPath="/path/to/file.keytab"
serviceType="HTTP"/>
</http:proxy-config>
</http:request-config>
</mule>