Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ldap Group Provider #17518

Closed
wants to merge 2 commits into from
Closed

Conversation

eformat
Copy link
Member

@eformat eformat commented May 16, 2023

Reopening work previously closed - this PR supersedes #8335 #10116

Adds

  • ldap group provider

cc: @bitsondatadev

Please advise on what you think needs finishing off. I have tested this against a local FreeIPA ldap setup OK and have joined your trino slack dev channel as well. cheers.

@cla-bot
Copy link

cla-bot bot commented May 16, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link
Member

@Praveen2112 Praveen2112 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. It would be nice if we could have a PTs for this.

@eformat eformat changed the title ldap group provider initial commit Ldap Group Provider May 16, 2023
@eformat
Copy link
Member Author

eformat commented May 16, 2023

PTs

ah yup .. Product Tests .. also i will write some Doco ;) for this .. WIP.

@cla-bot
Copy link

cla-bot bot commented May 16, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

4 similar comments
@cla-bot
Copy link

cla-bot bot commented May 16, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented May 17, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented May 17, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented May 17, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@eformat
Copy link
Member Author

eformat commented May 17, 2023

BTW i have filled in the CLA and emailed it back am ignoring the bot ;)

@cla-bot
Copy link

cla-bot bot commented May 17, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@eformat
Copy link
Member Author

eformat commented May 17, 2023

hi @Praveen2112 PTAL, i have added in support for these three common ldap schema use cases now.
this of course needs proper documentation. the test container in the code uses the scheme in (3), will need to find some schemas that can mimic (2),(3) for real life testing (unit tests cover the config though).

(1) RFC2307 (posix)

  dn: ou=users,dc=example,dc=com
  objectClass: organizationalUnit
  ou: users

  dn: cn=Jane,ou=users,dc=example,dc=com
  objectClass: person
  objectClass: organizationalPerson
  objectClass: inetOrgPerson
  cn: Jane
  sn: Smith
  displayName: Jane Smith
  mail: jane.smith@example.com

  dn: cn=Jim,ou=users,dc=example,dc=com
  objectClass: person
  objectClass: organizationalPerson
  objectClass: inetOrgPerson
  cn: Jim
  sn: Adams
  displayName: Jim Adams
  mail: jim.adams@example.com

  dn: ou=groups,dc=example,dc=com
  objectClass: organizationalUnit
  ou: groups

  dn: cn=admins,ou=groups,dc=example,dc=com 
  objectClass: groupOfNames
  cn: admins
  owner: cn=admin,dc=example,dc=com
  description: System Administrators
  member: cn=Jane,ou=users,dc=example,dc=com 
  member: cn=Jim,ou=users,dc=example,dc=com

The group is a first-class entry in the LDAP server (e.g. "cn=admins,ou=groups,dc=example,dc=com")
Members of a group are listed with an identifying reference as attributes on the group (e.g. "member")

(2) Active Directory

dn: ou=users,dc=example,dc=com
objectClass: organizationalUnit
ou: users

dn: cn=Jane,ou=users,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: testPerson
cn: Jane
sn: Smith
displayName: Jane Smith
mail: jane.smith@example.com
memberOf: admins 

dn: cn=Jim,ou=users,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: testPerson
cn: Jim
sn: Adams
displayName: Jim Adams
mail: jim.adams@example.com
memberOf: admins

The user’s group memberships are listed as attributes on the user, and the group does not exist as an entry on the server. e.g "memberOf"

(3) RFC2307bis (FreeIPA), Augmented Active Directory

dn: ou=users,dc=example,dc=com
objectClass: organizationalUnit
ou: users

dn: cn=Jane,ou=users,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: testPerson
cn: Jane
sn: Smith
displayName: Jane Smith
mail: jane.smith@example.com
memberOf: cn=admins,ou=groups,dc=example,dc=com 

dn: cn=Jim,ou=users,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: testPerson
cn: Jim
sn: Adams
displayName: Jim Adams
mail: jim.adams@example.com
memberOf: cn=admins,ou=groups,dc=example,dc=com

dn: ou=groups,dc=example,dc=com
objectClass: organizationalUnit
ou: groups

dn: cn=admins,ou=groups,dc=example,dc=com 
objectClass: groupOfNames
cn: admins
owner: cn=admin,dc=example,dc=com
description: System Administrators
member: cn=Jane,ou=users,dc=example,dc=com
member: cn=Jim,ou=users,dc=example,dc=com

The user’s group memberships are listed as attributes on the user. e.g. "memberOf: cn=admins,ou=groups,dc=example,dc=com"

The group is a first-class entry on the LDAP server. e.g. "dn: cn=admins,ou=groups,dc=example,dc=com"

