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

#195: Initial implementation of read-only LDAP User and UserGroup DAOs #197

Merged
merged 3 commits into from
Nov 11, 2019

Conversation

mbarto
Copy link
Contributor

@mbarto mbarto commented Nov 11, 2019

Enabling these DAOs (see example in xml) users and groups are fetched from LDAP instead of the internal database.
Current support is limited to API calls required by MapStore permissions handling.

@coveralls
Copy link

coveralls commented Nov 11, 2019

Coverage Status

Coverage increased (+1.6%) to 36.749% when pulling a7201d6 on mbarto:ldap_usergroup into 15b4ac8 on geosolutions-it:master.

*/
@Override
public User merge(User entity) {
// DO NOTHING: PERSITENCE IS NOT SUPPORTED
Copy link
Member

Choose a reason for hiding this comment

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

Theoretically these write operations should fail instead of faking success (rising an exception like "unsupported operation") ? I know this is a safest solution in terms of compatibility, at the expense of the consistency of the operations, Did you already tried?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put execeptions initially, but I had to remove them because persistence was called in some
weird cases, I will check if those are not an issue anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it works also throwing exception, so I did another commit for this

Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

Ok, another couple of questions:

  • Is there some schema of how this works, so we can add it to the wiki ?
  • This can be used only "instead of" but not in parallel with other services, right ?
    • if yes, it is correct that in case we have to have multiple user services (LDAP+SPID+DB...), we have to come back to old system? The old LDAP integration will be maintained, anyway, right?
    • if no: how the ID's conflicts are solved?

mbarto and others added 2 commits November 11, 2019 16:19
…re/dao/ldap/impl/UserGroupDAOImpl.java

Co-Authored-By: Lorenzo Natali <offtherailz@gmail.com>
@mbarto
Copy link
Contributor Author

mbarto commented Nov 11, 2019

These DAOs can be currently used on an LDAP only environment. We can improve them in the future to support multiple sources

@mbarto mbarto merged commit 6061ba6 into geosolutions-it:master Nov 11, 2019
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.

3 participants