devflowinc / trieve

All-in-one infrastructure for search, recommendations, RAG, and analytics offered via API
https://dashboard.trieve.ai
Other
1.44k stars 123 forks source link

feature: support SSO authentication with keycloak #1808

Closed varshith257 closed 2 months ago

varshith257 commented 3 months ago

fixes https://github.com/devflowinc/trieve/issues/1697

Related maintainer: @skeptrunedev

varshith257 commented 3 months ago

@skeptrunedev This is the follow-up to our discussion in the discord. I am more interested in completing this issue. If any changes/suggestions are given, I am more happy to incorporate them

skeptrunedev commented 2 months ago

What were the steps you used to test this?

varshith257 commented 2 months ago

@skeptrunedev As you told you will test it in our conversation by pulling this changes . I didn't made a way to test it 😅

skeptrunedev commented 2 months ago

Just tried starting keycloak with this new realm-export and it did not work:

keycloak  | 2024-07-09 04:46:10,547 INFO  [org.keycloak.exportimport.singlefile.SingleFileImportProvider] (main) Full importing from file /opt/keycloak/bin/../data/import/realm-export.json
keycloak  | 2024-07-09 04:46:10,608 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (development) mode
keycloak  | 2024-07-09 04:46:10,608 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "clientId" (class org.keycloak.representations.idm.RoleRepresentation), not marked as ignorable (9 known properties: "clientRole", "composite", "scopeParamRequired", "id", "description", "attributes", "name", "composites", "containerId"])
keycloak  |  at [Source: (ByteArrayInputStream); line: 404, column: 24] (through reference chain: org.keycloak.representations.idm.RealmRepresentation["roles"]->org.keycloak.representations.idm.RolesRepresentation["client"]->java.util.LinkedHashMap["account"]->java.util.ArrayList[8]->org.keycloak.representations.idm.RoleRepresentation["clientId"])
keycloak  | 2024-07-09 04:46:10,608 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Unrecognized field "clientId" (class org.keycloak.representations.idm.RoleRepresentation), not marked as ignorable (9 known properties: "clientRole", "composite", "scopeParamRequired", "id", "description", "attributes", "name", "composites", "containerId"])
keycloak  |  at [Source: (ByteArrayInputStream); line: 404, column: 24] (through reference chain: org.keycloak.representations.idm.RealmRepresentation["roles"]->org.keycloak.representations.idm.RolesRepresentation["client"]->java.util.LinkedHashMap["account"]->java.util.ArrayList[8]->org.keycloak.representations.idm.RoleRepresentation["clientId"])
keycloak  | 2024-07-09 04:46:10,608 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.
keycloak exited with code 1

Going to close for now pending some testing with proven successful start of keycloak via docker at least.

varshith257 commented 2 months ago

@skeptrunedev Will update on this

skeptrunedev commented 2 months ago

/tip $150 @varshith257

algora-pbc[bot] commented 2 months ago

👉 @skeptrunedev: Navigate to your dashboard to proceed

algora-pbc[bot] commented 2 months ago

🎉🎈 @varshith257 has been awarded $150! 🎈🎊