You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by GitBox <gi...@apache.org> on 2019/01/03 17:12:28 UTC

[GitHub] merrimanr opened a new pull request #1308: METRON-1945: Metron MPack support for Knox SSO setup

merrimanr opened a new pull request #1308: METRON-1945: Metron MPack support for Knox SSO setup
URL: https://github.com/apache/metron/pull/1308
 
 
   ## Contributor Comments
   This PR is based on https://github.com/apache/metron/pull/1275 and adds Ambari MPack support for enabling Metron on Knox.  This makes the setup process simpler, consisting of only a couple steps.
   
   ### Changes Included
   
   - Added code to the Ambari METRON_CLIENT component that performs the necessary setup/installation for Metron on Knox
   - Added `metron.knox.enabled` and `metron.knox.sso.pubkey` properties to Ambari
   - Added Metron Knox topology files as templates in Ambari so the correct hosts can be configured automatically
   - Added `app-config.json` files as templates in Ambari so the correct paths can be configured automatically
   - Added a check for LDAP, throwing an error message if it is not enabled
   - Added logic to populate the Spring active profiles and options on REST startup
   
   ### Testing
   
   This has been tested in full dev.  The setup steps are similar to https://github.com/apache/metron/pull/1275 but should be substantially simpler with less manual work involved:
   
   1. Add Knox as a Service in Ambari (Admin > Stacks and Versions > Add Service next to Knox)
   2. Verify the LDAP check is working.  Navigate to `Ambari > Metron > Configs > Security` and set `Knox Enabled` to true.  Restart the Metron REST component and it should fail with this error:
   ```
   Enabling Metron with Knox requires LDAP authentication.  Please set `LDAP Enabled` to true in the Metron Security tab.
   ```
   Change `Knox Enabled` back to false and save.
   
   3. Follow the instructions [here](https://github.com/apache/metron/tree/master/metron-deployment/development#knox-demo-ldap) to enable the Knox LDAP in full dev.  You should be able to authentication with REST using guest/guest-password after this is done.
   4. A Metron Client instance is required on all Knox Gateway hosts.  Navigate to `Ambari > Hosts > node1` and select the `Install clients` option in the dropdown next to the clients, at the bottom of the `Components` section.  This should install the Metron Client.
   5. Get the Knox public key with the following command on full dev:
   ```
   openssl s_client -connect node1:8443 < /dev/null | openssl x509 | grep -v 'CERTIFICATE' | paste -sd "" -
   ```
   Copy the output of that command and paste to the Ambari setting at `Metron > Configs > Security > Knox SSO Public Key`.  Change the `Knox Enabled` setting right above that to true and save.
   
   6. You should be prompted to restart Metron Client, Metron REST, Metron Alerts UI and Metron Management UI.  Follow the prompt and restart these components.
   
   After REST comes back up Metron should be enabled for Knox.  You should be able to follow the instructions in the https://github.com/apache/metron/pull/1275 description for verifying that SSO is working for all services.
   
   ## Pull Request Checklist
   
   Thank you for submitting a contribution to Apache Metron.  
   Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions.  
   Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides.  
   
   
   In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
   
   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
   - [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
   
   
   ### For code changes:
   - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed?
   - [x] Have you included steps or a guide to how the change may be verified and tested manually?
   - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
     ```
     mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh 
     ```
   
   - [x] Have you written or updated unit tests and or integration tests to verify your changes?
   - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?
   
   ### For documentation related changes:
   - [x] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via `site-book/target/site/index.html`:
   
     ```
     cd site-book
     mvn site
     ```
   
   #### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
   It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services