[GitHub] metron pull request #1246: METRON-1844: Allow for LDAP to be used for authen...

2018-11-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/metron/pull/1246


---


[GitHub] metron pull request #1246: METRON-1844: Allow for LDAP to be used for authen...

2018-11-01 Thread justinleet
Github user justinleet commented on a diff in the pull request:

https://github.com/apache/metron/pull/1246#discussion_r230153304
  
--- Diff: 
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-rest-env.xml
 ---
@@ -35,32 +35,29 @@
 
 
 metron_spring_profiles_active
-Active Spring profiles
+Active Spring profiles. 'ldap' is used to enable 
authentication via LDAP.
 Active Spring profiles
-
-
-true
-
+jdbc
--- End diff --

good catch. I thought I'd rolled that back.  I'll udpate


---


[GitHub] metron pull request #1246: METRON-1844: Allow for LDAP to be used for authen...

2018-11-01 Thread merrimanr
Github user merrimanr commented on a diff in the pull request:

https://github.com/apache/metron/pull/1246#discussion_r230138602
  
--- Diff: 
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-rest-env.xml
 ---
@@ -35,32 +35,29 @@
 
 
 metron_spring_profiles_active
-Active Spring profiles
+Active Spring profiles. 'ldap' is used to enable 
authentication via LDAP.
 Active Spring profiles
-
-
-true
-
+jdbc
--- End diff --

Are we using a "jdbc" profile anywhere?  From what I can tell jdbc 
authentication is used by default but we don't actually use a profile for that.


---


[GitHub] metron pull request #1246: METRON-1844: Allow for LDAP to be used for authen...

2018-10-30 Thread justinleet
Github user justinleet commented on a diff in the pull request:

https://github.com/apache/metron/pull/1246#discussion_r229293771
  
--- Diff: 
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py
 ---
@@ -267,6 +274,21 @@
 if 'solr-config-env' in config['configurations']:
 solr_principal_name = solr_principal_name.replace('_HOST', 
hostname_lowercase)
 
+# LDAP
+metron_ldap_url = 
config['configurations']['metron-security-env']['metron.ldap.url']
+metron_ldap_userdn = 
config['configurations']['metron-security-env']['metron.ldap.bind.dn']
+metron_ldap_password = 
config['configurations']['metron-security-env']['metron.ldap.bind.password']
+metron_ldap_user_pattern = 
config['configurations']['metron-security-env']['metron.ldap.user.dnpattern']
+metron_ldap_user_password = 
config['configurationsmetron_spring_profiles_active']['metron-security-env']['metron.ldap.user.password']
--- End diff --

Good catch. Fixed in latest commit


---


[GitHub] metron pull request #1246: METRON-1844: Allow for LDAP to be used for authen...

2018-10-30 Thread anandsubbu
Github user anandsubbu commented on a diff in the pull request:

https://github.com/apache/metron/pull/1246#discussion_r229259363
  
--- Diff: 
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py
 ---
@@ -267,6 +274,21 @@
 if 'solr-config-env' in config['configurations']:
 solr_principal_name = solr_principal_name.replace('_HOST', 
hostname_lowercase)
 
+# LDAP
+metron_ldap_url = 
config['configurations']['metron-security-env']['metron.ldap.url']
+metron_ldap_userdn = 
config['configurations']['metron-security-env']['metron.ldap.bind.dn']
+metron_ldap_password = 
config['configurations']['metron-security-env']['metron.ldap.bind.password']
+metron_ldap_user_pattern = 
config['configurations']['metron-security-env']['metron.ldap.user.dnpattern']
+metron_ldap_user_password = 
config['configurationsmetron_spring_profiles_active']['metron-security-env']['metron.ldap.user.password']
--- End diff --

Looks like a mispaste. `metron_spring_profiles_active` should be removed.


---


[GitHub] metron pull request #1246: METRON-1844: Allow for LDAP to be used for authen...

2018-10-25 Thread justinleet
GitHub user justinleet opened a pull request:

https://github.com/apache/metron/pull/1246

METRON-1844: Allow for LDAP to be used for authentication and roles

## Contributor Comments
I went through the defunct Knox SSO feature branch and pulled out the LDAP 
bits. I made sure @simonellistonball is on the first commit to maintain 
attribution.  When we merge this, we'll need to make sure that's properly 
maintained.

What this does is setup the set of LDAP configs, while maintaining 
backwards compatibility with the JDBC stuff by default.

I'd say the main objection I'd expect would be around unit/integration 
testing. Right now there's not anything in this PR, although we could probably 
pull in the EmbeddedLDAP from the branch and make sure the role endpoint works 
with it for integration.

I have run this up on full dev and tested against an actual OpenLDAP 
instance using 
https://github.com/osixia/docker-openldap#use-auto-generated-certificate. 
Instructions will be provided in comment to duplicate this testing.

## 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- where  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:
- [ ] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
- [ ] Have you included steps or a guide to how the change may be verified 
and tested manually?
- [ ] 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 
  ```

- [ ] 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:
- [ ] 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.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/justinleet/metron ldap_fixed_author

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/metron/pull/1246.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1246


commit 7ca1f2e27ebc5b522af1ffca3309b56a7e8396e9
Author: Simon Elliston Ball 
Date:   2018-10-17T15:46:17Z

Pulling in from Simon's original PR

commit 6e23234421f7a784d59b8ca2ced8fb3df0246327
Author: justinjleet 
Date:   2018-10-23T17:29:32Z

Updates to get things working in full dev

commit 6b392e1b5386b22c566d1ee3decca7d5406155bf
Author: justinjleet 
Date:   2018-10-23T23:09:31Z

LDAP SSL truststore

commit 8a7abaa89f2bec13ffe7ee5097abad316c09bf5d
Author: justinjleet 
Date:   2018-10-23T23:34:46Z

cleanup and removing test file

commit a51ca0ca0d0403b566c0a31ce529eeaad0ae
Author: justinjleet 
Date:   2018-10-24T19:26:11Z

Updating web security config

commit 686e433b78332eaf90a29979807186ed0daab407
Author: