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

645 keycloak durch authservice ersetzen #680

Merged
merged 46 commits into from
Jan 9, 2025

Conversation

MrSebastian
Copy link
Member

@MrSebastian MrSebastian commented Jan 7, 2025

Beschreibung:

Entfernung von Keycloak und Verwendung Auth-Service

  • Die Rolle ROLE_ADMIN_ADMIN muss vorhanden da im Auth-Service nicht die Rechte, sondern nur die Rollen zur Verfügung stehen
  • die User wls_all* erhalten über die Testdaten alle Rechte
  • die Rechte werden über DB-Migration gepflegt
  • alle Beispiel-Requests wurden angepasst um mit dem Auth-Service zu arbeiten
  • extra Hosts wurden eingefügt damit die Services in Docker auch mit einem Auth-Service in der IDE kommunizieren können
  • Entfernen der Cookies in Richtung auth-Service ist wichtig da sonst neue Cookies gesetzt werden die dann nicht mehr einem Token im Gateway zugeordnet werden können
  • es sind die gleichen Benutzer vorhanden wie in Keycloak: wls_all, wls_all_uwb, wls_all_bwb, wls_test

Bekannte Probleme:

  • Wahlvorbereitung nicht in Docker startbar
    • wurde mit 3ed64b2 gefixt, aber danach kein Release gebaut

Definition of Done (DoD):

Backend

  • Codingconventions beachtet
  • Doku aktualisiert
  • Swagger-API vollständig - keine Änderung an API vorgenommen
  • Unit-Tests gepflegt
  • Integrationstests gepflegt - auf neue User umgestellt
  • Beispiel-Requests gepflegt

Referenzen1:

Closes #654

Summary by CodeRabbit

Based on the comprehensive summary of changes, here are the release notes:

Release Notes

  • Authentication and Authorization

    • Replaced Keycloak-based authentication with a new authentication service
    • Removed realm-specific configurations across all services
    • Updated OAuth2 endpoints for JWT and user information retrieval
    • Standardized Bearer token authorization mechanism
  • Documentation

    • Updated documentation to remove Keycloak-specific references
    • Removed migration and realm management sections
    • Simplified authentication terminology
  • Environment Configuration

    • Removed Keycloak-related environment variables
    • Added new SSO-related environment variables
    • Updated Docker Compose configuration to remove Keycloak services
  • Test Resources

    • Updated HTTP request files to use new authentication service
    • Simplified token retrieval process
    • Standardized authorization headers across services
  • Database Migrations

    • Retained existing user and authority configurations
    • Updated permission and role assignments
    • Maintained existing user management structures

Footnotes

  1. Nicht zutreffende Referenzen vor dem Speichern entfernen

@MrSebastian MrSebastian self-assigned this Jan 7, 2025
@MrSebastian MrSebastian linked an issue Jan 7, 2025 that may be closed by this pull request
8 tasks
Copy link
Contributor

coderabbitai bot commented Jan 7, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes represent a comprehensive migration from a Keycloak-based authentication system to a more generalized authentication service. The modifications span multiple services and configuration files, removing Keycloak-specific references and replacing them with a new Single Sign-On (SSO) approach. Key changes include updating OAuth2 configuration endpoints, removing realm-specific settings, and standardizing authorization methods across services. The changes affect authentication URIs, token retrieval mechanisms, and user management configurations. Documentation, environment variables, and test resources have been updated to reflect this new authentication strategy.

Assessment against linked issues

Objective Addressed Explanation
Backend Coding Conventions Changes follow consistent patterns across services
Documentation Updated Configuration and authentication documentation modified
Swagger-API Completeness Cannot definitively confirm without reviewing Swagger specifications
Unit Tests Maintained Test resources updated to reflect new authentication mechanism
Integration Tests Maintained HTTP request files updated with new authentication approach
Example Requests Updated HTTP request files modified with new token retrieval method

The changes appear to be primarily focused on authentication restructuring and do not directly address the specific requirements of reading and writing voting records (Wahlscheine). While the authentication mechanism has been updated, the implementation details for Wahlscheine management would need further investigation to confirm full compliance with issue #654.

Finishing Touches

  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or `` to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or `` anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

# Conflicts:
#	stack/keycloak/migration/keycloak-changelog.yml

permission from pr #663 added
@MrSebastian
Copy link
Member Author

@vjohnslhm ich habe die neue Rechte und Beispielanfragen die mit #663 soeben hinzukamen mit aufgenommen bzw. angepasst

Copy link
Contributor

@vjohnslhm vjohnslhm left a comment

Choose a reason for hiding this comment

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

hab noch ein paar zeilen duplicated code gefunden, ansonsten sieht es jetzt gut aus 👍🏽

@MrSebastian MrSebastian requested a review from vjohnslhm January 8, 2025 17:39
vjohnslhm
vjohnslhm previously approved these changes Jan 9, 2025
# Conflicts:
#	stack/.env
#	stack/docker-compose.yml
#	wls-admin-service/src/main/resources/application.yml
#	wls-briefwahl-service/src/main/resources/application.yml
#	wls-broadcast-service/src/main/resources/application-dev.yml
#	wls-broadcast-service/src/main/resources/application-kon.yml
#	wls-broadcast-service/src/main/resources/application-prod.yml
#	wls-ergebnismeldung-service/src/main/resources/application.yml
#	wls-infomanagement-service/src/main/resources/application.yml
#	wls-monitoring-service/src/main/resources/application.yml
@MrSebastian MrSebastian requested a review from vjohnslhm January 9, 2025 12:22
@MrSebastian MrSebastian enabled auto-merge January 9, 2025 12:23
Copy link
Contributor

@vjohnslhm vjohnslhm left a comment

Choose a reason for hiding this comment

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

sieht jetzt gut aus (:

@MrSebastian MrSebastian merged commit 33a15de into dev Jan 9, 2025
17 checks passed
@MrSebastian MrSebastian deleted the 645-keycloak-durch-authservice-ersetzen branch January 9, 2025 15:08
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.

Keycloak durch AuthService ersetzen
2 participants