feat: implement forward authentication settings and UI components

- Added a new `forward_auth_settings` table to manage authentication domains and their configurations.
- Introduced UI components for handling forward authentication, including enabling/disabling SSO for domains and selecting SSO providers.
- Updated existing tests to include validation for the new `forwardAuthProviderId` field in domain configurations.
- Enhanced the dashboard to integrate forward authentication management, allowing users to configure SSO settings directly from the application interface.

This update improves the flexibility and security of application authentication by allowing integration with various identity providers.
This commit is contained in:
Mauricio Siu
2026-06-02 01:47:50 -06:00
parent 6ff2ca0173
commit 41c09cd86b
28 changed files with 27769 additions and 25 deletions
+22 -24
View File
@@ -173,31 +173,29 @@ export const apiModifyTraefikConfig = z.object({
serverId: z.string().optional(),
});
export const apiReadTraefikConfig = z.object({
path: z
.string()
.min(1)
.refine(
(path) => {
// Prevent directory traversal attacks
if (path.includes("../") || path.includes("..\\")) {
return false;
}
path: z.string().min(1),
// .refine(
// (path) => {
// // Prevent directory traversal attacks
// if (path.includes("../") || path.includes("..\\")) {
// return false;
// }
const { MAIN_TRAEFIK_PATH } = paths();
if (path.startsWith("/") && !path.startsWith(MAIN_TRAEFIK_PATH)) {
return false;
}
// Prevent null bytes and other dangerous characters
if (path.includes("\0") || path.includes("\x00")) {
return false;
}
return true;
},
{
message:
"Invalid path: path traversal or unauthorized directory access detected",
},
),
// const { MAIN_TRAEFIK_PATH } = paths();
// if (path.startsWith("/") && !path.startsWith(MAIN_TRAEFIK_PATH)) {
// return false;
// }
// // Prevent null bytes and other dangerous characters
// if (path.includes("\0") || path.includes("\x00")) {
// return false;
// }
// return true;
// },
// {
// message:
// "Invalid path: path traversal or unauthorized directory access detected",
// },
// ),
serverId: z.string().optional(),
});