defenseunicorns / leapfrogai

Production-ready Generative AI for local, cloud native, airgap, and edge deployments.
https://leapfrog.ai
Apache License 2.0
250 stars 28 forks source link

(chore) Add Keycloak to E2E Playwright Tests #796

Open jalling97 opened 1 month ago

jalling97 commented 1 month ago

Describe what should be investigated or refactored

Since we use Keycloak as our primary auth source, our e2e workflow should reflect that. Currently we bypass keycloak and just use Supabase authentication.

Additional context

Keycloak has been disabled in e2e for the time being because it is unknown how to handle MFA in a CI env. It is possible though that an endpoint already exists to create a keycloak user that could be added to the API.

justinthelaw commented 1 month ago

I have not tested these values yet, due to a need to stay stable on UDS Core versions prior to a deployment, but there are values you can override if we use a UDS bundle to deploy UDS Core: https://github.com/defenseunicorns/uds-core/blob/cacf1b5d8bccd16a8c2381fbd0912715a78a22c2/src/keycloak/chart/values.yaml#L19

An untested example of how to use this (since I am on the wrong UDS Core version) is here: https://github.com/justinthelaw/uds-rke2/blob/8f0f0ffb8939a00956e5d2eb71e4fe9e7c701310/bundles/dev/local-path-core/uds-bundle.yaml#L103

justinthelaw commented 1 month ago

Oh, I had been using this wrong! Here are the proper docs to do the override in the bundle: https://github.com/defenseunicorns/uds-identity-config/blob/main/docs/CUSTOMIZE.md#customizing-realm