Can I use Keycloak auth for Gitlab Pages?

587 Views Asked by At

I am currently looking at Gitlab Pages for hosting & serving my app documentation. Unfortunately I can't tell from their documentation if I can use it with my existing Keycloak instance.

I'd like my Gitlab Page to be accessible only by logged in app users. Is it possible for me to achieve that?

Thank you!

1

There are 1 best solutions below

0
On

Theoretically yes, I have not used Gitlab Pages, but if it is used for the purposes of deploying your app then it should be no problem.

Your app would redirect users to your existing Keycloak instance's client for your app to login, and if authentication is successful, the client would be redirected to a callback url at which point your users will be authenticated.

Here is some Keycloak documentation on authenticating users's via OIDC https://www.keycloak.org/docs/latest/securing_apps/#openid-connect-3