ElektraInitiative / PermaplanT

https://www.permaplant.net
BSD 3-Clause "New" or "Revised" License
16 stars 13 forks source link

Feature/1182 collaborator api communication with keycloak #1184

Open Bushuo opened 9 months ago

Bushuo commented 9 months ago

Basics

Checklist

First Time Checklist

Review

Bushuo commented 9 months ago

jenkins build please

Bushuo commented 9 months ago

@markus2330

Die Variablen hinzuzufügen ist aber glaub ich noch zu früh, da ist imho noch Diskussionsbedarf. Lieber wäre mir eigentlich es gäbe so etwas wie KEYCLOAK_PASSWORD nicht, und es wird der Login vom Frontend verwendet.

Das ist leider nach meinem Erkenntnisstand nicht möglich. Die Admin REST API erfordert einen Login über den Admin Account. Das hab ich nur mit den variablen die ich definiert habe geschafft.

Damit könnte man dann auch steuern, dass nur Members andere Members sehen können (und nicht die Gäste).

Das verstehe ich nicht. Die role (member) kommt aus dem Token. Die anderen user kommen über ein request an die admin rest api. Man kann wsl auch die role mit der Admin api abfragen und dann filtern was als Suchergebnis zurück kommt.

Bushuo commented 9 months ago

@markus2330 I think this PR is ready now

markus2330 commented 9 months ago

@lukashartl and I will try tomorrow to fix the env vars and do the Keycloak setup.

Bushuo commented 9 months ago

@lukashartl and I will try tomorrow to fix the env vars and do the Keycloak setup.

Ping me if you need assistance.

Bushuo commented 8 months ago

@markus2330 what is the status of your testing? I would like to get this merged or keep working on it if it still needs work.

markus2330 commented 8 months ago

what is the status of your testing? I would like to get this merged or keep working on it if it still needs work.

I'll start testing when also frontend is ready. We can merge this when @lukashartl has fixed our keycloak+infrastructure to accept the env vars. We probably even need 3 steps:

  1. first fix pr.permaplant.net
  2. then dev.permaplant.net (and retrigger master builds until it works)
  3. and then fix www.permaplant.net (and release again)
Bushuo commented 8 months ago

I'll start testing when also frontend is ready.

Ok. I have the frontend ready on a separate branch that is based on this branch. I decided to rework the map creation and edit page. This also fixes #706, #1166 and #1163. Should I open another PR for it, even though this is not merged?

We can merge this when @lukashartl has fixed our keycloak+infrastructure to accept the env vars.

Alright, I also have a fix for #755, the first two of #1093 and #480. They all depend on this to be merged first.

markus2330 commented 7 months ago

jenkins build please

markus2330 commented 7 months ago

Keycloak was now reconfigured for this PR, let us see if the build succeeds.

markus2330 commented 7 months ago

Failed with:

/home/jenkins/workspace/PermaplanT_PR-1184@2/frontend/node_modules/vite/node_modules/rollup/dist/native.js:64

        throw new Error(

              ^

Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies
Bushuo commented 7 months ago

@markus2330 thats good news. I will get it to build in the evening.