Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0A0C0200CD2 for ; Wed, 12 Jul 2017 23:44:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D361C16AB63; Wed, 12 Jul 2017 21:44:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 011C816AB66 for ; Wed, 12 Jul 2017 23:44:10 +0200 (CEST) Received: (qmail 90146 invoked by uid 500); 12 Jul 2017 21:44:10 -0000 Mailing-List: contact dev-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list dev@hawq.incubator.apache.org Received: (qmail 89971 invoked by uid 99); 12 Jul 2017 21:44:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2017 21:44:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7820819624D for ; Wed, 12 Jul 2017 21:44:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.021 X-Spam-Level: X-Spam-Status: No, score=-4.021 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id fzF63ZqaRTmN for ; Wed, 12 Jul 2017 21:44:07 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 9ACFB62867 for ; Wed, 12 Jul 2017 21:36:54 +0000 (UTC) Received: (qmail 67543 invoked by uid 99); 12 Jul 2017 21:36:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2017 21:36:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5C79CF5530; Wed, 12 Jul 2017 21:36:52 +0000 (UTC) From: dyozie To: dev@hawq.incubator.apache.org Reply-To: dev@hawq.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-hawq-docs pull request #128: HAWQ-1479 - doc ranger kerberos integ... Content-Type: text/plain Message-Id: <20170712213652.5C79CF5530@git1-us-west.apache.org> Date: Wed, 12 Jul 2017 21:36:52 +0000 (UTC) archived-at: Wed, 12 Jul 2017 21:44:12 -0000 Github user dyozie commented on a diff in the pull request: https://github.com/apache/incubator-hawq-docs/pull/128#discussion_r127074583 --- Diff: markdown/ranger/ranger-kerberos.html.md.erb --- @@ -0,0 +1,209 @@ +--- +title: HAWQ Ranger Kerberos Integration +--- + + + +When you have enabled Ranger Authorization for HAWQ, your HAWQ installation includes the Ranger Administrative UI and HAWQ Ranger Plug-in Service. + +Specific HAWQ Ranger configuration is required when Kerberos authentication is enabled for HAWQ or for Ranger. You must configure Kerberos support for: + +- HAWQ resource lookup by the Ranger Administration host during HAWQ policy definition +- HAWQ Ranger Plug-in Service communication with the Ranger Administration host for policy refresh + +Use the following procedures to configure Kerberos support for your Ranger-authorized HAWQ cluster. + +## Prerequisites + +Before you configure Kerberos for your Ranger-authorized HAWQ cluster, ensure that you have: + +- Installed Java 1.7.0\_17 or later on all nodes in your cluster. Java 1.7.0_17 is required to use Kerberos-authenticated JDBC on Red Hat Enterprise Linux 6.x or 7.x. +- (Non-OpenJDK Java installations) Installed the Java Cryptography Extension (JCE) on all nodes in your cluster. + - If you manage your cluster with Ambari, you installed the JCE on each node before you enabled Kerberos with the Ambari **Kerberos Security Wizard**. + - If you manage your cluster from the command line, you must manually install the extension on these systems. +- Noted the host name or IP address of your Ranger Administration host (\) and HAWQ master (\) nodes. +- Identified an existing Kerberos Key Distribution Center (KDC) or set up your KDC as described in [Install and Configure a Kerberos KDC Server](../clientaccess/kerberos.html#task_setup_kdc). + - Note the host name or IP address of your KDC (\). + - Note the name of the Kerberos \ in which your cluster resides. +- Enabled Ranger Authorization for HAWQ. See [Configuring HAWQ to use Ranger Policy Management](ranger-integration-config.html). + + +## Configure Ranger for Kerberized HAWQ + +When you define HAWQ Ranger authorization policies, the Ranger Administration Host uses JDBC to connect to HAWQ during policy definition to look up policy resource names. When Kerberos user authentication is enabled for HAWQ, you must configure this connection for Kerberos. + +To configure Ranger access to a HAWQ cluster enabled with Kerberos user authentication, you must: + +- Identify an existing HAWQ administrative role or create a new HAWQ administrative role for Ranger lookup of HAWQ resources +- Create a Kerberos principal for the lookup role +- Update the Ranger HAWQ service definition + +### Procedure + +Perform the following procedure to enable the Ranger Administration Host to look up resources in your kerberized HAWQ cluster. You will perform operations on the HAWQ \, \, and \ nodes. + +1. Log in to the HAWQ master node and set up your environment: + + ``` shell + $ ssh gpadmin@ + gpadmin@master$ . /usr/local/hawq/greenplum_path.sh + ``` + +2. Identify an existing or create a new HAWQ administrative role for Ranger resource lookup. For example, to create a new administrative role: + + ``` shell + gpadmin@master$ psql -c 'CREATE ROLE "rangerlookup_hawq" with LOGIN SUPERUSER;' + ``` + + You may choose a different name for the Ranger lookup role. + +3. Log in to the KDC server system and generate a principal for the HAWQ `rangerlookup_hawq` role. Substitute your Kerberos \. For example: + + ``` shell + $ ssh root@ + root@kdc-server$ kadmin.local -q "addprinc -pw changeme rangerlookup_hawq@REALM.DOMAIN" + ``` + + You do not need to generate a keytab file for the `rangerlookup_hawq` principal because you will provide the password in the HAWQ service definition of the Ranger Admin UI. + +4. Start the Ranger Admin UI in a supported web browser. The default URL is \:6080. + +5. Locate the HAWQ service definition and press the **Edit** button. + +6. Update the applicable **Config Properties** fields: + + **HAWQ User Name*** - The HAWQ Ranger lookup role you identified or created in Step 2 above. + **HAWQ User Password*** - The password you assigned to the HAWQ Ranger lookup role principal. + **HAWQ Kerberos Service Name** - `postgres` + +7. Click the **Test Connection** button. If you connect successfully, Ranger displays a dialog with the message: + + ``` pre + Connected Successfully. + ``` + + You successfully configured Ranger to use Kerberos authentication when looking up HAWQ resource names. + +8. **Save** your changes to permanently configure Kerberos authentication for HAWQ Ranger resource lookup. + + +## Configure HAWQ for Kerberized Ranger + +When Ranger Authorization is enabled for HAWQ, the Ranger Plug-in Service fetches policies from the Ranger Administration host. When Kerberos is enabled for Ranger, you must specifically configure the Ranger Plug-in Service for this communication. --- End diff -- "When Kerberos is enabled for Ranger" -> "**If** Kerberos is enabled for Ranger" --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---