@cla-bot
Copy link

cla-bot bot commented May 18, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

4 similar comments
@cla-bot
Copy link

cla-bot bot commented May 18, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented May 18, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented May 18, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented May 18, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented May 19, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@eformat
Copy link
Member Author

eformat commented May 19, 2023

Commit 0d0c56a

Added testing support for active directory schema based testing.
Added testing support for multii-value attributes e.g memberOf

Tests will need this test image PR to merge - trinodb/docker-images#166

@cla-bot
Copy link

cla-bot bot commented May 20, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

2 similar comments
@cla-bot
Copy link

cla-bot bot commented May 21, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented May 23, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@github-actions github-actions bot added the docs label May 23, 2023
@eformat
Copy link
Member Author

eformat commented May 23, 2023

Documentation for LDAP Group provider now added in this commit.

@eformat eformat marked this pull request as ready for review May 23, 2023 02:56
@eformat
Copy link
Member Author

eformat commented May 23, 2023

CLA - i signed this and returned it on 16/5/23 cheers.

@cla-bot
Copy link

cla-bot bot commented May 23, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

1 similar comment
@cla-bot
Copy link

cla-bot bot commented May 23, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@github-actions github-actions bot added bigquery BigQuery connector mongodb MongoDB connector labels Jul 13, 2023
@eformat eformat force-pushed the ldap-group-provider-2 branch from 161e5e2 to d145448 Compare July 13, 2023 22:21
@eformat eformat force-pushed the ldap-group-provider-2 branch from 81540be to e4dc470 Compare July 13, 2023 23:11
@eformat
Copy link
Member Author

eformat commented Jul 13, 2023

Can you rebase the PR. It looks like there were a few conflicts to be resolved

Done.

@zach-overflow
Copy link

Hi there! This is a very exciting PR (thank you so much for working on it @eformat ). Is there anything I could help here with? We would find this particular group provider extremely helpful for our own needs. I've not yet gone through the contributor agreements, but am happy to try to help if I'm able to get approved.

@hashhar

This comment was marked as off-topic.

@cla-bot

This comment was marked as off-topic.

@Praveen2112
Copy link
Member

@eformat Any updates on this PR ?

@eformat
Copy link
Member Author

eformat commented Nov 2, 2023

@eformat Any updates on this PR ?

hi, no. it is complete from a while back ? just waiting to be merged really.

@Praveen2112
Copy link
Member

Some of the review comments were not yet addressed. Can we address them and rebase the PR ?

@eformat
Copy link
Member Author

eformat commented Nov 2, 2023 via email

@Praveen2112
Copy link
Member

Like this one - #17518 (comment), In this case can other members (or myself) work on top of your PR for applying the comments and rebasing, I will make sure you will be added as a co-author in the new PR.

@eformat
Copy link
Member Author

eformat commented Nov 2, 2023

Like this one - #17518 (comment), In this case can other members (or myself) work on top of your PR for applying the comments and rebasing, I will make sure you will be added as a co-author in the new PR.

this is endless. i did not see these on june 12 - sorry. sure - feel free to work on top of the existing code.

Copy link

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Jan 15, 2024
@mosabua
Copy link
Member

mosabua commented Jan 15, 2024

@Praveen2112 could you work with @eformat and continue this PR?

Also cc @dain @ksobolew

@github-actions github-actions bot removed the stale label Jan 16, 2024
Copy link

github-actions bot commented Feb 7, 2024

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Feb 7, 2024
Copy link

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this Feb 29, 2024
@eformat eformat reopened this Mar 1, 2024
@eformat
Copy link
Member Author

eformat commented Mar 1, 2024

FYI .. i am still keen to get this merged .. looks like its going to take a bit more effort .. i may have some bandwidth coming up to get that last mile in on this PR ....

@ksobolew
Copy link
Contributor

ksobolew commented Mar 1, 2024

BTW, there's a competing PR with similar functionality: #20157

@eformat
Copy link
Member Author

eformat commented Mar 1, 2024

thats fine - @Praveen2112 as discussed - is that a clone of this PR ? if so i will close this and you can attribute as appropriate

@eformat eformat closed this Mar 4, 2024
@ksobolew
Copy link
Contributor

ksobolew commented Mar 4, 2024

is that a clone of this PR ?

No, it is an independent effort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery BigQuery connector cla-signed delta-lake Delta Lake connector docs hive Hive connector hudi Hudi connector iceberg Iceberg connector jdbc Relates to Trino JDBC driver mongodb MongoDB connector release-notes stale
Development

Successfully merging this pull request may close these issues.

7 participants