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

OIDC/Auth2 integration #2649

Open
wants to merge 91 commits into
base: feature/keycloak-oidc
Choose a base branch
from

Conversation

boehlke
Copy link

@boehlke boehlke commented Sep 27, 2024

This PR contains a POC for a OIDC/oauth2 integration into OpenSlides. The dev setup is based on keycloak.

dependabot bot and others added 6 commits September 26, 2024 06:03
…#2648)

Bumps [debugpy](https://github.com/microsoft/debugpy) from 1.8.5 to 1.8.6.
- [Release notes](https://github.com/microsoft/debugpy/releases)
- [Commits](microsoft/debugpy@v1.8.5...v1.8.6)

---
updated-dependencies:
- dependency-name: debugpy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
hjanott and others added 3 commits September 27, 2024 14:00
* draft create update delete + tests + testupdates + migration

* update meta rep

* general error removal and improvement for draft

* remove meeting import error

* update meeting import so that checker removes gender_id

* general code improvements delete gender checks for back relation in organiziation

* md documentation + pleasing mypy

* use defaultdict

* use new in memory flag of datastore

* fix mypy error by upping datastore version

* change the permission from can_manage_organization to can_manage_users

* improve documentation

* lock result false + no orga check

* add test for gender import

* make name and org id required

* Use gender string for saml and meeting import. Refine gender actions and mixin. General code improvements.

* cleanup and documentation improvement

* beautify code

* add test update gender on user merge.

* update docs test for meeting import and saml account (+ new test) create gender for saml accounts

* updated meta

* meeting import create user with gender. export gender strings. improve tests.

* Separate test for gender on meeting import. General code improvements in saml, export, import and migration plus additional test for empty string.

* extend test for gender import, plus fixes. docs update

* improve user and gender updates/creation

* Gender will not be created without being used anymore. Fix error where import without any new genders would result in exception.

* Improve gender action documentation

* fixed typo in migration gender female

* update meta

* move to upstream main

---------

Co-authored-by: Ralf Peschke <[email protected]>
Co-authored-by: rrenkert <[email protected]>
…or (OpenSlides#2647)

* add new meeting specific setting hide metadata background for projector

* add setting to example-data.json

* repair test with missing setting entry

* add default value to example-data.json and setting to tests

* black
* Allow to edit own delegation via user.update_self

* Remove meeting setting

* Update meta
@boehlke boehlke added the keycloak-oidc OIDC support for OpenSlides with Keycloak as default IdP label Oct 1, 2024
openslides-automation bot and others added 5 commits October 1, 2024 12:31
* add migration to set default motion poll method

* Add method description and check for deleted models.
* Global enable anonymous

* Fix meeting.update
…akers (OpenSlides#2657)

* Ensure speaker.delete only resets projector countdown with active speakers

* Style

* Switch values
Copy link
Member

@luisa-beerboom luisa-beerboom left a comment

Choose a reason for hiding this comment

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

Amend the tests for actions that were updated, delete the tests for actions that were deleted.

Comment on lines 55 to 56
additional_optional_fields={
"saml_attr_mapping": {
"type": ["object", "null"],
"properties": saml_props,
"required": ["saml_id"],
"additionalProperties": False,
},
},
Copy link
Member

Choose a reason for hiding this comment

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

If it is going to be empty, you can delete the additional_optional_fields attribute.

Comment on lines -53 to -59
def create_authorization_token(self, user_id: int, email: str) -> str:
try:
response = self.auth_handler.create_authorization_token(user_id, email)
except AuthenticateException as e:
raise AuthenticationException(e.message)
return response.headers.get(AUTHORIZATION_HEADER, "")

Copy link
Member

Choose a reason for hiding this comment

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

openslides_backend/services/auth/interface.py defines the interface for this class, including this method. You should remove the method from that place as well

openslides-automation bot and others added 12 commits October 14, 2024 11:52
* Update meta repository

* Generate models

---------

Co-authored-by: bastianjoel <[email protected]>
Co-authored-by: Luisa <[email protected]>
…s#2668)

Bumps [black](https://github.com/psf/black) from 24.8.0 to 24.10.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@24.8.0...24.10.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [types-redis](https://github.com/python/typeshed) from 4.6.0.20240903 to 4.6.0.20241004.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* removed statutes
* add migration and tests
* cascading deletion with MigrationDeletionMixin
* add MigrationDeletionSchema
Co-authored-by: hjanott <[email protected]>
Co-authored-by: luisa-beerboom <[email protected]>
…2676)

Bumps [mypy](https://github.com/python/mypy) from 1.11.2 to 1.12.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v1.11.2...v1.12.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: luisa-beerboom <[email protected]>
boehlke and others added 30 commits November 18, 2024 17:11
Improving js syntax
Adding js highlighting
Deleting deleted presenters
Specifying required and optional parameters
remove old direct meeting mapping
---------

Co-authored-by: rrenkert <[email protected]>
…is meetings with requesting user. (OpenSlides#2576)

* Allow meeting admin user to update a non admin user that shares all his meetings with requesting admin user.
* Use user.can_update and user.can_manage.
* Implement get_user_editable presenter with payload field names to support all payload field groups.

---------

Co-authored-by: Elblinator <[email protected]>
Co-authored-by: luisa-beerboom <[email protected]>
…s#2721)

Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.4 to 3.1.3.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](pallets/werkzeug@3.0.4...3.1.3)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ing (OpenSlides#2745)

* enhance orga update schema for attr mapping
* allow int and strings with six decimals after dot for vote_weight
* use string booleans from fields.py
* Kill sessions when user is set to inactive
* Use new auth service version
…ides#2766)

allow submitter ids and additional submitter on motion create with can create and can manage metadata
forbid max votes per option > max amount total < min amount
…voting (OpenSlides#2768)

ignore candidates already on list of speakers but add others when changing phase to 'voting'
# Conflicts:
#	docs/actions/user.create.md
#	openslides_backend/action/actions/organization/update.py
#	openslides_backend/action/actions/user/create.py
#	requirements/export_service_commits.sh
#	tests/system/action/organization/test_update.py
#	tests/system/action/user/test_save_saml_account.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature keycloak-oidc OIDC support for OpenSlides with Keycloak as default IdP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants