-
-
Notifications
You must be signed in to change notification settings - Fork 154
Added configuration option to skip OIDC authorization checks for certain endpoints #969
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
Merged
lovasoa
merged 18 commits into
sqlpage:main
from
lenardt-gerhardts:feature/oidc-endpoint-passtrough
Jul 25, 2025
Merged
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
37f76c3
Added posibility to bypass oidc authentication for certain endpoints
c90133f
fixxed missing .clone()
334003f
Fixxed oidc_skip_endpoints not being optional
db0dd5c
Merge branch 'main' into feature/oidc-endpoint-passtrough
lovasoa 312073a
feat(oidc): Introduce protected path prefixes
lovasoa 9aead0f
docs(oidc): Improve OIDC documentation and examples
lovasoa 21d13f9
Simplify OIDC middleware request handling for unprotected paths
lovasoa 556b0ac
Merge branch 'main' into feature/oidc-endpoint-passtrough
lovasoa 8ac62c0
docs(oidc): Improve single sign on example
lovasoa 741f2e1
docs(oidc): Document oidc_protected_paths in configuration.md
lovasoa b3da7a6
Improve SSO demo UX
lovasoa 18769eb
Skip OIDC auth for non-protected paths later in middleware
lovasoa 8d18f52
Added whitelist option
6235eff
Update configuration.md
lovasoa 1133a77
Improve OIDC public paths documentation
lovasoa fa75c39
Add OidcConfig method to check public paths
lovasoa e709d6d
fix default empty public paths
lovasoa 0fef767
Update SSO example with new image path and public access rules
lovasoa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,18 @@ | ||
| set user_email = sqlpage.user_info('email'); | ||
| SELECT 'shell' as component, 'My public app' as title; | ||
|
|
||
| select 'shell' as component, 'My secure app' as title, | ||
| 'logout' as menu_item; | ||
| set email = sqlpage.user_info('email'); | ||
|
|
||
| select 'text' as component, | ||
| 'You''re in !' as title, | ||
| 'You are logged in as *`' || $user_email || '`*. | ||
| You have access to the [protected page](protected.sql). | ||
| -- For anonymous users | ||
| SELECT 'hero' as component, | ||
| '/protected' as link, | ||
| 'Log in' as link_text, | ||
| 'Welcome' as title, | ||
| 'You are currently browsing as a guest. Log in to access the protected page.' as description, | ||
| 'https://images.pexels.com/photos/954599/pexels-photo-954599.jpeg' as image | ||
| WHERE $email IS NULL; | ||
|
|
||
| ' | ||
| as contents_md; | ||
|
|
||
| select 'list' as component; | ||
| select key as title, value as description | ||
| from json_each(sqlpage.id_token()); | ||
| -- For logged-in users | ||
| SELECT 'text' as component, | ||
| 'Welcome back, ' || sqlpage.user_info('name') || '!' as title, | ||
| 'You are logged in as ' || sqlpage.user_info('email') || '. You can now access the [protected page](/protected) or [log out](/logout).' as contents_md | ||
| WHERE $email IS NOT NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,17 @@ | ||
| select 'card' as component, 'My secure protected page' as title, 1 as columns; | ||
|
|
||
| select | ||
| 'Secret video' as title, | ||
| 'https://www.youtube.com/embed/mXdgmSdaXkg' as embed, | ||
| 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share' as allow, | ||
| 'iframe' as embed_mode, | ||
| '700' as height; | ||
| set user_email = sqlpage.user_info('email'); | ||
|
|
||
| select 'shell' as component, 'My secure app' as title, | ||
| 'logout' as menu_item; | ||
|
|
||
| select 'text' as component, | ||
| 'You''re in, '|| sqlpage.user_info('name') || ' !' as title, | ||
| 'You are logged in as *`' || $user_email || '`*. | ||
|
|
||
| You have access to this protected page. | ||
|
|
||
| ' | ||
| as contents_md; | ||
|
|
||
| select 'list' as component; | ||
| select key as title, value as description | ||
| from json_each(sqlpage.user_info_token()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| oidc_issuer_url: http://localhost:8181/realms/sqlpage_demo | ||
| oidc_client_id: sqlpage | ||
| oidc_client_secret: qiawfnYrYzsmoaOZT28rRjPPRamfvrYr # For a safer setup, use environment variables to store this | ||
| oidc_protected_paths: | ||
| - /protected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.