Skip to content

Commit

Permalink
Svelte 5 Migration 16: migrate /admin/docs + /admin/config (#718)
Browse files Browse the repository at this point in the history
* migrate `<Documentation>`

* i18n `<LangSelector>` fixes for admin UI -> reduced set of translations

* fully responsive `<NavSub>` + `<NavLinkSub>`

* update `<Documentation>`

* rework `/admin/config` base layout

* migrate `/admin/config/policy`

* migrate `/admin/config/jwks`

* add additional i18n info for JWKS

* migrate `<Argon2Params>` + `<Argon2Utility>` + `<Argon2Results>`

* migrate `<EncKeys>`

* fix `/config` nav link highlight
  • Loading branch information
sebadob authored Feb 10, 2025
1 parent 539d8f5 commit 288b0d8
Show file tree
Hide file tree
Showing 912 changed files with 3,645 additions and 3,032 deletions.
9 changes: 9 additions & 0 deletions frontend/src/api/types/enc_keys.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface EncKeyMigrateRequest {
/// Validation: PATTERN_ALNUM
key_id: string,
}

export interface EncKeysResponse {
active: string,
keys: string[],
}
11 changes: 11 additions & 0 deletions frontend/src/api/types/login_times.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface Argon2ParamsResponse {
m_cost: number,
t_cost: number,
p_cost: number,
}

export interface LoginTimeResponse {
argon2_params: Argon2ParamsResponse,
login_time: number,
num_cpus: number,
}
20 changes: 20 additions & 0 deletions frontend/src/api/types/oidc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export type JwkKeyPairAlg = 'RS256' | 'RS384' | 'RS512' | 'EdDSA';
export type JwkKeyPairType = 'RSA' | 'OKP';

export interface JWKSPublicKeyCerts {
kty: JwkKeyPairType,
alg: JwkKeyPairAlg,
// Ed25519
crv?: string,
kid?: string,
// RSA
n?: string,
// RSA
e?: string,
// OCT
x?: string,
}

export interface JWKSCerts {
keys: JWKSPublicKeyCerts[],
}
20 changes: 20 additions & 0 deletions frontend/src/api/types/password_hashing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export interface PasswordHashTimesRequest {
/// Validation: min 500
target_time: number,
/// Validation: min 32768
m_cost?: number,
/// Validation: min 2
p_cost?: number,
}

export interface PasswordHashTime {
alg: string,
m_cost: number,
t_cost: number,
p_cost: number,
time_taken: number,
}

export interface PasswordHashTimes {
results: PasswordHashTime[],
}
19 changes: 19 additions & 0 deletions frontend/src/api/types/password_policy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
export interface PasswordPolicyRequest {
/// Validation: `8 <= length_min <= 128`
length_min: number,
/// Validation: `8 <= length_max <= 128`
length_max: number,
/// Validation: `1 <= include_lower_case <= 32`
include_lower_case?: number,
/// Validation: `1 <= include_upper_case <= 32`
include_upper_case?: number,
/// Validation: `1 <= include_digits <= 32`
include_digits?: number,
/// Validation: `1 <= include_special <= 32`
include_special?: number,
/// Validation: `1 <= valid_days <= 3650`
valid_days?: number,
/// Validation: `1 <= not_recently_used <= 10`
not_recently_used?: number,
}

export interface PasswordPolicyResponse {
length_min: number,
length_max: number,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/admin/AdminMain.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import Clients from "./clients/Clients.svelte";
import Sessions from "./sessions/Sessions.svelte";
import Attr from "./userAttr/Attr.svelte";
import Config from "./config/Config.svelte";
import Config from "$lib5/admin/config/Config.svelte";
import IconWrenchScrew from "$lib/icons/IconWrenchScrew.svelte";
import IconUser from "$lib/icons/IconUser.svelte";
import IconOffice from "$lib/icons/IconOffice.svelte";
Expand All @@ -21,7 +21,7 @@
import IconLogout from "$lib/icons/IconLogout.svelte";
import IconId from "$lib/icons/IconId.svelte";
import RauthyLogo from "$lib/icons/RauthyLogo.svelte";
import Documentation from "./documentation/Documentation.svelte";
import Documentation from "$lib5/admin/documentation/Documentation.svelte";
import IconBookOpen from "$lib/icons/IconBookOpen.svelte";
import {onMount} from "svelte";
import Events from "$lib5/admin/events/Events.svelte";
Expand Down
42 changes: 0 additions & 42 deletions frontend/src/components/admin/config/Config.svelte

This file was deleted.

194 changes: 0 additions & 194 deletions frontend/src/components/admin/config/argon2/Argon2Params.svelte

This file was deleted.

Loading

0 comments on commit 288b0d8

Please sign in to comment.