Skip to content

OIDC authentication #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lovasoa opened this issue Aug 31, 2023 · 6 comments
Closed

OIDC authentication #82

lovasoa opened this issue Aug 31, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@lovasoa
Copy link
Collaborator

lovasoa commented Aug 31, 2023

Feature Request: implement signin using an external OIDC (oauth) povider such as Google, Microsoft, Apple, Auth0, keycloak...

keyword: SSO, single-sign-on

This is a follow-up on #12

@lovasoa lovasoa added the enhancement New feature or request label Aug 31, 2023
@lovasoa
Copy link
Collaborator Author

lovasoa commented Apr 25, 2024

OIDC is still not available natively, but since sqlpage.fetch is available, it is possible to implement it manually in SQLPage. I wrote a demo here: https://github.com/lovasoa/SQLpage/tree/main/examples/single%20sign%20on

@accforgithubtest
Copy link

If I have an LDAP solution (LLDAP) and SSO (Authelia) running, using a reverse proxy that is doing forward_auth, is it possible for me to capture the headers that the reverse proxy sends after authentication is successfully completed ?

I tried to capture the headers Remote-User, Remote-Groups, Remote-Name, Remote-Email by adding below sample to index.sql (of an already working sqlpage set up, but without any authentication)

select 'cookie' as component,
	'userEmail' as name,
	coalesce(sqlpage.header('Remote-Email'), '') as value;

But this doesn't seem to capture the information from the headers.
Can you pls guide / provide hints as to how I might be able to proceed ?

My current state is that LLDAP, Authelia are set up and working.
SQLPage has been working without any login/auth using caddy reverse proxy.

[Apologies if I am missing something simple, I am not a developer but just learning docker based set up for self-hosting as I go along]

@lovasoa
Copy link
Collaborator Author

lovasoa commented Dec 4, 2024

Hi @accforgithubtest ! I think your problem comes from capitalizing the headers. sqlpage.header currently expects lower-case headers:

image

@lovasoa lovasoa closed this as completed in 0378b8e Dec 4, 2024
@accforgithubtest
Copy link

thanks for the reply @lovasoa !

Is there any specific reason sqlpage expects them to be lower case ?
Can this be enhanced to be case insensitive ?

Reason I ask is most examples I comes across online seem to be using a mix of all caps, mixed case, etc as well.
It would be good if case sensitivity was not an issue foe sqlpage headers ?

@lovasoa
Copy link
Collaborator Author

lovasoa commented Dec 4, 2024

Yes, I just pushed a change to the header function. The next version won't require you to lower case the header name!

@accforgithubtest
Copy link

That is awesome ! thank you so much @lovasoa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants