Repository containing the README shown in the GitHub VSHN profile page.
vshn / appuio-keycloak-adapter Goto Github PK
View Code? Open in Web Editor NEWOrganization Adapter for APPUiO Cloud
License: BSD 3-Clause "New" or "Revised" License
Organization Adapter for APPUiO Cloud
License: BSD 3-Clause "New" or "Revised" License
As an APPUiO Cloud Developer
I want to be able to sync organization as sub-group
So that I can separate groups representing organizations from other groups
To be able to attach the adapter to an existing Keycloak realm with existing groups that do not represent organizations, we want to be able to separate organizations from other groups.
This means if we have two organizations foo
and bar
and teams foo1
and foo2
in foo
, and the adapter is configured to synchronize to a "root-group" organizations
the following group structure is created on Keycloak
├── not-an-org
├── organizations
│ ├── bar
│ └── foo
│ ├── foo1
│ └── foo2
└── other-group
No response
No response
root-group
and organizations are synchronized as sub-groups of this root-group
instead of as top level groups.No response
When a user that's been synced to the control-api is deleted in keycloak, subsequent reconciles for that user object fail with
{"level":"error","ts":"2023-06-09T12:33:09Z","msg":"Reconciler error","controller":"user","controllerGroup":"appuio.io","controllerKind":"User","User":{"name":"<redacted>"},"namespace":"","name":"<redacted>","reconcileID":"cfcb6169-0f20-4e83-83f4-cb063e6d1c26","error":"failed querying keycloak for user \"<redacted>\": user \"<redacted>\" not found","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235"}
From looking through the code, there's simply no logic to handle this case cleanly. I don't remember if that was an oversight or a conscious decision to not delete users which don't exist anymore in Keycloak.
Users are created when groups are synced (cf.
).The user reconcile loop then tries to update changes to the user's profile in keycloak in
appuio-keycloak-adapter/controllers/user_controller.go
Lines 54 to 61 in 84de744
{"level":"error","ts":"2023-06-09T12:33:09Z","msg":"Reconciler error","controller":"user","controllerGroup":"appuio.io","controllerKind":"User","User":{"name":"<redacted>"},"namespace":"","name":"<redacted>","reconcileID":"cfcb6169-0f20-4e83-83f4-cb063e6d1c26","error":"failed querying keycloak for user \"<redacted>\": user \"<redacted>\" not found","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235"}
Stale user objects are deleted when the corresponding user in Keycloak has been deleted.
appuio-keycloak-adapter v0.6.1
If not kept in sync with https://github.com/appuio/cloud-portal this adapter will delete fields from the stored Organizations.
should minimally updated to use server side merge so we don't have to be extra cautious to keep this adapter in sync.
No response
No response
Controller uses server side merge for organizations.
< v0.6.0
.spec.billingEntityRef
on an organization.spec.billingEntityRef
disappearsall
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.