You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: configuration.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ Here are the available configuration options and their default values:
26
26
|`allow_exec`| false | Allow usage of the `sqlpage.exec` function. Do this only if all users with write access to sqlpage query files and to the optional `sqlpage_files` table on the database are trusted. |
27
27
|`max_uploaded_file_size`| 5242880 | Maximum size of forms and uploaded files in bytes. Defaults to 5 MiB. |
28
28
|`oidc_protected_paths`|`["/"]`| A list of URL prefixes that should be protected by OIDC authentication. By default, all paths are protected (`["/"]`). If you want to make some pages public, you can restrict authentication to a sub-path, for instance `["/admin", "/users/settings"]`. |
29
+
|`oidc_public_paths`|`[]`| A list of URL prefixes that should be publicly available. By default, no paths are publicly accessible (`[]`). If you want to make some pages public, you can bypass authentication for a sub-path, for instance `["/public/", "/assets/"]`. Keep in mind that without the closing backslashes, that any directory or file starting with `public` or `assets` will be publicly available. This will also overwrite any protected path restriction. If you have a private path `/private` and you define the public path `/private/public/` everything in `/private/public/` will be publicly accessible, while everything else in private will still need authentication. You will not be able to define a private path inside a public path. |
29
30
|`oidc_issuer_url`|| The base URL of the [OpenID Connect provider](#openid-connect-oidc-authentication). Required for enabling Single Sign-On. |
30
31
|`oidc_client_id`| sqlpage | The ID that identifies your SQLPage application to the OIDC provider. You get this when registering your app with the provider. |
31
32
|`oidc_client_secret`|| The secret key for your SQLPage application. Keep this confidential as it allows your app to authenticate with the OIDC provider. |
Copy file name to clipboardExpand all lines: src/app_config.rs
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -206,9 +206,21 @@ pub struct AppConfig {
206
206
/// If you specify a list of prefixes, only requests whose path starts with one of the prefixes will require authentication.
207
207
/// For example, if you set this to `["/private"]`, then requests to `/private/some_page.sql` will require authentication,
208
208
/// but requests to `/index.sql` will not.
209
+
/// NOTE: `OIDC_PUBLIC_PATHS` takes precedence over `OIDC_PROTECTED_PATHS`.
210
+
/// For example, if you have `["/private"]` on the `protected_paths` like before, but also `["/private/public"]` on the `public_paths`, then `/private` requires authentication, but `/private/public` requires not authentication.
211
+
/// You cannot make a path inside a public path private again. So expanding the previous example, if you now add `/private/public/private_again`, then this path will still be accessible.
/// Defines a list of path prefixes that should be ignored by OIDC authentication
216
+
/// By default, now paths will be ignored.
217
+
/// If you specify a list of prefixes, requests whose path starts with one of the prefixes will be not require authentication.
218
+
/// For example, if set this to `["/public"]`, then requests to `/public/some_page.sql` will not require authentication,
219
+
/// but requests to `/index.sql` will.
220
+
/// If you still want to make `/index.sql` public, but leave the rest of the folder protected, then append `["/index.sql"]`. But keep in mind that if you have a directory that starts with `index.sql` that it will also be public.
221
+
#[serde(default = "default_oidc_public_paths")]
222
+
puboidc_public_paths:Vec<String>,
223
+
212
224
/// A domain name to use for the HTTPS server. If this is set, the server will perform all the necessary
213
225
/// steps to set up an HTTPS server automatically. All you need to do is point your domain name to the
0 commit comments