Class: Dse::Auth::Providers::GssApi
- Inherits:
-
Cassandra::Auth::Provider
- Object
- Cassandra::Auth::Provider
- Dse::Auth::Providers::GssApi
- Defined in:
- lib/dse/auth/providers/gss_api.rb
Overview
Auth provider to authenticate with Kerberos. Whenever the client connects to a DSE node,
this provider will perform Kerberos authentication operations with it. By default, the provider
takes the ip address of the node and uses Socket#getnameinfo
to find its name in order to construct
the full service address (e.g. service@host).
Instance Method Summary collapse
-
#initialize(service = 'dse', host_resolver = true, principal = nil, ticket_cache = nil) ⇒ GssApi
constructor
A new instance of GssApi.
Constructor Details
#initialize(service = 'dse', host_resolver = true, principal = nil, ticket_cache = nil) ⇒ GssApi
Returns a new instance of GssApi.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/dse/auth/providers/gss_api.rb', line 136 def initialize(service = 'dse', host_resolver = true, principal = nil, ticket_cache = nil) @service = service @host_resolver = case host_resolver when false NoOpResolver.new when true NameInfoResolver.new else host_resolver end Cassandra::Util.assert_responds_to(:resolve, @host_resolver, 'invalid host_resolver: it must have the :resolve method') @principal = principal @ticket_cache = ticket_cache end |