Open sberyozkin opened 10 months ago
This approach is about users having input into authorizing Quarkus to do some work for them with LLM, as far as the demo is concerned, it can be a copy and paste of https://quarkus.io/guides/security-oidc-auth0-tutorial#permission-based-access-control (with an LLM focused example), but I'll see if I can make it work with Keycloak first.
There could be possibly one more pattern, where Quarkus acts similar to ChatGPT UI, and one of its plugins is registered in the openai platform, and requires an OAuth2 authentication:
https://platform.openai.com/docs/plugins/authentication/oauth, so the user would authenticate to Quarkus using OAuth2 (via the OpenAI platform) and that will enable an access token which will be used as an OpenAI key. I'm not sure yet if it can work with Quarkus at all, but just typing here in case it proves feasible
I propose to demo and also recommend the following set up: a user logs in to a frontend Quarkus application (say
Quarkus LLM
) which talks to a microservice which uses the LLM, when the users logs in to the frontend the user is redirected to OIDC where the user will be asked to allowQuarkus LLM
to apply for exampleLarge Language Model
to whateverQuarkus LLM
is expected to solve/do. When the user approves and logs in toQuarkus LLM
will propagate the access token to the microservice which will only be allowed to be accessed when such a token has an LLM scope/permission.