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

Unique constraints for auth_provider_id #944

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LukasLohoff
Copy link
Member

Description

There should never be more than one user entity for a keycloak entity. So this adds unique constraints on auth_provider_id to users and groups. roles already have the constraint.

@terrestris/devs Please review

Related issues or pull requests

Pull request type

  • Bugfix
  • Feature
  • Dependency updates
  • Tests
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe)

Do you introduce a breaking change?

  • Yes
  • No

Checklist

  • I understand and agree that the changes in this PR will be licensed under the
    Apache Licence Version 2.0.
  • I have followed the guidelines for contributing.
  • The proposed change fits to the content of the code of conduct.
  • I have added or updated tests and documentation, and the test suite passes (run mvn test locally).
  • I have added a screenshot/screencast to illustrate the visual output of my update.

@LukasLohoff
Copy link
Member Author

Test failures: When creating users currently two entities with the same auth_provider_id are saved. This might be related to getUserBySession, more precisely the fact that getUserBySession also creates a user if not present. Not sure if this is an issue with the test setup or an issue with shogun itself.

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.

1 participant