Skip to content

Support LDAP authentication between nodes#10317

Closed
anusudarsan wants to merge 5 commits intoprestodb:masterfrom
starburstdata:support_ldap_authentication_between_nodes
Closed

Support LDAP authentication between nodes#10317
anusudarsan wants to merge 5 commits intoprestodb:masterfrom
starburstdata:support_ldap_authentication_between_nodes

Conversation

@anusudarsan
Copy link
Contributor

No description provided.

@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch from eb4aaf3 to f2d8bb3 Compare April 3, 2018 12:31
@findepi findepi changed the title Support ldap authentication between nodes Support LDAP authentication between nodes Apr 3, 2018
@dain
Copy link
Contributor

dain commented Apr 4, 2018

When JTW authentication (a.k.a bearer tokens) lands, I think that would be another good (and super easy) way to setup authentication between nodes.... basically everything can be secured with a shared secret, or pre-signed authentication tokens.

@arhimondr
Copy link
Member

LDAP authentication for the inner communication was rather a hack to overcome the same security for all endpoints problem. Without this patch it is not possible to enable both, LDAP client authentication and encrypted communication, because there is no concept of separate security settings for client and server.

The better way of implementing this is to segregate Presto endpoints to presto client -> presto server and presto server -> presto server. So than LDAP client authentication could be enabled independently with internal communication settings.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will bind the filter only to an app context you are trying to bootstrap here. To make it work you should bind this filter to every single http client in Presto core. This is totally different Guice context. And i'm not sure if it is available from inside of a plugin.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once you set it to false the tests are gonna start to fail due to the thing i explained above. But when the scheduling to a coordinator is enabled, despite it cannot communicate with workers the test will still pass, as there is a one node to run the queries

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like an overkill to use Guice here. Just go with a PropertyManager and create a LdapAuthenticator manually. Make sure you check all the properties are being used. That is the functionallity that comes with a Bootstrap

@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch from f2d8bb3 to 2f1a848 Compare April 6, 2018 22:12
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be moved to edca727 and refactored once the Module is merged

@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch 4 times, most recently from 9db5908 to 9089ff9 Compare April 7, 2018 03:29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we change that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The travis log was getting bigger at times, and the travis stage failed due to https://stackoverflow.com/questions/26082444/how-to-work-around-travis-cis-4mb-output-limit. There is no known good workaround for this travis issue. Now that we run multinode tests in a new stage maybe this is not necessary. But having it in WARN level is not too bad, I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try to at least keep it at a default INFO level? INFO is a pretty commonly used logging level for printing out not so spammy important information. If INFO messages are over-verbose we should probably remove unnecessary logging places. In a separate PR of course =)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, changed it to INFO and it looks fine. DEBUG was logging all the jars used in the plugins. I dont think we kept it at DEBUG on purpose.

@arhimondr
Copy link
Member

LGTM

@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch 3 times, most recently from 3306485 to b507e74 Compare April 12, 2018 19:38
@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch 2 times, most recently from 8945544 to 9f72d15 Compare June 15, 2018 15:51
@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch from 9f72d15 to 8f93357 Compare July 5, 2018 14:29
@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch from 8f93357 to b216721 Compare July 18, 2018 00:10
Andrii Rosa added 4 commits July 20, 2018 18:35
Add hidden -P presto-cli parameter that allows to specify password
in non-interactive way. The parameter is hidden and supposed to be used
for testing purposes only.
@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch from b216721 to 9a78541 Compare July 20, 2018 22:37
@anusudarsan
Copy link
Contributor Author

@arhimondr I rebased this on master. Can you merge this too?

Add a new test profile for multinode tests.

Make PluginManager log at INFO level. Tests were failing intermittently with error log > 4MB.
@anusudarsan anusudarsan force-pushed the support_ldap_authentication_between_nodes branch from 9a78541 to c8caf12 Compare July 20, 2018 23:47
@anusudarsan
Copy link
Contributor Author

Now that we have support for multiple auth mechanisms, this hack is not needed. The solution is to have both LDAP and SSL authentication mechanisms enabled and have server-to-server communication authenticated with SSL client certificates.

@ghost
Copy link

ghost commented Sep 13, 2018

My question is: How do I use LDAP and SSL authentication. After some research (2 weeks) on my version 0.198 I added this to the config.properties to make it work. Good luck.

http-server.authentication.type=PASSWORD,CERTIFICATE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants