-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use different tokens instead of forcing WD and all HMS to use the sam…
…e delegatetoken in the kerberos environment
- Loading branch information
1 parent
1b9a36e
commit ce8a67b
Showing
19 changed files
with
359 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,75 +24,65 @@ In addition, because Kerberos authentication requires a delegation-token to prox | |
* Zookeeper to store delegation-token (Recommended) | ||
|
||
### Configuration | ||
|
||
Waggle Dance does not read Hadoop's `core-site.xml` so a general property providing Kerberos auth should be added to | ||
the Hive configuration file `hive-site.xml`: | ||
Waggle Dance `waggle-dance-server.yml` example: | ||
|
||
``` | ||
<property> | ||
<name>hadoop.security.authentication</name> | ||
<value>KERBEROS</value> | ||
</property> | ||
port: 9083 | ||
verbose: true | ||
#database-resolution: MANUAL | ||
database-resolution: PREFIXED | ||
yaml-storage: | ||
overwrite-config-on-shutdown: false | ||
logging: | ||
config: file:/path/to/log4j2.xml | ||
configuration-properties: | ||
hadoop.security.authentication: KERBEROS | ||
hive.metastore.sasl.enabled: true | ||
hive.metastore.kerberos.principal: hive/[email protected] | ||
hive.metastore.kerberos.keytab.file: /path/to/hive.keytab | ||
hive.cluster.delegation.token.store.class: org.apache.hadoop.hive.thrift.ZooKeeperTokenStore | ||
hive.cluster.delegation.token.store.zookeeper.connectString: zz1:2181,zz2:2181,zz3:2181 | ||
hive.cluster.delegation.token.store.zookeeper.znode: /hive/cluster/wd_delegation | ||
hive.server2.authentication: KERBEROS | ||
hive.server2.authentication.kerberos.principal: hive/[email protected] | ||
hive.server2.authentication.kerberos.keytab: /path/to/hive.keytab | ||
hive.server2.authentication.client.kerberos.principal: hive/[email protected] | ||
hadoop.kerberos.keytab.login.autorenewal.enabled : true | ||
hadoop.proxyuser.hive.users: '*' | ||
hadoop.proxyuser.hive.hosts: '*' | ||
``` | ||
|
||
|
||
Waggle Dance also needs a keytab file to communicate with the Metastore so the following properties should be present: | ||
Waggle Dance `waggle-dance-federation.yml` example: | ||
``` | ||
<property> | ||
<name>hive.metastore.sasl.enabled</name> | ||
<value>true</value> | ||
</property> | ||
<property> | ||
<name>hive.metastore.kerberos.principal</name> | ||
<value>hive/_HOST@YOUR_REALM.COM</value> | ||
</property> | ||
<property> | ||
<name>hive.metastore.kerberos.keytab.file</name> | ||
<value>/etc/hive.keytab</value> | ||
</property> | ||
primary-meta-store: | ||
database-prefix: '' | ||
name: local | ||
remote-meta-store-uris: thrift://ms1:9083 | ||
access-control-type: READ_AND_WRITE_AND_CREATE | ||
impersonation-enabled: true | ||
federated-meta-stores: | ||
- remote-meta-store-uris: thrift://ms2:9083 | ||
database-prefix: dw_ | ||
name: remote | ||
impersonation-enabled: true | ||
access-control-type: READ_AND_WRITE_ON_DATABASE_WHITELIST | ||
writable-database-white-list: | ||
- .* | ||
``` | ||
|
||
In addition, all metastores need to use the Zookeeper shared token: | ||
In start shell , add jvm properties maybe useful. | ||
``` | ||
<property> | ||
<name>hive.cluster.delegation.token.store.class</name> | ||
<value>org.apache.hadoop.hive.thrift.ZooKeeperTokenStore</value> | ||
</property> | ||
<property> | ||
<name>hive.cluster.delegation.token.store.zookeeper.connectString</name> | ||
<value>zk1:2181,zk2:2181,zk3:2181</value> | ||
</property> | ||
<property> | ||
<name>hive.cluster.delegation.token.store.zookeeper.znode</name> | ||
<value>/hive/token</value> | ||
</property> | ||
-Djavax.security.auth.useSubjectCredsOnly=false | ||
``` | ||
|
||
If you are intending to use a Beeline client, the following properties may be valuable: | ||
Connect to Waggle Dance via beeline, change ` hive.metastore.uris` in Hive configuration file `hive-site.xml`: | ||
``` | ||
<property> | ||
<name>hive.server2.transport.mode</name> | ||
<value>http</value> | ||
</property> | ||
<property> | ||
<name>hive.server2.authentication</name> | ||
<value>KERBEROS</value> | ||
</property> | ||
<property> | ||
<name>hive.server2.authentication.kerberos.principal</name> | ||
<value>hive/_HOST@YOUR_REALM.COM</value> | ||
</property> | ||
<property> | ||
<name>hive.server2.authentication.kerberos.keytab</name> | ||
<value>/etc/hive.keytab</value> | ||
</property> | ||
<property> | ||
<name>hive.server2.enable.doAs</name> | ||
<value>false</value> | ||
<name>hive.metastore.uris</name> | ||
<value>thrift://wd:9083</value> | ||
</property> | ||
``` | ||
|
||
|
||
### Running | ||
|
||
Waggle Dance should be started by a privileged user with a fresh keytab. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.