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

Keycloak docker container issue #1

Closed
borispopicbusiness opened this issue Aug 12, 2024 · 5 comments
Closed

Keycloak docker container issue #1

borispopicbusiness opened this issue Aug 12, 2024 · 5 comments

Comments

@borispopicbusiness
Copy link
Owner

The issue with the Keycloak Docker container remains unresolved. However, my research has yielded some insights. I am currently preparing the materials for a customized Docker image. The main challenge is that Keycloak is unable to import the advanced tt_realm_config.json file, which was exported from a non-Dockerized Keycloak installation on the malfunctioning workstation.

@borispopicbusiness
Copy link
Owner Author

This was the root of the problem. I deleted them, and the file was uploaded successfully.
Check this link for further analysis:
keycloak/keycloak#11664

I will add some temporary remarks regarding the issue to README.md and push it to the master branch. I will also update tt_realm_config.json and push it to the develop branch, continuing to test everything until it is fully polished.

      {
        "id": "6c75eed2-f25c-4c61-8700-1f1e31d91a0e",
        "name": "Default Policy",
        "description": "A policy that grants access only for users within this realm",
        "type": "js",
        "logic": "POSITIVE",
        "decisionStrategy": "AFFIRMATIVE",
        "config": {
          "code": "// by default, grants any permission associated with this policy\n$evaluation.grant();\n"
        }
      },
      {
        "id": "60151eef-11be-4817-be0c-f94385f51631",
        "name": "Default Permission",
        "description": "A permission that applies to the default resource type",
        "type": "resource",
        "logic": "POSITIVE",
        "decisionStrategy": "UNANIMOUS",
        "config": {
          "defaultResourceType": "urn:tt_client:resources:default",
          "applyPolicies": "[\"Default Policy\"]"
        }
      }

@borispopicbusiness
Copy link
Owner Author

Dockerfile has been added. Now we can built our customized Keycloak docker container. However, importing realm is still a manual process. I have lost my mind researching different versions of Keycloak. I've spent a lot of time researching various versions of Keycloak and need a day or two to take a break and clear my mind. Tomorrow, I will be researching Keycloak-backend stability with realm import still performed manually.

@borispopicbusiness
Copy link
Owner Author

The issue with --import-realm has been resolved. I am now testing the image and preparing to establish a connection with the PostgreSQL database intended for Keycloak's instance.

@borispopicbusiness
Copy link
Owner Author

ROLE_ prefix fixed in application/src/main/java/com/semiramide/timetracker/application/config/SecurityConfig.java
This issue may appear again, since Keycloak has been upgraded. Then, 404 error has been fixed. That has to be tested. The urls. Anyway, Backend is runnable again, but i have to check if it is fully functional again.

See commit 76569f8

@borispopicbusiness
Copy link
Owner Author

bash script for testing keycloak flow added, role assigned, user created/updated/deleted. the flow works
README.md updated

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

No branches or pull requests

1 participant