rbhive icon indicating copy to clipboard operation
rbhive copied to clipboard

Set credentials

Open HSDen opened this issue 9 years ago • 2 comments

Hi,

How do we set authentication params like user and password, while using tcli_connect or connect methods?

HSDen avatar Dec 01 '15 18:12 HSDen

There is a PR https://github.com/forward3d/rbhive/pull/23 that offers Kerberos connectivity, but this is yet to be merged into master.

lloydpick avatar Dec 01 '15 20:12 lloydpick

@Selenium-hari here is an example:


RBHive.tcli_connect('address', 10_000, { transport: :sasl,:sasl_params  => {:username => "username",:password  => "password"},logger: Logger.new(STDOUT), hive_version: 10 }) do |connection|
  connection.fetch 'SELECT * FROM users LIMIT 5'
end

0bserver07 avatar Dec 23 '15 22:12 0bserver07