Class: DseGssapiAuthProvider

auth~ DseGssapiAuthProvider

AuthProvider that provides GSSAPI authenticator instances for clients to connect to DSE clusters secured with the DseAuthenticator.

Constructor

new DseGssapiAuthProvider(gssOptions)

Creates a new instance of DseGssapiAuthProvider.
Parameters:
Name Type Description
gssOptions Object GSSAPI authenticator options
Properties
Name Type Description
user String The user principal. Defaults to whatever is in the ticket cache.
service String The service to use. Defaults to 'dse'.
hostNameResolver function A method to be used to resolve the name of the Cassandra node based on the IP Address. Defaults to lookupServiceResolver which resolves the FQDN of the provided IP to generate principals in the format of dse/example.com@MYREALM.COM. Alternatively, you can use reverseDnsResolver to do a reverse DNS lookup or useIpResolver to simply use the IP address provided.
Example
const client = new dse.Client({
 contactPoints: ['h1', 'h2'],
 authProvider: new dse.auth.DseGssapiAuthProvider()
});

Methods

(static) lookupServiceResolver(ip, callback)

Performs a lookupService query that resolves an IPv4 or IPv6 address to a hostname. This ultimately makes a getnameinfo() system call which depends on the OS to do hostname resolution.

Note: Depends on dns.lookupService which was added in 0.12. For older versions falls back on reverseDnsResolver.

Parameters:
Name Type Description
ip String IP address to resolve.
callback function The callback function with err and hostname arguments.

(static) reverseDnsResolver(ip, callback)

Performs a reverse DNS query that resolves an IPv4 or IPv6 address to a hostname.
Parameters:
Name Type Description
ip String IP address to resolve.
callback function The callback function with err and hostname arguments.

(static) useIpResolver(ip, callback)

Effectively a no op operation, returns the IP address provided.
Parameters:
Name Type Description
ip String IP address to use.
callback function The callback function with err and hostname arguments.

newAuthenticator(endpoint, name) → {Authenticator}

Returns an Authenticator instance to be used by the driver when connecting to a host.
Parameters:
Name Type Description
endpoint String The IP address and port number in the format ip:port.
name String Authenticator name.
Returns:
Type
Authenticator