etape 9
EBO <eric@ebii.fr> committé le 2026-11-19 12:44
aa2839d474892cd0b42925208a343b590e201ffc
1 parent(s)
40 fichiers modifiés
+837
-22
M
Cargo.lock
+1
-0
@@ -1562,6 +1562,7 @@ dependencies = [
| 1562 | 1562 | "rand 0.10.3", |
| 1563 | 1563 | "reqwest", |
| 1564 | 1564 | "ring", |
| 1565 | + "rustix", | |
| 1565 | 1566 | "serde", |
| 1566 | 1567 | "serde_json", |
| 1567 | 1568 | "serde_norway", |
M
ansible/molecule/console/verify.yml
+23
-3
@@ -411,7 +411,7 @@
| 411 | 411 | - name: Chaque démarrage est inscrit, la chaîne vérifiée à chaque fois |
| 412 | 412 | ansible.builtin.assert: |
| 413 | 413 | that: |
| 414 | - - verification.stdout is match('^Chaîne vérifiée \(' ~ lignes | length ~ ' lignes\)$') | |
| 414 | + - verification.stdout_lines[0] is match('^Chaîne vérifiée \(' ~ lignes | length ~ ' lignes\)$') | |
| 415 | 415 | - lignes | length >= 3 |
| 416 | 416 | - (lignes[0] | from_json).precedent == '0' * 64 |
| 417 | 417 | - lignes | map('from_json') | map(attribute='evenement') | unique == ['demarrage'] |
@@ -484,6 +484,22 @@
| 484 | 484 | fail_msg: "{{ attributs.stdout }}" |
| 485 | 485 | quiet: true |
| 486 | 486 | |
| 487 | + # OI-209 : la console lit le même attribut (FS_IOC_GETFLAGS), et audit verifier le dit ; seule la | |
| 488 | + # cible qui accepte l'attribut prouve le cas « verrouillé ». | |
| 489 | + - name: Lire le verrou du journal par la console | |
| 490 | + ansible.builtin.command: | |
| 491 | + argv: ["{{ console }}", audit, verifier] | |
| 492 | + register: verrou | |
| 493 | + changed_when: false | |
| 494 | + | |
| 495 | + - name: La console voit le journal verrouillé quand le système le permet, modifiable sinon | |
| 496 | + ansible.builtin.assert: | |
| 497 | + that: >- | |
| 498 | + verrou.stdout_lines[-1] == ("Journal verrouillé : l'attribut « ajout seul » est posé." | |
| 499 | + if essai.rc == 0 else "Journal modifiable : l'attribut « ajout seul » est absent.") | |
| 500 | + fail_msg: "{{ verrou.stdout }}" | |
| 501 | + quiet: true | |
| 502 | + | |
| 487 | 503 | - name: Signaler l'essai de l'attribut « ajout seul » |
| 488 | 504 | ansible.builtin.debug: |
| 489 | 505 | msg: "Attribut « ajout seul » {{ 'posé et vérifié' if essai.rc == 0 else 'indisponible sur cette cible' }}" |
@@ -525,7 +541,7 @@
| 525 | 541 | loop_control: |
| 526 | 542 | label: "{{ item.nom }}" |
| 527 | 543 | |
| 528 | - - name: Un chattr refusé faute de droits arrête le rôle et nomme la variable d'accord | |
| 544 | + - name: Un chattr refusé faute de droits arrête le rôle et renvoie à la case de l'assistant | |
| 529 | 545 | block: |
| 530 | 546 | - name: Rejouer le rôle console avec chattr refusé |
| 531 | 547 | ansible.builtin.include_role: |
@@ -538,11 +554,15 @@
| 538 | 554 | ansible.builtin.fail: |
| 539 | 555 | msg: Le rôle console est passé avec un chattr refusé faute de droits |
| 540 | 556 | rescue: |
| 541 | - - name: L'arrêt nomme la capacité manquante et la variable qui accepte un journal sans ajout seul | |
| 557 | + # OI-209 : la case de l'étape Sécurité, le guide, et la variable pour qui joue le rôle seul. | |
| 558 | + - name: L'arrêt nomme la capacité manquante, la case de l'assistant, le guide et la variable | |
| 542 | 559 | ansible.builtin.assert: |
| 543 | 560 | that: |
| 544 | 561 | - ansible_failed_task.name != "Le rôle aurait dû s'arrêter" |
| 545 | 562 | - ansible_failed_result.msg is search('CAP_LINUX_IMMUTABLE') |
| 563 | + - ansible_failed_result.msg is search('Accepter un journal d.audit modifiable si le serveur refuse de le verrouiller') | |
| 564 | + - ansible_failed_result.msg is search('étape Sécurité') | |
| 565 | + - ansible_failed_result.msg is search('Protéger le journal d.audit de la console') | |
| 546 | 566 | - ansible_failed_result.msg is search('oiam_console_journal_sans_ajout_seul') |
| 547 | 567 | fail_msg: "{{ ansible_failed_task.name }} : {{ ansible_failed_result.msg | default('') }}" |
| 548 | 568 | quiet: true |
M
ansible/roles/console/defaults/main.yml
+2
-1
@@ -28,7 +28,8 @@ oiam_console_installation: "{{ oiam_console_etc }}/installation.yaml"
| 28 | 28 | # le système de fichiers et les droits le permettent (pas dans un conteneur, par exemple). |
| 29 | 29 | oiam_console_journal: "{{ oiam_console_etat }}/audit.jsonl" |
| 30 | 30 | # Sans l'attribut « ajout seul » faute de droits (CAP_LINUX_IMMUTABLE), le rôle s'arrête (OI-174), |
| 31 | -# sauf accord explicite ; commandes remplaçables pour la recette. | |
| 31 | +# sauf accord explicite : case de l'étape Sécurité de l'assistant (OI-209) ; commandes remplaçables | |
| 32 | +# pour la recette. | |
| 32 | 33 | oiam_console_journal_sans_ajout_seul: false |
| 33 | 34 | oiam_console_lsattr: lsattr |
| 34 | 35 | oiam_console_chattr: chattr |
M
ansible/roles/console/tasks/main.yml
+9
-4
@@ -200,17 +200,22 @@
| 200 | 200 | that: >- |
| 201 | 201 | oiam_console_ajout_seul.stderr | default('') is not search('not permitted') |
| 202 | 202 | or oiam_console_journal_sans_ajout_seul | bool |
| 203 | + # OI-209 : la case de l'étape Sécurité (E005-C12) pose oiam_console_journal_sans_ajout_seul. | |
| 203 | 204 | fail_msg: >- |
| 204 | - chattr +a est refusé sur {{ oiam_console_journal }} : root n'a pas la capacité CAP_LINUX_IMMUTABLE | |
| 205 | - sur ce serveur (conteneur ?). Donnez-la au serveur, ou acceptez un journal sans ajout seul en | |
| 206 | - posant oiam_console_journal_sans_ajout_seul: true. | |
| 205 | + Le serveur refuse de verrouiller le journal d'audit {{ oiam_console_journal }} en ajout seul : | |
| 206 | + chattr +a est refusé, root n'a pas la capacité CAP_LINUX_IMMUTABLE (conteneur LXC non privilégié, | |
| 207 | + par exemple). Installez la console sur une machine virtuelle, ou cochez « Accepter un journal | |
| 208 | + d'audit modifiable si le serveur refuse de le verrouiller » à l'étape Sécurité de l'assistant | |
| 209 | + (variable oiam_console_journal_sans_ajout_seul: true). Voir le guide « Protéger le journal | |
| 210 | + d'audit de la console ». | |
| 207 | 211 | quiet: true |
| 208 | 212 | |
| 209 | 213 | - name: Signaler un journal d'audit sans ajout seul |
| 210 | 214 | ansible.builtin.debug: |
| 211 | 215 | msg: >- |
| 212 | 216 | {{ oiam_console_journal }} ne peut pas recevoir l'attribut « ajout seul » sur ce système : la chaîne |
| 213 | - SHA-256 et sa copie dans le journal du service restent ses protections. | |
| 217 | + SHA-256 et sa copie dans le journal du service restent ses protections, et le tableau de bord de | |
| 218 | + la console signale le journal modifiable (OI-209). | |
| 214 | 219 | when: oiam_console_attributs.rc != 0 or oiam_console_ajout_seul.rc | default(0) != 0 |
| 215 | 220 | |
| 216 | 221 | - name: Publier la console derrière nginx |
M
commun/style/app.css
+2
-2
@@ -1,3 +1,3 @@
| 1 | -/* Feuille précompilée par commun/build.rs, ne pas modifier. Empreinte des sources : 6565897d87cdfafe */ | |
| 1 | +/* Feuille précompilée par commun/build.rs, ne pas modifier. Empreinte des sources : 3ced81b9cd5e5bc3 */ | |
| 2 | 2 | /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */ |
| 3 | -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--spacing:4px;--container-3xl:48rem;--font-weight-normal:400;--font-weight-semibold:600;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-card-border:#d9d9d9;--color-dashed-border:#ddd;--color-error:#f5222d;--color-graphite:#3b3e40;--color-ink:#262626;--color-ink-secondary:#595959;--color-nav-ink:#303233;--color-on-primary:#fff;--color-primary:#0070d5;--color-slate:#6c7073;--color-title-ink:#333;--color-background:#fff;--color-border:#e8e8e8;--color-card:#fff;--color-destructive:#cf1322;--color-error-bg:#fff1f0;--color-error-ink:#cf1322;--color-foreground:#262626;--color-info:#0070d5;--color-info-bg:#f2f8ff;--color-input:#8c8c8c;--color-log-bg:#272727;--color-log-changed:#ffd666;--color-log-failed:#ff7875;--color-log-fg:#f4f4f5;--color-log-ok:#95de64;--color-muted:#f7f9fa;--color-muted-foreground:#595959;--color-primary-foreground:#fff;--color-ring:#0070d5;--color-success:#237804;--color-success-bg:#f6ffed;--color-warning:#be4e04;--color-warning-bg:#fff7e6;--text-2xl:32px;--text-2xl--line-height:1.125;--text-2xl--letter-spacing:-.96px;--text-2xl--font-weight:600;--text-3xl:40px;--text-3xl--line-height:1.2;--text-3xl--letter-spacing:-1.2px;--text-3xl--font-weight:600;--text-badge:12px;--text-badge--line-height:1.33;--text-badge--letter-spacing:-.24px;--text-badge--font-weight:600;--text-base:16px;--text-base--line-height:1.5;--text-base--letter-spacing:-.32px;--text-base--font-weight:400;--text-lg:20px;--text-lg--line-height:1.2;--text-lg--letter-spacing:-.6px;--text-lg--font-weight:600;--text-md:18px;--text-md--line-height:1.33;--text-md--letter-spacing:-.36px;--text-md--font-weight:600;--text-sm:14px;--text-sm--line-height:1.43;--text-sm--letter-spacing:-.28px;--text-sm--font-weight:400;--text-xs:12px;--text-xs--line-height:1.33;--text-xs--letter-spacing:-.24px;--text-xs--font-weight:400;--font-mono:"JetBrains Mono Variable","JetBrains Mono",ui-monospace,monospace;--font-sans:"Open Sans Variable","Open Sans",system-ui,sans-serif;--radius-full:9999px;--radius-none:0px;--radius-sm:8px;--radius-xl:60px;--radius-xs:4px;--spacing-huge:48px;--spacing-lg:20px;--spacing-md:16px;--spacing-section:64px;--spacing-sm:12px;--spacing-xl:24px;--spacing-xs:8px;--spacing-xxl:32px;--spacing-xxs:4px;--spacing-xxxl:40px;--container-card:28rem;--container-champ:20rem;--container-form:960px;--container-page:1200px;--shadow-float:0 8px 16px #0000001a;--breakpoint-sm:457px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html{background-color:var(--color-background);font-family:var(--font-sans);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));letter-spacing:var(--tw-tracking,var(--text-base--letter-spacing));font-weight:var(--tw-font-weight,var(--text-base--font-weight));color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:focus-visible{outline-style:var(--tw-outline-style);outline-offset:2px;outline-width:2px;outline-color:var(--color-ring)}[x-cloak]{display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-md{right:var(--spacing-md)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-md{bottom:var(--spacing-md)}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.-m-xs{margin:calc(var(--spacing-xs)*-1)}.-m-xxs{margin:calc(var(--spacing-xxs)*-1)}.m-0{margin:calc(var(--spacing)*0)}.m-auto{margin:auto}.-mx-md{margin-inline:calc(var(--spacing-md)*-1)}.mx-auto{margin-inline:auto}.-mt-xs{margin-top:calc(var(--spacing-xs)*-1)}.mt-auto{margin-top:auto}.mt-lg{margin-top:var(--spacing-lg)}.mt-md{margin-top:var(--spacing-md)}.mt-sm{margin-top:var(--spacing-sm)}.mt-xl{margin-top:var(--spacing-xl)}.mt-xs{margin-top:var(--spacing-xs)}.mt-xxl{margin-top:var(--spacing-xxl)}.mt-xxs{margin-top:var(--spacing-xxs)}.-mb-px{margin-bottom:-1px}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-lg{margin-bottom:var(--spacing-lg)}.mb-md{margin-bottom:var(--spacing-md)}.mb-xl{margin-bottom:var(--spacing-xl)}.ml-auto{margin-left:auto}.ml-md{margin-left:var(--spacing-md)}.ml-xl{margin-left:var(--spacing-xl)}.ml-xs{margin-left:var(--spacing-xs)}.ml-xxl{margin-left:var(--spacing-xxl)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-16{height:calc(var(--spacing)*16)}.h-\[60vh\]{height:60vh}.h-full{height:100%}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-\[32rem\]{max-height:32rem}.max-h-none{max-height:none}.min-h-screen{min-height:100vh}.w-10{width:calc(var(--spacing)*10)}.w-60{width:calc(var(--spacing)*60)}.w-72{width:calc(var(--spacing)*72)}.w-\[min\(24rem\,calc\(100vw-2rem\)\)\]{width:min(24rem,100vw - 2rem)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[85vw\]{max-width:85vw}.max-w-\[600px\]{max-width:600px}.max-w-card{max-width:var(--container-card)}.max-w-champ{max-width:var(--container-champ)}.max-w-form{max-width:var(--container-form)}.max-w-page{max-width:var(--container-page)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-56{min-width:calc(var(--spacing)*56)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-4{gap:calc(var(--spacing)*4)}.gap-lg{gap:var(--spacing-lg)}.gap-md{gap:var(--spacing-md)}.gap-section{gap:var(--spacing-section)}.gap-sm{gap:var(--spacing-sm)}.gap-xl{gap:var(--spacing-xl)}.gap-xs{gap:var(--spacing-xs)}.gap-xxl{gap:var(--spacing-xxl)}.gap-xxs{gap:var(--spacing-xxs)}.gap-xxxl{gap:var(--spacing-xxxl)}.gap-x-lg{column-gap:var(--spacing-lg)}.gap-x-md{column-gap:var(--spacing-md)}.gap-x-sm{column-gap:var(--spacing-sm)}.gap-x-xl{column-gap:var(--spacing-xl)}.gap-y-xs{row-gap:var(--spacing-xs)}.gap-y-xxs{row-gap:var(--spacing-xxs)}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:var(--radius-full)}.rounded-none{border-radius:var(--radius-none)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-border{border-color:var(--color-border)}.border-card-border{border-color:var(--color-card-border)}.border-current{border-color:currentColor}.border-dashed-border{border-color:var(--color-dashed-border)}.border-error{border-color:var(--color-error)}.border-ink{border-color:var(--color-ink)}.border-input{border-color:var(--color-input)}.border-transparent{border-color:#0000}.border-warning{border-color:var(--color-warning)}.border-l-error{border-left-color:var(--color-error)}.border-l-info{border-left-color:var(--color-info)}.border-l-primary{border-left-color:var(--color-primary)}.border-l-success{border-left-color:var(--color-success)}.border-l-transparent{border-left-color:#0000}.border-l-warning{border-left-color:var(--color-warning)}.bg-background{background-color:var(--color-background)}.bg-card{background-color:var(--color-card)}.bg-destructive{background-color:var(--color-destructive)}.bg-error-bg{background-color:var(--color-error-bg)}.bg-info-bg{background-color:var(--color-info-bg)}.bg-log-bg{background-color:var(--color-log-bg)}.bg-muted{background-color:var(--color-muted)}.bg-primary{background-color:var(--color-primary)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-warning-bg{background-color:var(--color-warning-bg)}.p-1{padding:calc(var(--spacing)*1)}.p-8{padding:calc(var(--spacing)*8)}.p-\[23px\]{padding:23px}.p-huge{padding:var(--spacing-huge)}.p-md{padding:var(--spacing-md)}.p-sm{padding:var(--spacing-sm)}.p-xl{padding:var(--spacing-xl)}.p-xs{padding:var(--spacing-xs)}.p-xxs{padding:var(--spacing-xxs)}.px-\[15px\]{padding-inline:15px}.px-lg{padding-inline:var(--spacing-lg)}.px-md{padding-inline:var(--spacing-md)}.px-sm{padding-inline:var(--spacing-sm)}.px-xs{padding-inline:var(--spacing-xs)}.py-md{padding-block:var(--spacing-md)}.py-sm{padding-block:var(--spacing-sm)}.py-xs{padding-block:var(--spacing-xs)}.py-xxl{padding-block:var(--spacing-xxl)}.py-xxs{padding-block:var(--spacing-xxs)}.pb-sm{padding-bottom:var(--spacing-sm)}.pl-md{padding-left:var(--spacing-md)}.pl-sm{padding-left:var(--spacing-sm)}.pl-xl{padding-left:var(--spacing-xl)}.pl-xs{padding-left:var(--spacing-xs)}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height));letter-spacing:var(--tw-tracking,var(--text-2xl--letter-spacing));font-weight:var(--tw-font-weight,var(--text-2xl--font-weight))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height));letter-spacing:var(--tw-tracking,var(--text-3xl--letter-spacing));font-weight:var(--tw-font-weight,var(--text-3xl--font-weight))}.text-badge{font-size:var(--text-badge);line-height:var(--tw-leading,var(--text-badge--line-height));letter-spacing:var(--tw-tracking,var(--text-badge--letter-spacing));font-weight:var(--tw-font-weight,var(--text-badge--font-weight))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));letter-spacing:var(--tw-tracking,var(--text-base--letter-spacing));font-weight:var(--tw-font-weight,var(--text-base--font-weight))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));letter-spacing:var(--tw-tracking,var(--text-lg--letter-spacing));font-weight:var(--tw-font-weight,var(--text-lg--font-weight))}.text-md{font-size:var(--text-md);line-height:var(--tw-leading,var(--text-md--line-height));letter-spacing:var(--tw-tracking,var(--text-md--letter-spacing));font-weight:var(--tw-font-weight,var(--text-md--font-weight))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));letter-spacing:var(--tw-tracking,var(--text-sm--letter-spacing));font-weight:var(--tw-font-weight,var(--text-sm--font-weight))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));letter-spacing:var(--tw-tracking,var(--text-xs--letter-spacing));font-weight:var(--tw-font-weight,var(--text-xs--font-weight))}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.wrap-anywhere{overflow-wrap:anywhere}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-error-ink{color:var(--color-error-ink)}.text-foreground{color:var(--color-foreground)}.text-graphite{color:var(--color-graphite)}.text-info{color:var(--color-info)}.text-ink{color:var(--color-ink)}.text-ink-secondary{color:var(--color-ink-secondary)}.text-log-changed{color:var(--color-log-changed)}.text-log-failed{color:var(--color-log-failed)}.text-log-fg{color:var(--color-log-fg)}.text-log-fg\/70{color:#f4f4f5b3}@supports (color:color-mix(in lab, red, red)){.text-log-fg\/70{color:color-mix(in oklab,var(--color-log-fg)70%,transparent)}}.text-log-ok{color:var(--color-log-ok)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-nav-ink{color:var(--color-nav-ink)}.text-on-primary{color:var(--color-on-primary)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-slate{color:var(--color-slate)}.text-success{color:var(--color-success)}.text-title-ink{color:var(--color-title-ink)}.text-warning{color:var(--color-warning)}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.accent-primary{accent-color:var(--color-primary)}.shadow-float{--tw-shadow:0 8px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-primary{--tw-ring-color:var(--color-primary)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-none{-webkit-user-select:none;user-select:none}.backdrop\:bg-ink\/40::backdrop{background-color:#26262666}@supports (color:color-mix(in lab, red, red)){.backdrop\:bg-ink\/40::backdrop{background-color:color-mix(in oklab,var(--color-ink)40%,transparent)}}.read-only\:border-transparent:read-only{border-color:#0000}.read-only\:bg-muted:read-only{background-color:var(--color-muted)}.read-only\:text-muted-foreground:read-only{color:var(--color-muted-foreground)}@media (hover:hover){.hover\:bg-destructive\/90:hover{background-color:#cf1322e6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--color-destructive)90%,transparent)}}.hover\:bg-muted:hover{background-color:var(--color-muted)}.hover\:bg-primary\/90:hover{background-color:#0070d5e6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,transparent)}}.hover\:text-foreground:hover{color:var(--color-foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:absolute:focus{position:absolute}.focus\:top-md:focus{top:var(--spacing-md)}.focus\:left-md:focus{left:var(--spacing-md)}.focus\:z-50:focus{z-index:50}.focus\:bg-card:focus{background-color:var(--color-card)}.focus\:p-sm:focus{padding:var(--spacing-sm)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-60:disabled{opacity:.6}.has-checked\:border-transparent:has(:checked){border-color:#0000}.has-checked\:p-\[23px\]:has(:checked){padding:23px}.has-checked\:ring-2:has(:checked){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-checked\:ring-primary:has(:checked){--tw-ring-color:var(--color-primary)}.has-focus-visible\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.has-focus-visible\:outline-offset-2:has(:focus-visible){outline-offset:2px}.has-focus-visible\:outline-ring:has(:focus-visible){outline-color:var(--color-ring)}.aria-invalid\:border-error[aria-invalid=true]{border-color:var(--color-error)}@media not all and (min-width:457px){.max-sm\:mb-0{margin-bottom:calc(var(--spacing)*0)}.max-sm\:max-w-none{max-width:none}.max-sm\:rounded-b-none{border-bottom-right-radius:var(--radius-none);border-bottom-left-radius:var(--radius-none)}}@media (min-width:457px){.sm\:static{position:static}.sm\:mx-0{margin-inline:calc(var(--spacing)*0)}.sm\:w-auto{width:auto}.sm\:max-w-card{max-width:var(--container-card)}.sm\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:justify-end{justify-content:flex-end}.sm\:border-0{border-style:var(--tw-border-style);border-width:0}.sm\:p-0{padding:calc(var(--spacing)*0)}.sm\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@media (min-width:769px){.md\:col-span-2{grid-column:span 2/span 2}.md\:mt-xl{margin-top:var(--spacing-xl)}.md\:ml-huge{margin-left:var(--spacing-huge)}.md\:ml-md{margin-left:var(--spacing-md)}.md\:ml-section{margin-left:var(--spacing-section)}.md\:ml-xxl{margin-left:var(--spacing-xxl)}.md\:inline{display:inline}.md\:max-w-champ{max-width:var(--container-champ)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[2fr_1fr\]{grid-template-columns:2fr 1fr}.md\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:items-start{align-items:flex-start}}@media (min-width:1024px){.lg\:sticky{position:sticky}.lg\:top-20{top:calc(var(--spacing)*20)}.lg\:top-md{top:var(--spacing-md)}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-64{width:calc(var(--spacing)*64)}.lg\:shrink-0{flex-shrink:0}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-\[14rem_minmax\(0\,1fr\)\]{grid-template-columns:14rem minmax(0,1fr)}.lg\:flex-col{flex-direction:column}.lg\:flex-row{flex-direction:row}.lg\:gap-xxs{gap:var(--spacing-xxs)}.lg\:self-start{align-self:flex-start}}.\[\&\.htmx-request\]\:block.htmx-request{display:block}}@font-face{font-family:Open Sans Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(/static/fonts/open-sans-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Open Sans Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(/static/fonts/open-sans-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/static/fonts/jetbrains-mono-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/static/fonts/jetbrains-mono-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}.htmx-indicator{opacity:0;transition:opacity .2s ease-in}.htmx-request .htmx-indicator,.htmx-request.htmx-indicator{opacity:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}} | |
| 3 | > \ No newline at end of file | |
| 3 | +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--spacing:4px;--container-3xl:48rem;--font-weight-normal:400;--font-weight-semibold:600;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-card-border:#d9d9d9;--color-dashed-border:#ddd;--color-error:#f5222d;--color-graphite:#3b3e40;--color-ink:#262626;--color-ink-secondary:#595959;--color-nav-ink:#303233;--color-on-primary:#fff;--color-primary:#0070d5;--color-slate:#6c7073;--color-title-ink:#333;--color-background:#fff;--color-border:#e8e8e8;--color-card:#fff;--color-destructive:#cf1322;--color-error-bg:#fff1f0;--color-error-ink:#cf1322;--color-foreground:#262626;--color-info:#0070d5;--color-info-bg:#f2f8ff;--color-input:#8c8c8c;--color-log-bg:#272727;--color-log-changed:#ffd666;--color-log-failed:#ff7875;--color-log-fg:#f4f4f5;--color-log-ok:#95de64;--color-muted:#f7f9fa;--color-muted-foreground:#595959;--color-primary-foreground:#fff;--color-ring:#0070d5;--color-success:#237804;--color-success-bg:#f6ffed;--color-warning:#be4e04;--color-warning-bg:#fff7e6;--text-2xl:32px;--text-2xl--line-height:1.125;--text-2xl--letter-spacing:-.96px;--text-2xl--font-weight:600;--text-3xl:40px;--text-3xl--line-height:1.2;--text-3xl--letter-spacing:-1.2px;--text-3xl--font-weight:600;--text-badge:12px;--text-badge--line-height:1.33;--text-badge--letter-spacing:-.24px;--text-badge--font-weight:600;--text-base:16px;--text-base--line-height:1.5;--text-base--letter-spacing:-.32px;--text-base--font-weight:400;--text-lg:20px;--text-lg--line-height:1.2;--text-lg--letter-spacing:-.6px;--text-lg--font-weight:600;--text-md:18px;--text-md--line-height:1.33;--text-md--letter-spacing:-.36px;--text-md--font-weight:600;--text-sm:14px;--text-sm--line-height:1.43;--text-sm--letter-spacing:-.28px;--text-sm--font-weight:400;--text-xs:12px;--text-xs--line-height:1.33;--text-xs--letter-spacing:-.24px;--text-xs--font-weight:400;--font-mono:"JetBrains Mono Variable","JetBrains Mono",ui-monospace,monospace;--font-sans:"Open Sans Variable","Open Sans",system-ui,sans-serif;--radius-full:9999px;--radius-none:0px;--radius-sm:8px;--radius-xl:60px;--radius-xs:4px;--spacing-huge:48px;--spacing-lg:20px;--spacing-md:16px;--spacing-section:64px;--spacing-sm:12px;--spacing-xl:24px;--spacing-xs:8px;--spacing-xxl:32px;--spacing-xxs:4px;--spacing-xxxl:40px;--container-card:28rem;--container-champ:20rem;--container-form:960px;--container-page:1200px;--shadow-float:0 8px 16px #0000001a;--breakpoint-sm:457px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html{background-color:var(--color-background);font-family:var(--font-sans);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));letter-spacing:var(--tw-tracking,var(--text-base--letter-spacing));font-weight:var(--tw-font-weight,var(--text-base--font-weight));color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:focus-visible{outline-style:var(--tw-outline-style);outline-offset:2px;outline-width:2px;outline-color:var(--color-ring)}[x-cloak]{display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-full{top:100%}.right-0{right:calc(var(--spacing)*0)}.right-md{right:var(--spacing-md)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-md{bottom:var(--spacing-md)}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.-m-xs{margin:calc(var(--spacing-xs)*-1)}.-m-xxs{margin:calc(var(--spacing-xxs)*-1)}.m-0{margin:calc(var(--spacing)*0)}.m-auto{margin:auto}.-mx-md{margin-inline:calc(var(--spacing-md)*-1)}.mx-auto{margin-inline:auto}.-mt-xs{margin-top:calc(var(--spacing-xs)*-1)}.mt-auto{margin-top:auto}.mt-lg{margin-top:var(--spacing-lg)}.mt-md{margin-top:var(--spacing-md)}.mt-sm{margin-top:var(--spacing-sm)}.mt-xl{margin-top:var(--spacing-xl)}.mt-xs{margin-top:var(--spacing-xs)}.mt-xxl{margin-top:var(--spacing-xxl)}.mt-xxs{margin-top:var(--spacing-xxs)}.-mb-px{margin-bottom:-1px}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-lg{margin-bottom:var(--spacing-lg)}.mb-md{margin-bottom:var(--spacing-md)}.mb-xl{margin-bottom:var(--spacing-xl)}.ml-auto{margin-left:auto}.ml-lg{margin-left:var(--spacing-lg)}.ml-md{margin-left:var(--spacing-md)}.ml-xl{margin-left:var(--spacing-xl)}.ml-xs{margin-left:var(--spacing-xs)}.ml-xxl{margin-left:var(--spacing-xxl)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-16{height:calc(var(--spacing)*16)}.h-\[60vh\]{height:60vh}.h-full{height:100%}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-\[32rem\]{max-height:32rem}.max-h-none{max-height:none}.min-h-screen{min-height:100vh}.w-10{width:calc(var(--spacing)*10)}.w-60{width:calc(var(--spacing)*60)}.w-72{width:calc(var(--spacing)*72)}.w-\[min\(24rem\,calc\(100vw-2rem\)\)\]{width:min(24rem,100vw - 2rem)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[85vw\]{max-width:85vw}.max-w-\[600px\]{max-width:600px}.max-w-card{max-width:var(--container-card)}.max-w-champ{max-width:var(--container-champ)}.max-w-form{max-width:var(--container-form)}.max-w-page{max-width:var(--container-page)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-56{min-width:calc(var(--spacing)*56)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-4{gap:calc(var(--spacing)*4)}.gap-lg{gap:var(--spacing-lg)}.gap-md{gap:var(--spacing-md)}.gap-section{gap:var(--spacing-section)}.gap-sm{gap:var(--spacing-sm)}.gap-xl{gap:var(--spacing-xl)}.gap-xs{gap:var(--spacing-xs)}.gap-xxl{gap:var(--spacing-xxl)}.gap-xxs{gap:var(--spacing-xxs)}.gap-xxxl{gap:var(--spacing-xxxl)}.gap-x-lg{column-gap:var(--spacing-lg)}.gap-x-md{column-gap:var(--spacing-md)}.gap-x-sm{column-gap:var(--spacing-sm)}.gap-x-xl{column-gap:var(--spacing-xl)}.gap-y-xs{row-gap:var(--spacing-xs)}.gap-y-xxs{row-gap:var(--spacing-xxs)}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:var(--radius-full)}.rounded-none{border-radius:var(--radius-none)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-border{border-color:var(--color-border)}.border-card-border{border-color:var(--color-card-border)}.border-current{border-color:currentColor}.border-dashed-border{border-color:var(--color-dashed-border)}.border-error{border-color:var(--color-error)}.border-ink{border-color:var(--color-ink)}.border-input{border-color:var(--color-input)}.border-transparent{border-color:#0000}.border-warning{border-color:var(--color-warning)}.border-l-error{border-left-color:var(--color-error)}.border-l-info{border-left-color:var(--color-info)}.border-l-primary{border-left-color:var(--color-primary)}.border-l-success{border-left-color:var(--color-success)}.border-l-transparent{border-left-color:#0000}.border-l-warning{border-left-color:var(--color-warning)}.bg-background{background-color:var(--color-background)}.bg-card{background-color:var(--color-card)}.bg-destructive{background-color:var(--color-destructive)}.bg-error-bg{background-color:var(--color-error-bg)}.bg-info-bg{background-color:var(--color-info-bg)}.bg-log-bg{background-color:var(--color-log-bg)}.bg-muted{background-color:var(--color-muted)}.bg-primary{background-color:var(--color-primary)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-warning-bg{background-color:var(--color-warning-bg)}.p-1{padding:calc(var(--spacing)*1)}.p-8{padding:calc(var(--spacing)*8)}.p-\[23px\]{padding:23px}.p-huge{padding:var(--spacing-huge)}.p-md{padding:var(--spacing-md)}.p-sm{padding:var(--spacing-sm)}.p-xl{padding:var(--spacing-xl)}.p-xs{padding:var(--spacing-xs)}.p-xxs{padding:var(--spacing-xxs)}.px-\[15px\]{padding-inline:15px}.px-lg{padding-inline:var(--spacing-lg)}.px-md{padding-inline:var(--spacing-md)}.px-sm{padding-inline:var(--spacing-sm)}.px-xs{padding-inline:var(--spacing-xs)}.py-md{padding-block:var(--spacing-md)}.py-sm{padding-block:var(--spacing-sm)}.py-xs{padding-block:var(--spacing-xs)}.py-xxl{padding-block:var(--spacing-xxl)}.py-xxs{padding-block:var(--spacing-xxs)}.pb-sm{padding-bottom:var(--spacing-sm)}.pl-md{padding-left:var(--spacing-md)}.pl-sm{padding-left:var(--spacing-sm)}.pl-xl{padding-left:var(--spacing-xl)}.pl-xs{padding-left:var(--spacing-xs)}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height));letter-spacing:var(--tw-tracking,var(--text-2xl--letter-spacing));font-weight:var(--tw-font-weight,var(--text-2xl--font-weight))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height));letter-spacing:var(--tw-tracking,var(--text-3xl--letter-spacing));font-weight:var(--tw-font-weight,var(--text-3xl--font-weight))}.text-badge{font-size:var(--text-badge);line-height:var(--tw-leading,var(--text-badge--line-height));letter-spacing:var(--tw-tracking,var(--text-badge--letter-spacing));font-weight:var(--tw-font-weight,var(--text-badge--font-weight))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));letter-spacing:var(--tw-tracking,var(--text-base--letter-spacing));font-weight:var(--tw-font-weight,var(--text-base--font-weight))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));letter-spacing:var(--tw-tracking,var(--text-lg--letter-spacing));font-weight:var(--tw-font-weight,var(--text-lg--font-weight))}.text-md{font-size:var(--text-md);line-height:var(--tw-leading,var(--text-md--line-height));letter-spacing:var(--tw-tracking,var(--text-md--letter-spacing));font-weight:var(--tw-font-weight,var(--text-md--font-weight))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));letter-spacing:var(--tw-tracking,var(--text-sm--letter-spacing));font-weight:var(--tw-font-weight,var(--text-sm--font-weight))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));letter-spacing:var(--tw-tracking,var(--text-xs--letter-spacing));font-weight:var(--tw-font-weight,var(--text-xs--font-weight))}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.wrap-anywhere{overflow-wrap:anywhere}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-error-ink{color:var(--color-error-ink)}.text-foreground{color:var(--color-foreground)}.text-graphite{color:var(--color-graphite)}.text-info{color:var(--color-info)}.text-ink{color:var(--color-ink)}.text-ink-secondary{color:var(--color-ink-secondary)}.text-log-changed{color:var(--color-log-changed)}.text-log-failed{color:var(--color-log-failed)}.text-log-fg{color:var(--color-log-fg)}.text-log-fg\/70{color:#f4f4f5b3}@supports (color:color-mix(in lab, red, red)){.text-log-fg\/70{color:color-mix(in oklab,var(--color-log-fg)70%,transparent)}}.text-log-ok{color:var(--color-log-ok)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-nav-ink{color:var(--color-nav-ink)}.text-on-primary{color:var(--color-on-primary)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-slate{color:var(--color-slate)}.text-success{color:var(--color-success)}.text-title-ink{color:var(--color-title-ink)}.text-warning{color:var(--color-warning)}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.accent-primary{accent-color:var(--color-primary)}.shadow-float{--tw-shadow:0 8px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-primary{--tw-ring-color:var(--color-primary)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-none{-webkit-user-select:none;user-select:none}.backdrop\:bg-ink\/40::backdrop{background-color:#26262666}@supports (color:color-mix(in lab, red, red)){.backdrop\:bg-ink\/40::backdrop{background-color:color-mix(in oklab,var(--color-ink)40%,transparent)}}.read-only\:border-transparent:read-only{border-color:#0000}.read-only\:bg-muted:read-only{background-color:var(--color-muted)}.read-only\:text-muted-foreground:read-only{color:var(--color-muted-foreground)}@media (hover:hover){.hover\:bg-destructive\/90:hover{background-color:#cf1322e6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--color-destructive)90%,transparent)}}.hover\:bg-muted:hover{background-color:var(--color-muted)}.hover\:bg-primary\/90:hover{background-color:#0070d5e6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,transparent)}}.hover\:text-foreground:hover{color:var(--color-foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:absolute:focus{position:absolute}.focus\:top-md:focus{top:var(--spacing-md)}.focus\:left-md:focus{left:var(--spacing-md)}.focus\:z-50:focus{z-index:50}.focus\:bg-card:focus{background-color:var(--color-card)}.focus\:p-sm:focus{padding:var(--spacing-sm)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-60:disabled{opacity:.6}.has-checked\:border-transparent:has(:checked){border-color:#0000}.has-checked\:p-\[23px\]:has(:checked){padding:23px}.has-checked\:ring-2:has(:checked){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-checked\:ring-primary:has(:checked){--tw-ring-color:var(--color-primary)}.has-focus-visible\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.has-focus-visible\:outline-offset-2:has(:focus-visible){outline-offset:2px}.has-focus-visible\:outline-ring:has(:focus-visible){outline-color:var(--color-ring)}.aria-invalid\:border-error[aria-invalid=true]{border-color:var(--color-error)}@media not all and (min-width:457px){.max-sm\:mb-0{margin-bottom:calc(var(--spacing)*0)}.max-sm\:max-w-none{max-width:none}.max-sm\:rounded-b-none{border-bottom-right-radius:var(--radius-none);border-bottom-left-radius:var(--radius-none)}}@media (min-width:457px){.sm\:static{position:static}.sm\:mx-0{margin-inline:calc(var(--spacing)*0)}.sm\:w-auto{width:auto}.sm\:max-w-card{max-width:var(--container-card)}.sm\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:justify-end{justify-content:flex-end}.sm\:border-0{border-style:var(--tw-border-style);border-width:0}.sm\:p-0{padding:calc(var(--spacing)*0)}.sm\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@media (min-width:769px){.md\:col-span-2{grid-column:span 2/span 2}.md\:mt-xl{margin-top:var(--spacing-xl)}.md\:ml-huge{margin-left:var(--spacing-huge)}.md\:ml-md{margin-left:var(--spacing-md)}.md\:ml-section{margin-left:var(--spacing-section)}.md\:ml-xxl{margin-left:var(--spacing-xxl)}.md\:inline{display:inline}.md\:max-w-champ{max-width:var(--container-champ)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[2fr_1fr\]{grid-template-columns:2fr 1fr}.md\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:items-start{align-items:flex-start}}@media (min-width:1024px){.lg\:sticky{position:sticky}.lg\:top-20{top:calc(var(--spacing)*20)}.lg\:top-md{top:var(--spacing-md)}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-64{width:calc(var(--spacing)*64)}.lg\:shrink-0{flex-shrink:0}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-\[14rem_minmax\(0\,1fr\)\]{grid-template-columns:14rem minmax(0,1fr)}.lg\:flex-col{flex-direction:column}.lg\:flex-row{flex-direction:row}.lg\:gap-xxs{gap:var(--spacing-xxs)}.lg\:self-start{align-self:flex-start}}.\[\&\.htmx-request\]\:block.htmx-request{display:block}}@font-face{font-family:Open Sans Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(/static/fonts/open-sans-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Open Sans Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(/static/fonts/open-sans-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/static/fonts/jetbrains-mono-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/static/fonts/jetbrains-mono-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}.htmx-indicator{opacity:0;transition:opacity .2s ease-in}.htmx-request .htmx-indicator,.htmx-request.htmx-indicator{opacity:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}} | |
| 3 | < \ No newline at end of file |
M
console/Cargo.toml
+2
-0
@@ -24,6 +24,8 @@ ldap3 = { version = "0.12.1", default-features = false, features = ["tls-rustls-
| 24 | 24 | open-iam-commun = { path = "../commun" } |
| 25 | 25 | # Portail en HTTPS, autorité interne fournie (D-092) ; déjà dans l'arbre. |
| 26 | 26 | reqwest = { version = "0.12.28", default-features = false, features = ["rustls-tls-manual-roots", "json"] } |
| 27 | +# Attribut « ajout seul » du journal d'audit (ioctl FS_IOC_GETFLAGS, OI-209) ; déjà dans l'arbre. | |
| 28 | +rustix = { version = "1.1.6", default-features = false, features = ["fs", "std"] } | |
| 27 | 29 | # Configuration (console.yaml) et sessions ; déjà dans l'arbre. |
| 28 | 30 | serde_norway = "0.9.42" |
| 29 | 31 | tower-sessions = "0.15.0" |
M
console/src/audit.rs
+13
-0
@@ -108,6 +108,14 @@ struct Ligne<'a> {
| 108 | 108 | precedent: &'a str, |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | +/// Le fichier porte-t-il l'attribut « ajout seul » (`FS_IOC_GETFLAGS`, OI-209) ? `None` si le | |
| 112 | +/// fichier ne s'ouvre pas ; `Some(false)` aussi quand le système de fichiers ne connaît pas | |
| 113 | +/// l'attribut : le journal reste alors modifiable. | |
| 114 | +pub fn ajout_seul(chemin: &Path) -> Option<bool> { | |
| 115 | + let fichier = std::fs::File::open(chemin).ok()?; | |
| 116 | + Some(rustix::fs::ioctl_getflags(&fichier).is_ok_and(|d| d.contains(rustix::fs::IFlags::APPEND))) | |
| 117 | +} | |
| 118 | + | |
| 111 | 119 | /// État d'écriture : empreinte de la dernière ligne, et ligne laissée incomplète à compléter. |
| 112 | 120 | struct Ecriture { |
| 113 | 121 | dernier: String, |
@@ -180,6 +188,11 @@ impl Journal {
| 180 | 188 | } |
| 181 | 189 | } |
| 182 | 190 | |
| 191 | + /// Le fichier du journal porte-t-il l'attribut « ajout seul » ? Voir [`ajout_seul`]. | |
| 192 | + pub fn ajout_seul(&self) -> Option<bool> { | |
| 193 | + ajout_seul(&self.chemin) | |
| 194 | + } | |
| 195 | + | |
| 183 | 196 | /// Une écriture incomplète a eu lieu : le journal n'accepte plus rien. |
| 184 | 197 | pub fn en_echec(&self) -> bool { |
| 185 | 198 | self.echec.load(Ordering::SeqCst) |
M
console/src/audit/tests.rs
+11
-0
@@ -251,3 +251,14 @@ fn un_journal_tronque_ou_reecrit_a_la_fin_se_voit_a_la_lecture() {
| 251 | 251 | std::fs::remove_file(&chemin).unwrap(); |
| 252 | 252 | assert!(matches!(journal.lire().unwrap().1, Verification::Rompue { ligne: 1, .. }), "supprimé"); |
| 253 | 253 | } |
| 254 | + | |
| 255 | +// OI-209 : l'attribut « ajout seul » se lit sur le fichier du journal. Aucun fichier de test ne le | |
| 256 | +// porte (le poser demande CAP_LINUX_IMMUTABLE) : le journal est vu modifiable ; absent, inconnu. | |
| 257 | +#[test] | |
| 258 | +fn l_attribut_ajout_seul_du_journal_se_lit_sur_son_fichier() { | |
| 259 | + let dossier = tempfile::tempdir().unwrap(); | |
| 260 | + let (journal, _) = Journal::ouvrir(&dossier.path().join("audit.jsonl")).unwrap(); | |
| 261 | + assert_eq!(journal.ajout_seul(), None, "pas encore de fichier"); | |
| 262 | + journal.ecrire(evenement(Type::Connexion, "jean.dupont")).unwrap(); | |
| 263 | + assert_eq!(journal.ajout_seul(), Some(false)); | |
| 264 | +} |
M
console/src/main.rs
+7
-0
@@ -45,6 +45,7 @@ enum Commande {
| 45 | 45 | #[derive(Subcommand)] |
| 46 | 46 | enum ActionAudit { |
| 47 | 47 | /// Recalcule la chaîne du journal et signale la première ligne rompue (code 1 ; 2 si illisible). |
| 48 | + /// Dit aussi si le fichier est verrouillé en ajout seul. | |
| 48 | 49 | Verifier { |
| 49 | 50 | #[arg(long, default_value = open_iam_console::audit::CHEMIN)] |
| 50 | 51 | fichier: PathBuf, |
@@ -58,6 +59,12 @@ fn verifier_journal(fichier: &std::path::Path) -> ExitCode {
| 58 | 59 | Ok(contenu) => { |
| 59 | 60 | let verification = verifier(&contenu); |
| 60 | 61 | println!("{}", verification.texte()); |
| 62 | + // OI-209 : le verrou du fichier, pour information ; il ne change pas le code de sortie. | |
| 63 | + match open_iam_console::audit::ajout_seul(fichier) { | |
| 64 | + Some(true) => println!("Journal verrouillé : l'attribut « ajout seul » est posé."), | |
| 65 | + Some(false) => println!("Journal modifiable : l'attribut « ajout seul » est absent."), | |
| 66 | + None => {} | |
| 67 | + } | |
| 61 | 68 | match verification { |
| 62 | 69 | Verification::Verifiee { .. } => ExitCode::SUCCESS, |
| 63 | 70 | Verification::Rompue { .. } => ExitCode::from(1), |
M
console/src/web.rs
+28
-0
@@ -170,8 +170,12 @@ pub struct Etat {
| 170 | 170 | courante: std::path::PathBuf, |
| 171 | 171 | /// Budget des refus anonymes (OI-174). |
| 172 | 172 | refus_anonymes: std::sync::Mutex<Fenetre>, |
| 173 | + /// Lecture de l'attribut « ajout seul » du journal (remplaçable dans les tests, OI-209). | |
| 174 | + sonde_ajout_seul: SondeAjoutSeul, | |
| 173 | 175 | } |
| 174 | 176 | |
| 177 | +type SondeAjoutSeul = Box<dyn Fn(&Journal) -> Option<bool> + Send + Sync>; | |
| 178 | + | |
| 175 | 179 | impl Etat { |
| 176 | 180 | /// `autorite` : certificat PEM de l'autorité du portail (autorité interne d'Open IAM). |
| 177 | 181 | pub fn new(oidc: Option<ConfigOidc>, autorite: Option<&[u8]>, journal: Journal) -> Self { |
@@ -189,6 +193,7 @@ impl Etat {
| 189 | 193 | installation: INSTALLATION.into(), |
| 190 | 194 | courante: COURANTE.into(), |
| 191 | 195 | refus_anonymes: std::sync::Mutex::new(Fenetre::default()), |
| 196 | + sonde_ajout_seul: Box::new(Journal::ajout_seul), | |
| 192 | 197 | } |
| 193 | 198 | } |
| 194 | 199 |
@@ -203,6 +208,16 @@ impl Etat {
| 203 | 208 | self |
| 204 | 209 | } |
| 205 | 210 | |
| 211 | + /// Remplace la lecture de l'attribut « ajout seul » du journal (tests : aucun fichier de test | |
| 212 | + /// ne peut le porter sans CAP_LINUX_IMMUTABLE). | |
| 213 | + pub fn avec_sonde_ajout_seul( | |
| 214 | + mut self, | |
| 215 | + sonde: impl Fn(&Journal) -> Option<bool> + Send + Sync + 'static, | |
| 216 | + ) -> Self { | |
| 217 | + self.sonde_ajout_seul = Box::new(sonde); | |
| 218 | + self | |
| 219 | + } | |
| 220 | + | |
| 206 | 221 | /// Remplace l'horloge de la console (tests des durées de session). |
| 207 | 222 | pub fn avec_horloge(mut self, horloge: impl Fn() -> i64 + Send + Sync + 'static) -> Self { |
| 208 | 223 | self.horloge = Box::new(horloge); |
@@ -868,6 +883,8 @@ struct PageTableau {
| 868 | 883 | actions: Vec<Action>, |
| 869 | 884 | chaine_etat: &'static str, |
| 870 | 885 | chaine_libelle: String, |
| 886 | + /// E021-C7 : le journal n'a pas l'attribut « ajout seul » (OI-209). | |
| 887 | + journal_modifiable: bool, | |
| 871 | 888 | } |
| 872 | 889 | |
| 873 | 890 | /// Description de l'installation : lue, ou l'état qui l'empêche (« absente », « illisible »). |
@@ -892,6 +909,15 @@ async fn description(chemin: &Path) -> (Option<Installation>, &'static str) {
| 892 | 909 | } |
| 893 | 910 | } |
| 894 | 911 | |
| 912 | +/// Le journal est-il modifiable, faute de l'attribut « ajout seul » (E021-C7, OI-209) ? Relu à | |
| 913 | +/// chaque affichage : l'encadré disparaît dès que l'attribut est posé. Un journal qui ne s'ouvre | |
| 914 | +/// pas n'est pas signalé ici : le badge « Journal illisible » le dit déjà. | |
| 915 | +async fn journal_modifiable(etat: &Partage) -> bool { | |
| 916 | + let e = etat.clone(); | |
| 917 | + let ajout_seul = tokio::task::spawn_blocking(move || (e.sonde_ajout_seul)(&e.journal)).await; | |
| 918 | + matches!(ajout_seul, Ok(Some(false))) | |
| 919 | +} | |
| 920 | + | |
| 895 | 921 | /// Dix dernières actions et état de la chaîne, lus sous le verrou du journal (OI-173). |
| 896 | 922 | async fn dernieres(etat: &Partage, fuseau: &jiff::tz::TimeZone) -> (Vec<Action>, &'static str, String) { |
| 897 | 923 | let journal = etat.clone(); |
@@ -939,6 +965,7 @@ async fn tableau(
| 939 | 965 | }; |
| 940 | 966 | let (description, description_etat) = description(&etat.installation).await; |
| 941 | 967 | let (actions, chaine_etat, chaine_libelle) = dernieres(&etat, &fuseau).await; |
| 968 | + let journal_modifiable = journal_modifiable(&etat).await; | |
| 942 | 969 | let i = o.identite; |
| 943 | 970 | let page = PageTableau { |
| 944 | 971 | layout, |
@@ -964,6 +991,7 @@ async fn tableau(
| 964 | 991 | actions, |
| 965 | 992 | chaine_etat, |
| 966 | 993 | chaine_libelle, |
| 994 | + journal_modifiable, | |
| 967 | 995 | }; |
| 968 | 996 | match page.render() { |
| 969 | 997 | Ok(html) => Html(html).into_response(), |
M
console/templates/tableau.html
+8
-0
@@ -14,6 +14,14 @@
| 14 | 14 | <p class="mb-lg border-l-4 border-l-info bg-info-bg p-md text-sm text-foreground" role="status">La console ({{ version }}) et l'installeur qui l'a déployée ({{ v }}) n'ont pas la même version.</p> |
| 15 | 15 | {% endif %} |
| 16 | 16 | |
| 17 | +{# E021-C7 Journal d'audit modifiable, faute de l'attribut « ajout seul » (OI-209). #} | |
| 18 | +{% if journal_modifiable %} | |
| 19 | +<div id="journal-modifiable" class="mb-lg border-l-4 border-l-warning bg-warning-bg p-md text-sm text-foreground" role="status"> | |
| 20 | + <p class="font-semibold">Journal d'audit modifiable</p> | |
| 21 | + <p class="mt-xs">Ce serveur n'a pas permis de verrouiller le journal : on peut encore en modifier ou en effacer des lignes. Un compte qui prendrait la main sur la console pourrait réécrire son historique. Voir le <a href="https://gitrust.ebii.fr/guides/proteger-le-journal-d-audit-de-la-console.html" class="text-primary underline underline-offset-4">guide « Protéger le journal d'audit de la console »</a>.</p> | |
| 22 | +</div> | |
| 23 | +{% endif %} | |
| 24 | + | |
| 17 | 25 | <div class="grid gap-lg lg:grid-cols-2"> |
| 18 | 26 | {# E021-C2 Installation #} |
| 19 | 27 | <section class="border border-border bg-card p-xl" aria-labelledby="titre-installation"> |
M
console/tests/cli.rs
+25
-1
@@ -56,7 +56,7 @@ fn audit_verifier_dit_si_la_chaine_tient() {
| 56 | 56 | }; |
| 57 | 57 | let sortie = verifier(); |
| 58 | 58 | assert_eq!(sortie.status.code(), Some(0), "{}", String::from_utf8_lossy(&sortie.stderr)); |
| 59 | - assert_eq!(String::from_utf8_lossy(&sortie.stdout).trim(), "Chaîne vérifiée (4 lignes)"); | |
| 59 | + assert_eq!(String::from_utf8_lossy(&sortie.stdout).lines().next(), Some("Chaîne vérifiée (4 lignes)")); | |
| 60 | 60 | |
| 61 | 61 | let texte = std::fs::read_to_string(&chemin).unwrap(); |
| 62 | 62 | std::fs::write(&chemin, texte.replacen("jean.dupont", "jean.dupond", 1)).unwrap(); |
@@ -90,3 +90,27 @@ fn audit_verifier_lit_par_defaut_le_journal_de_la_console() {
| 90 | 90 | assert!(sortie.status.success(), "{}", String::from_utf8_lossy(&sortie.stderr)); |
| 91 | 91 | assert!(String::from_utf8_lossy(&sortie.stdout).contains(open_iam_console::audit::CHEMIN)); |
| 92 | 92 | } |
| 93 | + | |
| 94 | +// OI-209 : « audit verifier » dit aussi si le journal est verrouillé en ajout seul. Un fichier de | |
| 95 | +// test ne l'est jamais (le verrou demande CAP_LINUX_IMMUTABLE) : Molecule prouve l'autre cas sur | |
| 96 | +// sa cible Ubuntu. | |
| 97 | +#[test] | |
| 98 | +fn audit_verifier_dit_si_le_journal_est_verrouille() { | |
| 99 | + use open_iam_console::audit::{Evenement, Journal, Type}; | |
| 100 | + let dossier = tempfile::tempdir().unwrap(); | |
| 101 | + let chemin = dossier.path().join("audit.jsonl"); | |
| 102 | + let (journal, _) = Journal::ouvrir(&chemin).unwrap(); | |
| 103 | + for evenement in [Type::Demarrage, Type::Demarrage] { | |
| 104 | + journal.ecrire(Evenement { evenement, identite: None, source: None, detail: None }).unwrap(); | |
| 105 | + } | |
| 106 | + let sortie = Command::new(env!("CARGO_BIN_EXE_open-iam-console")) | |
| 107 | + .args(["audit", "verifier", "--fichier"]) | |
| 108 | + .arg(&chemin) | |
| 109 | + .output() | |
| 110 | + .unwrap(); | |
| 111 | + assert_eq!(sortie.status.code(), Some(0), "un journal modifiable n'est pas une chaîne rompue"); | |
| 112 | + assert_eq!( | |
| 113 | + String::from_utf8_lossy(&sortie.stdout).lines().collect::<Vec<_>>(), | |
| 114 | + ["Chaîne vérifiée (2 lignes)", "Journal modifiable : l'attribut « ajout seul » est absent."] | |
| 115 | + ); | |
| 116 | +} |
M
console/tests/commun/mod.rs
+6
-0
@@ -189,6 +189,11 @@ pub fn config(portail: &Portail) -> ConfigOidc {
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | pub async fn banc() -> Banc { |
| 192 | + banc_avec(|etat| etat).await | |
| 193 | +} | |
| 194 | + | |
| 195 | +/// Banc dont l'état de la console est ajusté par `ajuster` (sonde du journal, par exemple). | |
| 196 | +pub async fn banc_avec(ajuster: impl FnOnce(Etat) -> Etat) -> Banc { | |
| 192 | 197 | let portail = portail().await; |
| 193 | 198 | let dossier = tempfile::tempdir().unwrap(); |
| 194 | 199 | let journal = dossier.path().join("audit.jsonl"); |
@@ -201,6 +206,7 @@ pub async fn banc() -> Banc {
| 201 | 206 | jiff::Timestamp::now().as_second() + decalage.load(std::sync::atomic::Ordering::SeqCst) |
| 202 | 207 | }) |
| 203 | 208 | .avec_installation(description.clone(), courante.clone()); |
| 209 | + let etat = ajuster(etat); | |
| 204 | 210 | Banc { console: app(Arc::new(etat)), portail, journal, _dossier: dossier, avance, description, courante } |
| 205 | 211 | } |
| 206 | 212 |
M
console/tests/tableau.rs
+33
-0
@@ -301,3 +301,36 @@ async fn un_nom_hostile_de_la_description_reste_du_texte() {
| 301 | 301 | assert!(!page.contains("<script>alert(1)"), "{page}"); |
| 302 | 302 | assert!(page.contains("<script>alert(1)"), "{page}"); |
| 303 | 303 | } |
| 304 | + | |
| 305 | +// --- OI-209 : journal d'audit modifiable signalé au tableau de bord (plan M9, tranche 9) --- | |
| 306 | + | |
| 307 | +const GUIDE_JOURNAL: &str = "https://gitrust.ebii.fr/guides/proteger-le-journal-d-audit-de-la-console.html"; | |
| 308 | + | |
| 309 | +// Scénario : Un journal sans ajout seul est signalé au tableau de bord. Le journal du banc est un | |
| 310 | +// fichier de test, que rien ne met en ajout seul : la vraie sonde le voit modifiable. | |
| 311 | +#[tokio::test] | |
| 312 | +async fn un_journal_sans_ajout_seul_est_signale_au_tableau_de_bord() { | |
| 313 | + let b = banc().await; | |
| 314 | + b.decrire(&multi(VERSION)); | |
| 315 | + let (_, page) = tableau_de_bord(&b).await; | |
| 316 | + let encadre = page | |
| 317 | + .split(r#"id="journal-modifiable""#) | |
| 318 | + .nth(1) | |
| 319 | + .and_then(|reste| reste.split("</div>").next()) | |
| 320 | + .unwrap_or_else(|| panic!("encadré absent : {page}")); | |
| 321 | + assert!(encadre.contains("Journal d'audit modifiable"), "{encadre}"); | |
| 322 | + assert!(encadre.contains(GUIDE_JOURNAL), "{encadre}"); | |
| 323 | +} | |
| 324 | + | |
| 325 | +// Scénario : Un journal en ajout seul n'est pas signalé. Un journal qui ne s'ouvre pas non plus : | |
| 326 | +// le badge « Journal illisible » le dit déjà. | |
| 327 | +#[tokio::test] | |
| 328 | +async fn un_journal_en_ajout_seul_n_est_pas_signale() { | |
| 329 | + for sonde in [Some(true), None] { | |
| 330 | + let b = banc_avec(|etat| etat.avec_sonde_ajout_seul(move |_| sonde)).await; | |
| 331 | + b.decrire(&multi(VERSION)); | |
| 332 | + let (statut, page) = tableau_de_bord(&b).await; | |
| 333 | + assert_eq!(statut, StatusCode::OK); | |
| 334 | + assert!(!page.contains("journal-modifiable"), "sonde {sonde:?} : {page}"); | |
| 335 | + } | |
| 336 | +} |
M
docs/BACKLOG.md
+3
-1
@@ -1,6 +1,6 @@
| 1 | 1 | # Backlog Open IAM |
| 2 | 2 | |
| 3 | -_Dernière mise à jour : 2026-11-19 (M9 terminé : OI-909 et OI-174 faites, OI-208 ajoutée en M12. Précédente : 2026-11-18, décisions D-088 à D-106 et questions Q-32 à Q-38 de la phase 2 arbitrées ; décisions de M5, M6 et M8 validées, celles de M7 laissées ouvertes jusqu'à son ouverture)_ | |
| 3 | +_Dernière mise à jour : 2026-11-19 (M9 terminé : OI-909, OI-174 et OI-209 faites, Q-39 répondue, OI-208 ajoutée en M12. Précédente : 2026-11-18, décisions D-088 à D-106 et questions Q-32 à Q-38 de la phase 2 arbitrées ; décisions de M5, M6 et M8 validées, celles de M7 laissées ouvertes jusqu'à son ouverture)_ | |
| 4 | 4 | |
| 5 | 5 | Ce fichier sert à **piloter** le projet. Le *quoi* et le *pourquoi* sont dans le [plan directeur](plans/open-iam-plan-directeur.md), et l'IHM dans [docs/ihm/](ihm/IHM_MAP.md). |
| 6 | 6 |
@@ -241,6 +241,7 @@ Phase 2 (D-106). Plan de jalon : [m9-socle-console.md](plans/m9-socle-console.md
| 241 | 241 | | OI-095 | Second facteur exigé par la console : `acr` revérifié ; enregistrement imposé à la première connexion, même option 2FA décochée (`sfRequired` étendu au groupe de la console) (D-093 amende D-012 pour la console) | Fait (2026-11-18) : `acr` revérifié par la console (5a) ; `sfRequired` étendu aux groupes de la console, administrateur sans facteur envoyé à l'enregistrement même politique décochée (Molecule `sso`) ; case d'E-005 cochée et verrouillée, 2FA des administrateurs imposée dans la configuration et acceptée en évolution (5c) | S | OI-071 | Jeton sans le niveau du second facteur refusé par la console ; un compte sans second facteur est envoyé à l'enregistrement, puis entre | [plan M9 tranche 5](plans/m9-socle-console.md) | |
| 242 | 242 | | OI-173 | Journal d'audit chaîné de la console et commande `audit verifier` (D-099) | Fait (2026-11-19) : `audit.jsonl` chaîné en SHA-256 (démarrage, connexion, refus avec motif et compte, déconnexion, expiration) ; « pas de trace, pas de session » ; verrou d'instance, journal en échec signalé par `/sante` ; copie dans journald pour Loki ; `chattr +a` quand le système le permet ; `open-iam-console audit verifier` ; Molecule `console` et `sso` verts | M | OI-169 | Événements écrits ; ligne modifiée ou retirée signalée avec son numéro | [plan M9 tranche 6](plans/m9-socle-console.md) | |
| 243 | 243 | | OI-909 | E-021 Tableau de bord. Le reste d'OI-909 est réparti : E-023 devient E-042 (OI-195), E-030 (OI-204), E-031 (OI-199) | Fait | M | OI-071, OI-173 | E-021 conforme à sa fiche, axe-core sans violation | [plan M9 tranche 7](plans/m9-socle-console.md) | |
| 244 | +| OI-209 | Journal d'audit modifiable accepté depuis l'assistant (Q-39) : case d'E-005 rendue en `oiam_console_journal_sans_ajout_seul`, encadré E021-C7 tant que le journal n'a pas l'attribut « ajout seul », `audit verifier` qui le dit, guide « Protéger le journal d'audit de la console » | Fait (2026-11-19) : case d'E-005, encadré E021-C7, ligne d'`audit verifier`, guide publié ; Molecule `console` (verrouillé sur Ubuntu, modifiable sur Debian), `p2-console.sh` et parcours navigateur verts ; 19 mutations détectées | S | OI-174 | Scénarios de la tranche 9 verts ; Molecule `console` vert ; `p2-console.sh` vert ; guide publié | [plan M9 tranche 9](plans/m9-socle-console.md) | | |
| 244 | 245 | | OI-174 | Revue OWASP de la console et recette `tests/e2e/p2-console.sh` | Fait (2026-11-19) : trois constats moyens corrigés (débit nginx, budget des refus anonymes, sessions et départs bornés, ajout seul exigé), constats bas corrigés ou reportés en OI-208 ; recette verte sur deux conteneurs | M | OI-909, OI-095 | Aucun constat moyen ouvert ; recette verte sur conteneurs | [plan M9 tranche 8](plans/m9-socle-console.md) | |
| 245 | 246 | |
| 246 | 247 | ## M10 — Outils derrière le SSO |
@@ -519,3 +520,4 @@ Le statut est « Validée » (par vous), « Proposée » (en attente d'arbitrage
| 519 | 520 | | Q-36 | **White Pages** ouvert à tout compte connecté ? | OI-178 | Répondu le 2026-11-18 : **oui**, tout compte connecté ; le groupe `openiam-acces-pages`, facultatif, se coche dans l'installeur pour restreindre l'accès | |
| 520 | 521 | | Q-37 | Activer la source **OSV** de Debian et d'Ubuntu dans Dependency-Track, avec un projet par serveur ? | OI-200 | Répondu le 2026-11-18 : **oui** ; source OSV « Debian » et « Ubuntu » activée sur votre Dependency-Track (réglage documenté par Open IAM), un projet par serveur | |
| 521 | 522 | | Q-38 | Interdire de **déplacer un compte importé d'AD** dans une branche avant la bascule ? | OI-186 | Répondu le 2026-11-18 : **oui** ; tant que la synchronisation AD est active, la console refuse de déplacer un compte créé par LSC (attribut opérationnel `creatorsName`), avec un message clair | |
| 523 | +| Q-39 | Comment accepter un **journal d'audit sans « ajout seul »** quand le serveur de la console refuse de le verrouiller (conteneur LXC non privilégié) ? | OI-209 | Répondu le 2026-11-19 : **une case dans l'assistant** (étape Sécurité, décochée par défaut) ; la console affiche que son journal est modifiable ; un guide explique comment corriger | |
M
docs/ihm/IHM_MAP.md
+1
-1
@@ -1,6 +1,6 @@
| 1 | 1 | # Cartographie IHM — Open IAM |
| 2 | 2 | |
| 3 | -_Dernière mise à jour : 2026-11-19 (OI-909 : E-021 livré, C-020 à C-022 livrés. Précédente : 2026-11-18, OI-168 : fiches E-020 et E-021, composants C-020 à C-024 spécifiés ; 2026-11-17, phase 2 : la console d'exploitation revient au périmètre, D-088 validée le 2026-11-18 ; écrans E-020, E-021, E-027 à E-031 et E-038 à E-042 répartis de M9 à M14 ; E-032 et E-033 en Réserve, D-105. Précédente : 2026-11-15, OI-162 et OI-160 en E-037 ; 2026-11-14, OI-150, fiches E-034 à E-037, D-081)_ | |
| 3 | +_Dernière mise à jour : 2026-11-19 (OI-209 : case E005-C12 « journal d'audit modifiable » et encadré E021-C7 ; OI-909 : E-021 livré, C-020 à C-022 livrés. Précédente : 2026-11-18, OI-168 : fiches E-020 et E-021, composants C-020 à C-024 spécifiés ; 2026-11-17, phase 2 : la console d'exploitation revient au périmètre, D-088 validée le 2026-11-18 ; écrans E-020, E-021, E-027 à E-031 et E-038 à E-042 répartis de M9 à M14 ; E-032 et E-033 en Réserve, D-105. Précédente : 2026-11-15, OI-162 et OI-160 en E-037 ; 2026-11-14, OI-150, fiches E-034 à E-037, D-081)_ | |
| 4 | 4 | |
| 5 | 5 | L'application `open-iam-installer` sert trois usages. Les deux premiers dépendent de la présence du verrou `<état>/installed.lock` (`/var/lib/open-iam` en root, `~/.local/state/open-iam` sinon) : |
| 6 | 6 |
M
docs/ihm/screens/E-005-securite.md
+10
-0
@@ -26,6 +26,7 @@ L'administrateur règle trois points : les **noms et certificats** des services,
| 26 | 26 | | E005-C9 | Exigence 2FA | RadioGroup | RadioGroup | Si `lemonldap` | Tous / un groupe / facultative | |
| 27 | 27 | | E005-C11 | 2FA des administrateurs | Checkbox | Checkbox | Si `lemonldap` | « Exiger la double authentification pour les administrateurs », **cochée par défaut** ; si décochée : avertissement `warning` (D-012). Avec la console d'exploitation : cochée et verrouillée, aide « Toujours exigée avec la console d'exploitation : elle n'ouvre une session qu'après le second facteur, enregistré à la première connexion. » (D-093, OI-095) | |
| 28 | 28 | | E005-C10 | Nom du groupe 2FA | Input | Input | Si « un groupe » | Défaut `mfa-required` | |
| 29 | +| E005-C12 | Journal d'audit de la console | Checkbox | Checkbox | Si `console` | Section « Journal d'audit de la console » ; case « Accepter un journal d'audit modifiable si le serveur refuse de le verrouiller », **décochée par défaut** ; aide avec lien vers le guide « Protéger le journal d'audit de la console » (OI-209) | | |
| 29 | 30 | |
| 30 | 31 | ### C. Propriétés visuelles |
| 31 | 32 |
@@ -60,6 +61,7 @@ L'administrateur règle trois points : les **noms et certificats** des services,
| 60 | 61 | | Échecs avant verrouillage | `mdp.echecs_max` | 10 / 5 | 3 à 50 | |
| 61 | 62 | | Durée du verrouillage | `mdp.verrouillage_minutes` | 15 / 30 | 1 à 1440 ; 0 = déverrouillage par le support uniquement | |
| 62 | 63 | | Exigence 2FA | `mfa.exigence` | `tous` | `tous` / `groupe` / `facultative` | |
| 64 | +| Journal d'audit de la console modifiable accepté | `composants_parametres.console.journal_sans_ajout_seul` | `false` | Booléen, seulement avec la console ; rendu en `oiam_console_journal_sans_ajout_seul`. Coché : avertissement au récapitulatif. Jamais figé en évolution (OI-209) | | |
| 63 | 65 | | 2FA des administrateurs | `mfa.admins` | `true` | Booléen ; `false` affiché comme avertissement au récapitulatif. Toujours `true` dans la configuration quand la console est choisie, même enregistrée décochée (`Brouillon::config`, D-093) | |
| 64 | 66 | |
| 65 | 67 | ### F. Responsive |
@@ -77,6 +79,7 @@ L'administrateur règle trois points : les **noms et certificats** des services,
| 77 | 79 | - [x] Avec la console, la case des administrateurs est cochée et verrouillée, et la configuration l'exige même enregistrée décochée (tests `e005_avec_la_console_la_2fa_des_administrateurs_est_cochee_et_verrouillee`, `oi095_avec_la_console_le_second_facteur_des_administrateurs_est_exige`) |
| 78 | 80 | - [x] La section 2FA n'apparaît que si LemonLDAP::NG est sélectionné (test `e005_2fa_la_section_n_apparait_qu_avec_lemonldap`, parcours navigateur) |
| 79 | 81 | - [x] Le nom du groupe est validé comme un `cn` ordinaire et exigé en « groupe » ; les choix sont enregistrés dans `mfa` (test `e005_2fa_les_choix_sont_enregistres_et_valides`) |
| 82 | +- [x] Avec la console, la case du journal d'audit modifiable est proposée décochée, enregistrée, rendue au rôle et jamais figée en évolution ; sans la console, la section est absente (tests `e005_avec_la_console_la_case_du_journal_modifiable_est_proposee_decochee`, `e005_la_case_du_journal_modifiable_est_enregistree`, `oi209_en_evolution_la_case_du_journal_modifiable_se_coche`) | |
| 80 | 83 | - [ ] Checklist commune ([CONVENTIONS.md](../CONVENTIONS.md)) — écart : voir H |
| 81 | 84 | |
| 82 | 85 | ### H. Écarts à la livraison (OI-053, complétés par OI-092) |
@@ -97,3 +100,10 @@ L'administrateur règle trois points : les **noms et certificats** des services,
| 97 | 100 | |
| 98 | 101 | ### J. Nom de la console (OI-170, 2026-11-18) |
| 99 | 102 | - **Champ « Console d'exploitation »** (`console`), avec la console : défaut `console.<domaine>`. Le service est porté par le serveur de rôle `console` et publié en HTTPS (fichier récapitulatif, section « Services par serveur »). |
| 103 | + | |
| 104 | +### K. Journal d'audit de la console (OI-209, 2026-11-19) | |
| 105 | +- **Section « Journal d'audit de la console »** (E005-C12), seulement avec la console, après la double authentification. Elle explique le verrou : on peut ajouter des lignes au journal, jamais les modifier ni les effacer, même en tant que root. Certains conteneurs refusent ce verrou, comme les conteneurs LXC non privilégiés de Proxmox, et l'installation s'arrête alors. | |
| 106 | +- **Case** `console_journal_modifiable`, décochée par défaut : « Accepter un journal d'audit modifiable si le serveur refuse de le verrouiller ». Son aide dit que la console le signalera sur son tableau de bord, et renvoie au guide « Protéger le journal d'audit de la console ». | |
| 107 | +- **Évolution** : la case n'est pas figée. Elle se coche après un échec du rôle `console`, ou quand une évolution ajoute la console sur un nouveau serveur en conteneur. | |
| 108 | +- **Écart** : le parcours navigateur de l'assistant ne choisit pas la console ; la section n'est donc pas contrôlée par axe-core. Elle reprend le balisage de la case des administrateurs (E005-C11) : `fieldset` et `legend`, case dans son `label`, aide reliée par `aria-describedby`, lien souligné. | |
| 109 | + |
M
docs/ihm/screens/E-010-recapitulatif.md
+2
-0
@@ -82,6 +82,8 @@ L'administrateur relit l'ensemble de ses choix, section par section. Il voit les
| 82 | 82 | - **Responsive** : cartes sur deux colonnes à partir du point de rupture `md` ; le bouton de lancement n'est pas collé en bas sur mobile. |
| 83 | 83 | - **Vérifications** : tests `e010_*` (`installer/tests/installation.rs`, Ansible simulé), tests du runner, parcours navigateur jusqu'au lancement. |
| 84 | 84 | |
| 85 | +- **Journal d'audit de la console (OI-209, 2026-11-19)** : avec la console, la carte Sécurité ajoute « Journal d'audit de la console », qui vaut « verrouillé, exigé » ou « modifiable accepté si le serveur refuse le verrou ». Le second cas ajoute l'avertissement « Le journal d'audit de la console restera modifiable si son serveur refuse de le verrouiller : un compte qui prendrait la main sur la console pourrait réécrire son historique. La console le signalera sur son tableau de bord. » | |
| 86 | + | |
| 85 | 87 | ### I. Écarts à la livraison (OI-068, mode principal depuis le poste) |
| 86 | 88 | |
| 87 | 89 | - **Plan d'exécution (E010-C3)** : la colonne « Serveur » nomme les hôtes déclarés en « Plusieurs serveurs » (ex. `ldap1.exemple.fr`), « Cette machine » sinon ; carte « Mode et cibles » : « Cette machine », « (cette machine) », « Docker Compose (appliance sur cette machine) ». |
M
docs/ihm/screens/E-021-tableau-de-bord.md
+4
-0
@@ -33,6 +33,7 @@ disponible (M14).
| 33 | 33 | | C-021 | Sidebar | Nav | — | Oui | Seule entrée en M9 : « Tableau de bord », active | |
| 34 | 34 | | C-022 | Menu de l'utilisateur | DropdownMenu | DropdownMenu | Oui | Dans l'en-tête | |
| 35 | 35 | | E021-C1 | Encadré de versions | Alert | Alert | Selon le cas | `info-panel` ; seulement si les versions diffèrent | |
| 36 | +| E021-C7 | Encadré « Journal d'audit modifiable » | Alert | Alert warning | Selon le cas | `warning-panel` ; seulement si le journal ne porte pas l'attribut « ajout seul » ; lien vers le guide « Protéger le journal d'audit de la console » (OI-209) | | |
| 36 | 37 | | E021-C2 | Carte « Installation » | Card | Card | Oui | `info-card`, liste de définitions | |
| 37 | 38 | | E021-C3 | Carte « Votre session » | Card | Card | Oui | `info-card` | |
| 38 | 39 | | E021-C4 | Tableau « Serveurs » | Table | Table | Oui | `data-table` sans pagination ni filtre (C-024 allégé) | |
@@ -65,6 +66,7 @@ Les cartes « Installation » et « Votre session » partagent la première lign
| 65 | 66 | | Copier une adresse LDAPS | C-007 | Alpine (presse-papiers) | Toast « Adresse copiée » | — | |
| 66 | 67 | | Se déconnecter | C-022 | Voir E-020 | — | E-020 avec le motif `deconnecte` | |
| 67 | 68 | | Session expirée pendant la consultation | lien ou requête suivante | Garde de session | — | E-020 avec le motif `session` | |
| 69 | +| Journal sans l'attribut « ajout seul » | lecture des attributs du fichier au rendu | Serveur | E021-C7 | Aucun redémarrage : l'encadré disparaît au premier affichage après la pose de l'attribut | | |
| 68 | 70 | | Journal illisible ou chaîne rompue | lecture au rendu | Serveur | Badge `erreur` « Chaîne rompue à la ligne n », ou « Journal illisible » | La page reste affichée ; l'événement est aussi signalé dans les journaux du service | |
| 69 | 71 | |
| 70 | 72 | ### E. Données |
@@ -81,6 +83,7 @@ Les cartes « Installation » et « Votre session » partagent la première lign
| 81 | 83 | | Heures de session | session | « Connecté depuis 14:02 » ; « Fin de session au plus tard à 22:02 » ; « Déconnexion après 45 minutes d'inactivité » | Fuseau du serveur | |
| 82 | 84 | | Dernières actions | `/var/lib/open-iam-console/audit.jsonl`, dix dernières lignes | date (« 18/11/2026 14:02:11 »), identité, événement, adresse source | Libellés : Connexion réussie, Connexion refusée (motif), Déconnexion, Session expirée, Démarrage du service | |
| 83 | 85 | | État de la chaîne | revérifiée à chaque affichage ; le fichier doit finir par la dernière ligne écrite (OI-173) | badge `ok` « Chaîne vérifiée » ou `erreur` « Chaîne rompue à la ligne n » | — | |
| 86 | +| Protection du journal | attributs de `audit.jsonl`, lus à chaque affichage (`FS_IOC_GETFLAGS`) | E021-C7 : « Journal d'audit modifiable. Ce serveur n'a pas permis de verrouiller le journal : on peut encore en modifier ou en effacer des lignes. Un compte qui prendrait la main sur la console pourrait réécrire son historique. » et le lien « Protéger le journal d'audit de la console » | Encadré pour toute absence de l'attribut : droits refusés, système de fichiers qui ne le prend pas en charge, attribut retiré. Pas d'encadré si le fichier ne s'ouvre pas (badge « Journal illisible ») | | |
| 84 | 87 | | Journal vide | — | `empty-state` : « Aucune action enregistrée pour l'instant. » | — | |
| 85 | 88 | | `installation.yaml` absent ou illisible | — | carte d'erreur : « La description de l'installation est absente (ou illisible) (`/etc/open-iam-console/installation.yaml`). Relancez une évolution depuis l'installeur. » | Les cartes « Votre session » et « Dernières actions » restent affichées ; « Serveurs » et « Services » sont masquées | |
| 86 | 89 |
@@ -105,6 +108,7 @@ Les cartes « Installation » et « Votre session » partagent la première lign
| 105 | 108 | - [x] Les dix dernières actions s'affichent, la plus récente en premier ; journal vide : état vide |
| 106 | 109 | - [x] Une ligne modifiée dans le journal fait passer le badge à « Chaîne rompue à la ligne n » |
| 107 | 110 | - [x] Une description illisible ou absente ne casse pas la page |
| 111 | +- [x] Un journal sans l'attribut « ajout seul » montre E021-C7 ; avec l'attribut, pas d'encadré (OI-209 : tests `un_journal_sans_ajout_seul_est_signale_au_tableau_de_bord`, `un_journal_en_ajout_seul_n_est_pas_signale` ; parcours navigateur, encadré affiché et contrôlé par axe-core aux quatre largeurs) | |
| 108 | 112 | - [x] Un champ inconnu dans la description est ignoré |
| 109 | 113 | - [x] Aucun secret n'apparaît (pas de mot de passe, pas de jeton, pas de secret client) |
| 110 | 114 | - [x] axe-core sans violation à 375, 768, 1024 et 1280 px |
A
docs/journal/2026-11-19-m9-tranche-9-journal-modifiable.md
+97
-0
@@ -0,0 +1,97 @@
| 1 | +# M9, tranche 9 : accepter un journal d'audit modifiable depuis l'assistant (OI-209) | |
| 2 | + | |
| 3 | +- Date : 2026-11-19 | |
| 4 | +- Demande : réponse à la question Q-39, posée en fin de tranche 8 | |
| 5 | +- Tâche : OI-209 | |
| 6 | +- Statut : faite | |
| 7 | +- Plan : [tranche 9](../plans/m9-socle-console.md) | |
| 8 | + | |
| 9 | +## Questions et réponses | |
| 10 | + | |
| 11 | +En fin de tranche 8, j'avais signalé un point en une phrase technique : sur un conteneur LXC, root | |
| 12 | +n'a pas le droit de poser `chattr +a`, et seule une variable Ansible posée à la main permet de passer. | |
| 13 | +Réponse : « je comprend rien a ce que dit ». | |
| 14 | + | |
| 15 | +J'ai reformulé sans jargon, puis posé la question avec trois choix : | |
| 16 | + | |
| 17 | +> Le journal de la console est verrouillé pour qu'on puisse seulement y ajouter des lignes, jamais | |
| 18 | +> les modifier. Certains serveurs, dont des conteneurs Proxmox (LXC), refusent ce verrou, même à | |
| 19 | +> root. Aujourd'hui, l'installation s'arrête alors, et seul un réglage modifié à la main permet de | |
| 20 | +> passer outre. Que doit faire l'assistant d'installation ? | |
| 21 | + | |
| 22 | +- Case dans l'assistant (recommandé) | |
| 23 | +- Avertir et continuer, comme avant la revue OWASP | |
| 24 | +- Toujours bloquer | |
| 25 | + | |
| 26 | +Réponse : « case dans l'assistant, la console affichera que son journal est modifiable et une | |
| 27 | +documentation explique la possibilité de corriger cela ». La réponse est inscrite en Q-39. | |
| 28 | + | |
| 29 | +## Ce qui a été fait | |
| 30 | + | |
| 31 | +- **Assistant.** | |
| 32 | + - Avec la console, l'étape Sécurité montre une section « Journal d'audit de la console ». Elle | |
| 33 | + porte une case décochée : « Accepter un journal d'audit modifiable si le serveur refuse de le | |
| 34 | + verrouiller ». | |
| 35 | + - La case devient `composants_parametres.console.journal_sans_ajout_seul`, puis | |
| 36 | + `oiam_console_journal_sans_ajout_seul` pour Ansible. Sans la console, rien n'est transmis. | |
| 37 | + - Le récapitulatif dit le choix dans la carte Sécurité. Si la case est cochée, il ajoute un | |
| 38 | + avertissement. | |
| 39 | + - La case n'est pas figée en évolution. | |
| 40 | +- **Rôle `console`.** Le message d'arrêt explique le refus. Il propose une machine virtuelle ou la | |
| 41 | + case de l'étape Sécurité, et renvoie au guide. | |
| 42 | +- **Console.** | |
| 43 | + - À chaque affichage, le tableau de bord lit l'attribut du journal (ioctl `FS_IOC_GETFLAGS`, par | |
| 44 | + `rustix`, déjà dans l'arbre). | |
| 45 | + - Sans l'attribut, un encadré « Journal d'audit modifiable » renvoie au guide. Il disparaît dès | |
| 46 | + que l'attribut est posé, sans redémarrage. | |
| 47 | + - `open-iam-console audit verifier` dit aussi si le journal est verrouillé. Son code de sortie ne | |
| 48 | + change pas. | |
| 49 | +- **Guide.** « Protéger le journal d'audit de la console » explique comment vérifier, pourquoi le | |
| 50 | + serveur refuse, et comment corriger : machine virtuelle, verrou posé depuis l'hôte, ou case | |
| 51 | + cochée. Le tutoriel, la page sur la sécurité et l'arborescence y renvoient. | |
| 52 | + | |
| 53 | +## Problèmes rencontrés | |
| 54 | + | |
| 55 | +- **Un test ne peut pas poser l'attribut.** Le verrou demande les droits de root. Le tableau de | |
| 56 | + bord passe donc par une lecture remplaçable dans les tests, comme l'horloge. La vraie lecture | |
| 57 | + est prouvée ailleurs : la cible Ubuntu de Molecule accepte l'attribut, et `audit verifier` y | |
| 58 | + annonce « Journal verrouillé ». C'est la raison de la ligne ajoutée à cette commande. | |
| 59 | +- **Sortie de `audit verifier`.** La vérification Molecule comparait toute la sortie à une seule | |
| 60 | + ligne. Elle lit maintenant la première ligne. | |
| 61 | +- **Apostrophe.** askama n'échappe que les valeurs insérées, pas le texte fixe du gabarit. Une | |
| 62 | + assertion attendait `'` dans le titre de l'encadré. | |
| 63 | + | |
| 64 | +## Relecture indépendante | |
| 65 | + | |
| 66 | +Aucun bloquant. Trois points moyens, traités : | |
| 67 | + | |
| 68 | +- Le scénario d'évolution n'était testé qu'au niveau de la configuration. Un test poste maintenant | |
| 69 | + l'étape Sécurité pendant une évolution. Deux mutations le prouvent. | |
| 70 | +- Le guide semblait contredire le plan sur l'évolution. Une évolution ajoute la console sur un | |
| 71 | + nouveau serveur, mais ne la déplace pas : le guide le dit désormais. | |
| 72 | +- La fiche E-021 attendait le contrôle axe-core de l'encadré. Le parcours navigateur vérifie | |
| 73 | + maintenant qu'il est affiché, et axe-core passe aux quatre largeurs. | |
| 74 | + | |
| 75 | +Deux points mineurs ont été corrigés : la case n'est lue cochée que pour la valeur `on`, et la | |
| 76 | +recette lit les attributs par leur seule colonne. | |
| 77 | + | |
| 78 | +## Vérifications | |
| 79 | + | |
| 80 | +- 13 tests ajoutés ; 808 tests du workspace ; clippy et fmt propres ; ansible-lint au profil | |
| 81 | + « production ». | |
| 82 | +- 19 mutations détectées sur une copie du dépôt. | |
| 83 | +- Molecule `console` vert sur Debian 13 et Ubuntu 26.04, idempotence comprise. Sur Ubuntu, la | |
| 84 | + console lit « Journal verrouillé » ; sur Debian, « Journal modifiable ». L'arrêt du rôle nomme la | |
| 85 | + case, le guide et la variable. | |
| 86 | +- Parcours navigateur de la console vert, encadré compris. | |
| 87 | +- `tests/e2e/p2-console.sh` vert (56 contrôles) : sur ces conteneurs Debian, l'encadré est affiché. | |
| 88 | +- `scripts/docs.sh verifier` conforme (27 pages). | |
| 89 | + | |
| 90 | +## Reste ouvert | |
| 91 | + | |
| 92 | +- La section de l'étape Sécurité n'est pas contrôlée par axe-core : le parcours navigateur de | |
| 93 | + l'assistant ne choisit pas la console. | |
| 94 | +- Le verrou posé depuis l'hôte n'a pas été essayé sur Proxmox : le guide le présente avec la | |
| 95 | + vérification à faire ensuite. | |
| 96 | +- `cargo deny` signale `chrono` comme non maintenu (RUSTSEC-2026-0543), par l'outil `maj/outil`. | |
| 97 | + Ce n'est pas lié à cette tranche. |
M
docs/journal/README.md
+7
-4
@@ -27,13 +27,16 @@ Ce dossier n'est pas publié sur le site de la documentation.
| 27 | 27 | | 2026-11-19 | [M9, tranche 6 : journal d'audit chaîné](2026-11-19-m9-tranche-6-journal-audit.md) | OI-173 | |
| 28 | 28 | | 2026-11-19 | [M9, tranche 7 : tableau de bord E-021](2026-11-19-m9-tranche-7-tableau-de-bord.md) | OI-909 | |
| 29 | 29 | | 2026-11-19 | [M9, tranche 8 : revue OWASP et recette de bout en bout](2026-11-19-m9-tranche-8-revue-owasp-recette.md) | OI-174, OI-208 | |
| 30 | +| 2026-11-19 | [M9, tranche 9 : journal d'audit modifiable accepté](2026-11-19-m9-tranche-9-journal-modifiable.md) | OI-209, Q-39 | | |
| 30 | 31 | |
| 31 | 32 | ## Où en est-on le 2026-11-19 |
| 32 | 33 | |
| 33 | -- M9 est terminé : ses dix tâches sont faites. Le critère de sortie est vérifié : la recette | |
| 34 | - `tests/e2e/p2-console.sh` est verte sur conteneurs, Molecule `console` et `sso` sont verts sur | |
| 35 | - Debian 13 et Ubuntu 26.04, et la revue OWASP n'a plus de constat moyen ouvert. | |
| 36 | -- Les 794 tests du workspace passent. Le parcours navigateur de la console est vert. | |
| 34 | +- M9 est terminé : ses onze tâches sont faites. La dernière, OI-209, fait accepter depuis | |
| 35 | + l'assistant un journal d'audit modifiable, que la console signale (Q-39). | |
| 36 | +- Le critère de sortie de M9 est vérifié : la recette `tests/e2e/p2-console.sh` est verte sur | |
| 37 | + conteneurs, Molecule `console` et `sso` sont verts sur Debian 13 et Ubuntu 26.04, et la revue | |
| 38 | + OWASP n'a plus de constat moyen ouvert. | |
| 39 | +- Les 808 tests du workspace passent. Le parcours navigateur de la console est vert. | |
| 37 | 40 | - Ce que la revue reporte est inscrit en OI-208 (M12) : rotation du journal, durée de conservation, |
| 38 | 41 | ancrage ou HMAC de la chaîne. |
| 39 | 42 | - Toutes les décisions sont tranchées, sauf les cinq de M7 (D-071 à D-075), laissées ouvertes |
M
docs/plans/m9-socle-console.md
+120
-0
@@ -199,6 +199,7 @@ Sans lecture de l'annuaire en M9. Il affiche :
| 199 | 199 | | 6. Journal chaîné | OI-173 | Chaque événement écrit ; ligne modifiée détectée par `audit verifier` | Fait (2026-11-19) | |
| 200 | 200 | | 7. Tableau de bord | OI-909 (E-021) | E-021 conforme à sa fiche, axe-core sans violation | Fait (2026-11-19) | |
| 201 | 201 | | 8. Revue et recette | OI-174 | Revue OWASP sans constat moyen ouvert ; `tests/e2e/p2-console.sh` vert | Fait (2026-11-19) | |
| 202 | +| 9. Journal modifiable accepté | OI-209 | Case d'E-005 transmise au rôle ; encadré d'E-021 ; guide publié | Fait (2026-11-19) | | |
| 202 | 203 | |
| 203 | 204 | Le composant devient disponible dès la tranche 2. Le play `console` de `site.yml` n'arrive |
| 204 | 205 | qu'avec la tranche 4 : d'ici là, rien n'est installé pour lui. Aucune release n'est publiée entre |
@@ -1024,6 +1025,125 @@ Constats de la réalisation (2026-11-19) :
| 1024 | 1025 | qu'ansible-lint ne voit pas. Elles sont réécrites, et chaque condition du fichier est vérifiée |
| 1025 | 1026 | comme une chaîne. |
| 1026 | 1027 | |
| 1028 | +### Tranche 9 — Accepter un journal modifiable depuis l'assistant (OI-209) · statut : faite (2026-11-19) | |
| 1029 | + | |
| 1030 | +La tranche 8 arrête le rôle quand le serveur refuse l'attribut « ajout seul » faute de droits. Un | |
| 1031 | +conteneur LXC non privilégié de Proxmox le refuse toujours, car le noyau réserve ce droit à | |
| 1032 | +l'administrateur de l'hôte. Pour passer outre, il fallait poser une variable Ansible à la main. | |
| 1033 | +Arbitrage du 2026-11-19 (Q-39) : une case dans l'assistant, un encadré dans la console tant que | |
| 1034 | +son journal reste modifiable, et un guide qui explique comment corriger. | |
| 1035 | + | |
| 1036 | +Choix de réalisation : | |
| 1037 | + | |
| 1038 | +- **Case de l'assistant.** Avec la console, l'étape Sécurité (E-005) ajoute une section « Journal | |
| 1039 | + d'audit de la console », avec une case décochée. La case n'est pas figée en évolution : on la | |
| 1040 | + coche après un échec, ou quand une évolution ajoute la console sur un nouveau serveur en conteneur. | |
| 1041 | +- **Configuration.** La case devient `composants_parametres.console.journal_sans_ajout_seul` dans | |
| 1042 | + `openiam.yaml`, puis `oiam_console_journal_sans_ajout_seul` dans les variables Ansible. Sans la | |
| 1043 | + console, rien n'est transmis et la variable vaut faux. Cochée, la case ajoute un avertissement au | |
| 1044 | + récapitulatif (E-010). La carte Sécurité dit dans les deux cas ce qui a été choisi. | |
| 1045 | +- **Rôle.** Le message d'arrêt nomme la case de l'étape Sécurité et le guide. Il garde le nom de | |
| 1046 | + la variable, pour qui joue le rôle sans l'assistant. | |
| 1047 | +- **Console.** À chaque affichage du tableau de bord, la console lit les attributs de son journal | |
| 1048 | + (ioctl `FS_IOC_GETFLAGS`, par `rustix`, déjà dans l'arbre). Sans l'attribut, un encadré | |
| 1049 | + l'annonce et renvoie au guide. La cause n'y change rien : droits refusés, système de fichiers | |
| 1050 | + qui ne le prend pas en charge, attribut retiré à la main. Une fois l'attribut posé, l'encadré | |
| 1051 | + disparaît au prochain affichage, sans redémarrage. Un journal qui ne s'ouvre pas ne montre pas | |
| 1052 | + l'encadré : le badge « Journal illisible » le dit déjà. | |
| 1053 | +- **Commande `audit verifier`.** Après l'état de la chaîne, elle dit si le journal est verrouillé. | |
| 1054 | + Son code de sortie ne change pas. Le guide s'en sert pour vérifier, et Molecule prouve ainsi la | |
| 1055 | + vraie lecture de l'attribut sur sa cible Ubuntu, qui l'accepte. Aucun test du poste ne peut le | |
| 1056 | + faire : poser l'attribut demande les droits de root. | |
| 1057 | +- **Système de fichiers sans l'attribut.** Le rôle continue sans la case, comme avant : aucun | |
| 1058 | + droit n'est refusé, et la console le signale désormais. C'est le cas des conteneurs Docker de | |
| 1059 | + recette. | |
| 1060 | +- **Guide.** « Protéger le journal d'audit de la console », dans les guides pratiques. Il explique | |
| 1061 | + comment vérifier, pourquoi le verrou est refusé et comment corriger : machine virtuelle, ou | |
| 1062 | + attribut posé depuis l'hôte. Il finit par vérifier que l'encadré a disparu. | |
| 1063 | + | |
| 1064 | +```gherkin | |
| 1065 | +# language: fr | |
| 1066 | +Fonctionnalité: Un journal d'audit modifiable s'accepte dans l'assistant et se voit dans la console | |
| 1067 | + | |
| 1068 | + Scénario: Avec la console, l'étape Sécurité propose la case, décochée | |
| 1069 | + Soit un brouillon avec la console d'exploitation | |
| 1070 | + Quand l'administrateur ouvre l'étape Sécurité | |
| 1071 | + Alors la section « Journal d'audit de la console » propose une case décochée | |
| 1072 | + Et son aide renvoie au guide « Protéger le journal d'audit de la console » | |
| 1073 | + | |
| 1074 | + Scénario: Sans la console, la section n'apparaît pas | |
| 1075 | + Soit un brouillon sans la console | |
| 1076 | + Quand l'administrateur ouvre l'étape Sécurité | |
| 1077 | + Alors la section « Journal d'audit de la console » est absente | |
| 1078 | + | |
| 1079 | + Scénario: La case cochée part dans la configuration et dans les variables Ansible | |
| 1080 | + Soit un brouillon avec la console | |
| 1081 | + Quand l'administrateur coche la case et valide l'étape Sécurité | |
| 1082 | + Alors la configuration accepte un journal sans ajout seul | |
| 1083 | + Et les variables Ansible portent oiam_console_journal_sans_ajout_seul à vrai | |
| 1084 | + Et le récapitulatif le dit dans la carte Sécurité, avec un avertissement | |
| 1085 | + | |
| 1086 | + Scénario: Sans la case, le verrou reste exigé | |
| 1087 | + Soit un brouillon avec la console | |
| 1088 | + Quand l'administrateur valide l'étape Sécurité sans cocher la case | |
| 1089 | + Alors les variables Ansible portent oiam_console_journal_sans_ajout_seul à faux | |
| 1090 | + Et la carte Sécurité du récapitulatif indique que le verrou est exigé, sans avertissement | |
| 1091 | + | |
| 1092 | + Scénario: Sans la console, la case enregistrée n'est pas transmise | |
| 1093 | + Soit la case cochée, puis la console retirée des composants | |
| 1094 | + Quand la configuration est produite | |
| 1095 | + Alors elle ne contient aucun réglage de la console | |
| 1096 | + Et les variables Ansible portent oiam_console_journal_sans_ajout_seul à faux | |
| 1097 | + | |
| 1098 | + Scénario: En évolution, la case reste modifiable | |
| 1099 | + Soit une installation avec la console, verrou exigé | |
| 1100 | + Quand une évolution coche la case | |
| 1101 | + Alors l'évolution est acceptée | |
| 1102 | + | |
| 1103 | + Scénario: L'arrêt du rôle renvoie à la case de l'assistant | |
| 1104 | + Soit chattr refusé faute de droits | |
| 1105 | + Quand le rôle console est joué sans accord | |
| 1106 | + Alors il s'arrête, et son message nomme la case de l'étape Sécurité et le guide | |
| 1107 | + | |
| 1108 | + Scénario: Un journal sans ajout seul est signalé au tableau de bord | |
| 1109 | + Soit un journal qui ne porte pas l'attribut « ajout seul » | |
| 1110 | + Quand un administrateur ouvre le tableau de bord | |
| 1111 | + Alors un encadré annonce que le journal d'audit est modifiable | |
| 1112 | + Et il renvoie au guide « Protéger le journal d'audit de la console » | |
| 1113 | + | |
| 1114 | + Scénario: Un journal en ajout seul n'est pas signalé | |
| 1115 | + Soit un journal qui porte l'attribut « ajout seul » | |
| 1116 | + Quand un administrateur ouvre le tableau de bord | |
| 1117 | + Alors aucun encadré n'annonce de journal modifiable | |
| 1118 | + | |
| 1119 | + Scénario: audit verifier dit si le journal est verrouillé | |
| 1120 | + Soit un journal qui ne porte pas l'attribut « ajout seul » | |
| 1121 | + Quand l'exploitant lance open-iam-console audit verifier | |
| 1122 | + Alors la sortie dit que le journal est modifiable | |
| 1123 | + Et le code de sortie reste celui de la chaîne | |
| 1124 | + | |
| 1125 | + Scénario: Recette de bout en bout sur des cibles sans l'attribut | |
| 1126 | + Soit la recette p2-console.sh, sur des conteneurs dont le système de fichiers ne prend pas l'attribut | |
| 1127 | + Quand jean.dupont ouvre le tableau de bord | |
| 1128 | + Alors l'encadré du journal modifiable est affiché | |
| 1129 | +``` | |
| 1130 | + | |
| 1131 | +Constats de la réalisation (2026-11-19) : | |
| 1132 | +- 13 tests ajoutés : configuration, brouillon, E-005 (dont un en évolution), E-010, lecture de | |
| 1133 | + l'attribut, tableau de bord, `audit verifier`. Le test d'évolution passait d'emblée, car rien ne | |
| 1134 | + figeait le réglage : c'est un garde-fou, et deux mutations le prouvent. 19 mutations détectées | |
| 1135 | + en tout, sur une copie du dépôt. | |
| 1136 | +- Un test ne peut pas poser l'attribut sans les droits de root. Le tableau de bord passe donc par | |
| 1137 | + une lecture remplaçable, comme l'horloge. Molecule prouve la vraie lecture : « Journal | |
| 1138 | + verrouillé » sur Ubuntu, qui accepte l'attribut, et « Journal modifiable » sur Debian, qui ne le | |
| 1139 | + prend pas en charge. | |
| 1140 | +- La vérification Molecule de la chaîne lit maintenant la première ligne de `audit verifier`. | |
| 1141 | +- `tests/e2e/p2-console.sh` vert (56 contrôles) : sur ces conteneurs, l'encadré est affiché. | |
| 1142 | +- Parcours navigateur de la console vert, encadré affiché et contrôlé par axe-core. La section | |
| 1143 | + d'E-005 n'est pas contrôlée par axe-core : le parcours de l'assistant ne choisit pas la console. | |
| 1144 | +- Relecture indépendante : aucun bloquant ; trois points moyens corrigés (test d'évolution réel, | |
| 1145 | + phrase du guide sur l'évolution, coche de la fiche E-021) et deux mineurs. | |
| 1146 | + | |
| 1027 | 1147 | ### Tranches à formuler (comportements pressentis) |
| 1028 | 1148 | |
| 1029 | 1149 | - **3b** : `open-iam-console exporteur-ldap` remplace `open-iam-installer exporteur-ldap` dans le |
M
docs/src/SUMMARY.md
+1
-0
@@ -17,6 +17,7 @@
| 17 | 17 | - [Restaurer une sauvegarde](guides/restaurer-une-sauvegarde.md) |
| 18 | 18 | - [Joindre des postes Linux à l'annuaire](guides/joindre-des-postes-linux.md) |
| 19 | 19 | - [Mettre en place le contrôleur Samba pour les postes Windows](guides/controleur-samba-postes-windows.md) |
| 20 | +- [Protéger le journal d'audit de la console](guides/proteger-le-journal-d-audit-de-la-console.md) | |
| 20 | 21 | |
| 21 | 22 | # Référence |
| 22 | 23 |
M
docs/src/explications/securite.md
+6
-2
@@ -85,8 +85,12 @@ coup, avec les mêmes réglages sur chaque serveur.
| 85 | 85 | - **Ajout seul.** Le journal de la console reçoit l'attribut « ajout seul » quand le système le |
| 86 | 86 | permet : même root ne peut alors que l'allonger. Sur un système de fichiers qui ne le prend pas |
| 87 | 87 | en charge, l'installation le signale et continue. Si root n'a pas le droit de le poser, ce qui |
| 88 | - arrive dans certains conteneurs, l'installation s'arrête. Vous pouvez accepter un journal sans | |
| 89 | - ajout seul en posant la variable Ansible `oiam_console_journal_sans_ajout_seul: true`. | |
| 88 | + arrive dans certains conteneurs, l'installation s'arrête. Pour l'accepter quand même, cochez | |
| 89 | + « Accepter un journal d'audit modifiable si le serveur refuse de le verrouiller » à l'étape | |
| 90 | + Sécurité de l'assistant. Dans tous les cas, le tableau de bord de la console affiche un encadré | |
| 91 | + tant que le journal n'a pas l'attribut, et `open-iam-console audit verifier` le dit aussi. Le | |
| 92 | + guide [Protéger le journal d'audit de la console](../guides/proteger-le-journal-d-audit-de-la-console.md) | |
| 93 | + explique comment corriger. | |
| 90 | 94 | - **Pages de connexion de la console.** nginx accepte au plus dix requêtes par minute et par |
| 91 | 95 | adresse vers ces pages, avec une rafale de vingt, et répond 429 au-delà. La console n'ouvre de |
| 92 | 96 | session qu'après une connexion réussie. Au-delà de trente refus sans compte dans la même minute, |
A
docs/src/guides/proteger-le-journal-d-audit-de-la-console.md
+107
-0
@@ -0,0 +1,107 @@
| 1 | +# Protéger le journal d'audit de la console | |
| 2 | + | |
| 3 | +_Ce guide sert dans deux cas. Soit le tableau de bord de la console affiche « Journal d'audit | |
| 4 | +modifiable ». Soit l'installation s'arrête parce que le serveur refuse de verrouiller ce journal. | |
| 5 | +Comptez 10 minutes._ | |
| 6 | + | |
| 7 | +## Ce que fait le verrou | |
| 8 | + | |
| 9 | +La console inscrit chaque connexion, chaque refus et chaque déconnexion dans son journal d'audit, | |
| 10 | +`/var/lib/open-iam-console/audit.jsonl`. | |
| 11 | + | |
| 12 | +L'installation pose sur ce fichier l'attribut « ajout seul » (`chattr +a`). On peut alors y ajouter | |
| 13 | +des lignes, mais personne ne peut modifier ni effacer celles qui y sont, pas même root. | |
| 14 | + | |
| 15 | +Sans ce verrou, un compte qui prendrait la main sur la console pourrait réécrire son historique. | |
| 16 | +Chaque ligne porte l'empreinte de la précédente, et une ligne modifiée se voit. Mais qui recalcule | |
| 17 | +toute la chaîne efface ses traces : la page [Modèle de sécurité](../explications/securite.md) en | |
| 18 | +donne les limites. | |
| 19 | + | |
| 20 | +## Vérifier l'état du verrou | |
| 21 | + | |
| 22 | +Sur le serveur de la console, en root : | |
| 23 | + | |
| 24 | +```bash | |
| 25 | +/opt/open-iam-console/current/open-iam-console audit verifier | |
| 26 | +``` | |
| 27 | + | |
| 28 | +Résultat attendu, journal verrouillé : | |
| 29 | + | |
| 30 | +``` | |
| 31 | +Chaîne vérifiée (42 lignes) | |
| 32 | +Journal verrouillé : l'attribut « ajout seul » est posé. | |
| 33 | +``` | |
| 34 | + | |
| 35 | +Si la seconde ligne est « Journal modifiable : l'attribut « ajout seul » est absent. », lisez la | |
| 36 | +suite. | |
| 37 | + | |
| 38 | +Le tableau de bord de la console fait la même lecture à chaque affichage. Il montre l'encadré | |
| 39 | +« Journal d'audit modifiable » tant que l'attribut manque. | |
| 40 | + | |
| 41 | +## Pourquoi le serveur refuse | |
| 42 | + | |
| 43 | +Poser l'attribut demande une capacité du noyau, `CAP_LINUX_IMMUTABLE`. Le noyau la vérifie au | |
| 44 | +niveau de l'hôte, et non du conteneur. | |
| 45 | + | |
| 46 | +- **Conteneur LXC non privilégié**, le réglage par défaut de Proxmox : le root du conteneur n'est | |
| 47 | + pas celui de l'hôte. Le noyau refuse toujours. | |
| 48 | +- **Conteneur Docker** : cette capacité est retirée par défaut. | |
| 49 | +- **Machine virtuelle ou serveur physique** : root a ce droit, et l'installation pose le verrou. | |
| 50 | + | |
| 51 | +Certains systèmes de fichiers ne connaissent pas cet attribut. L'installation le signale alors, | |
| 52 | +sans s'arrêter, et la console affiche le même encadré. | |
| 53 | + | |
| 54 | +## Corriger | |
| 55 | + | |
| 56 | +### Installer la console sur une machine virtuelle | |
| 57 | + | |
| 58 | +C'est la voie conseillée. À l'étape « Mode et cibles » de l'assistant, donnez le rôle « console » à | |
| 59 | +une machine virtuelle ou à un serveur physique. L'installation pose le verrou d'elle-même. | |
| 60 | + | |
| 61 | +Ce choix se fait à l'installation, ou quand une évolution ajoute la console sur un nouveau serveur. | |
| 62 | +Une fois la console installée, une évolution ne la déplace pas sur un autre serveur. | |
| 63 | + | |
| 64 | +### Poser le verrou depuis l'hôte | |
| 65 | + | |
| 66 | +L'administrateur de l'hôte a le droit qui manque au conteneur. Depuis l'hôte, en root, il pose | |
| 67 | +l'attribut sur le fichier du conteneur : | |
| 68 | + | |
| 69 | +```bash | |
| 70 | +chattr +a <chemin du journal vu depuis l'hôte> | |
| 71 | +``` | |
| 72 | + | |
| 73 | +Le chemin dépend de l'hyperviseur et du stockage. Pour un conteneur en marche, le fichier se voit | |
| 74 | +sous `/proc/<PID>/root/var/lib/open-iam-console/audit.jsonl`. `<PID>` est le processus initial du | |
| 75 | +conteneur, vu depuis l'hôte. Sous Proxmox, `lxc-info -n <numéro du conteneur> -p` l'affiche. | |
| 76 | + | |
| 77 | +Le stockage du conteneur doit lui aussi accepter l'attribut. Certains ne l'acceptent pas, comme un | |
| 78 | +partage réseau : `chattr` échoue alors. Vérifiez ensuite dans le conteneur, avec `audit verifier` | |
| 79 | +(voir plus haut). | |
| 80 | + | |
| 81 | +Quelques conséquences : | |
| 82 | + | |
| 83 | +- Le verrou tient quand vous faites évoluer l'installation : le rôle voit l'attribut et ne touche | |
| 84 | + pas au fichier. | |
| 85 | +- Seul l'administrateur de l'hôte peut le retirer : le root du conteneur ne le peut pas. Il faudra | |
| 86 | + passer par l'hôte pour archiver ou vider ce journal. | |
| 87 | +- Un conteneur recréé, ou restauré depuis une sauvegarde, peut perdre l'attribut. Vérifiez-le | |
| 88 | + après chaque opération de ce genre. | |
| 89 | + | |
| 90 | +### Accepter un journal modifiable | |
| 91 | + | |
| 92 | +Si aucune des deux voies n'est possible, acceptez le journal tel qu'il est : | |
| 93 | + | |
| 94 | +1. À l'étape « Sécurité » de l'assistant, cochez « Accepter un journal d'audit modifiable si le | |
| 95 | + serveur refuse de le verrouiller ». Après une installation arrêtée, passez par « Modifier la | |
| 96 | + configuration », puis modifiez la carte Sécurité. | |
| 97 | +2. Relancez l'installation, ou l'évolution. | |
| 98 | + | |
| 99 | +Le récapitulatif rappelle ce choix avant le lancement. La console affiche ensuite l'encadré | |
| 100 | +« Journal d'audit modifiable » sur son tableau de bord, tant que le fichier n'a pas l'attribut. | |
| 101 | + | |
| 102 | +## Vérifier que c'est corrigé | |
| 103 | + | |
| 104 | +1. Relancez `audit verifier` sur le serveur de la console. La seconde ligne doit être « Journal | |
| 105 | + verrouillé : l'attribut « ajout seul » est posé. ». | |
| 106 | +2. Rechargez le tableau de bord de la console. L'encadré « Journal d'audit modifiable » a disparu. | |
| 107 | + La console n'a pas besoin de redémarrer. |
M
docs/src/reference/arborescence.md
+1
-1
@@ -84,7 +84,7 @@ l'instant, elle ne sert que son adresse de santé, `https://console.<domaine>/sa
| 84 | 84 | | `/opt/open-iam-console/releases/<version>/open-iam-console` | Une version de la console par dossier | |
| 85 | 85 | | `/opt/open-iam-console/current` | Lien vers la version qui tourne. Une réinstallation ne remplace jamais une version plus récente | |
| 86 | 86 | | `/var/lib/open-iam-console/` | État de la console, lisible par elle seule (700) | |
| 87 | -| `/var/lib/open-iam-console/audit.jsonl` | Journal d'audit chaîné de la console, en ajout seul quand le système le permet (600). `open-iam-console audit verifier` en vérifie la chaîne | | |
| 87 | +| `/var/lib/open-iam-console/audit.jsonl` | Journal d'audit chaîné de la console, en ajout seul quand le système le permet (600). `open-iam-console audit verifier` en vérifie la chaîne et dit si l'attribut « ajout seul » est posé | | |
| 88 | 88 | | `/var/lib/open-iam-console/audit.jsonl.verrou` | Verrou du journal : une seconde instance de la console ne démarre pas (600) | |
| 89 | 89 | | `/etc/open-iam-console/` | Configuration de la console (750, groupe `open-iam-console`) | |
| 90 | 90 | | `/etc/open-iam-console/console.yaml` | Connexion au portail : émetteur, client `open-iam-console`, adresse de la console, groupes admis, niveau du second facteur, autorité du certificat du portail (640, groupe `open-iam-console`) | |
M
docs/src/tutoriels/premiere-installation.md
+1
-0
@@ -324,6 +324,7 @@ L'état de l'installeur (brouillon, clé SSH, autorité interne) reste dans
| 324 | 324 | | Test du serveur : « Vérifiez l'adresse, le port SSH et le pare-feu de cet hôte. » | Serveur injoignable depuis le poste | Refaites l'étape 2 avec la même adresse et le même port | |
| 325 | 325 | | Test du serveur : « Installation Open IAM : ce serveur porte une autre installation Open IAM (…) » ou « … porte déjà cette installation, avec … » | Le serveur garde une installation précédente, d'une autre configuration ou d'une première tentative avec un autre domaine ou une autre base | Remettez le serveur à blanc, puis « Tester ». Après une première tentative, vous pouvez aussi reprendre à l'étape Organisation le domaine et la base nommés | |
| 326 | 326 | | Test du serveur : « Isolation des services : systemd ne peut pas isoler les services (espace de noms refusé, 226/NAMESPACE) … » | Le serveur est un conteneur LXC sans imbrication : le pare-feu ne démarrerait pas | Sous Proxmox, activez « Imbrication » dans Options → Fonctionnalités du conteneur (`pct set <id> --features nesting=1`), redémarrez-le, puis « Tester » | |
| 327 | +| Installation arrêtée : « Le serveur refuse de verrouiller le journal d'audit … en ajout seul … » | La console est sur un conteneur dont root n'a pas le droit de verrouiller un fichier (conteneur LXC non privilégié, par exemple) | Suivez [Protéger le journal d'audit de la console](../guides/proteger-le-journal-d-audit-de-la-console.md) : machine virtuelle, verrou posé depuis l'hôte, ou case « Accepter un journal d'audit modifiable » à l'étape Sécurité | | |
| 327 | 328 | | « Ce jeton n'est plus valide. Relancez « open-iam-installer nouveau-jeton » sur la machine de l'installeur pour en obtenir un autre. » | Plus de 30 minutes, ou adresse déjà utilisée | Sur le poste, dans un second terminal : `open-iam-installer nouveau-jeton`, puis ouvrez la nouvelle adresse | |
| 328 | 329 | | « Impossible d'écouter sur 127.0.0.1:7070 : Address already in use (os error 98) » | Un autre programme, ou un installeur déjà lancé, occupe le port | Arrêtez-le, ou lancez `open-iam-installer --listen 127.0.0.1:7071` | |
| 329 | 330 | | `ldapwhoami` : « Can't contact LDAP server » | Vous l'avez lancé depuis votre poste, où `annuaire.exemple.fr` n'est pas encore résolu | Lancez-le sur le serveur (`ssh -t …`), ou renseignez d'abord le DNS et le certificat d'autorité sur le poste | |
M
installer/src/assistant/etapes.rs
+20
-0
@@ -1075,6 +1075,8 @@ struct FormSecurite {
| 1075 | 1075 | fige: bool, |
| 1076 | 1076 | /// Section 2FA (E005-C9 à C11), si LemonLDAP::NG est choisi (OI-092). |
| 1077 | 1077 | mfa: Option<MfaVue>, |
| 1078 | + /// E005-C12, si la console est choisie : case « journal modifiable accepté » (OI-209). | |
| 1079 | + journal: Option<bool>, | |
| 1078 | 1080 | } |
| 1079 | 1081 | |
| 1080 | 1082 | /// E005-C9 à C11 : exigence, groupe et 2FA des administrateurs (D-012, D-053). |
@@ -1088,6 +1090,16 @@ struct MfaVue {
| 1088 | 1090 | fige: bool, |
| 1089 | 1091 | } |
| 1090 | 1092 | |
| 1093 | +/// E005-C12 : avec la console, la case du journal d'audit modifiable, cochée ou non (OI-209). | |
| 1094 | +fn journal_vue(brouillon: &Brouillon, coche: bool) -> Option<bool> { | |
| 1095 | + brouillon.composants.as_ref().is_some_and(|c| c.contains(&ComposantId::Console)).then_some(coche) | |
| 1096 | +} | |
| 1097 | + | |
| 1098 | +/// Case du journal modifiable enregistrée au brouillon. | |
| 1099 | +fn journal_enregistre(brouillon: &Brouillon) -> bool { | |
| 1100 | + brouillon.composants_parametres.console.as_ref().is_some_and(|c| c.journal_sans_ajout_seul) | |
| 1101 | +} | |
| 1102 | + | |
| 1091 | 1103 | /// Groupe proposé quand la 2FA vise un groupe (E005-C10). |
| 1092 | 1104 | const GROUPE_MFA: &str = "mfa-required"; |
| 1093 | 1105 |
@@ -1302,6 +1314,7 @@ pub async fn securite(
| 1302 | 1314 | erreurs: Erreurs::default(), |
| 1303 | 1315 | fige: brouillon.evolution.is_some(), |
| 1304 | 1316 | mfa: mfa_vue(&brouillon, &brouillon.securite.as_ref().map_or_else(Mfa::default, |s| s.mfa.clone())), |
| 1317 | + journal: journal_vue(&brouillon, journal_enregistre(&brouillon)), | |
| 1305 | 1318 | }; |
| 1306 | 1319 | page( |
| 1307 | 1320 | Cadre::new(&session, &brouillon, Some(Etape::Securite)).await?, |
@@ -1418,6 +1431,8 @@ pub async fn enregistrer_securite(
| 1418 | 1431 | } |
| 1419 | 1432 | }; |
| 1420 | 1433 | let mfa = lire_mfa(&brouillon, &saisie, &mut erreurs); |
| 1434 | + // Case non envoyée quand elle est décochée (OI-209). | |
| 1435 | + let journal_modifiable = saisie.get("console_journal_modifiable").is_some_and(|v| v == "on"); | |
| 1421 | 1436 | let securite = Securite { services, tls: Tls { mode, acme_email: None }, mdp, mfa }; |
| 1422 | 1437 | let domaine = brouillon.organisation.as_ref().map_or(String::new(), |o| o.domaine.clone()); |
| 1423 | 1438 | let mut constats = securite.mdp.valider(); |
@@ -1448,12 +1463,17 @@ pub async fn enregistrer_securite(
| 1448 | 1463 | erreurs, |
| 1449 | 1464 | fige: base.is_some(), |
| 1450 | 1465 | mfa: mfa_vue(&brouillon, &securite.mfa), |
| 1466 | + journal: journal_vue(&brouillon, journal_modifiable), | |
| 1451 | 1467 | }; |
| 1452 | 1468 | return Ok(invalide(form.render()?)); |
| 1453 | 1469 | } |
| 1454 | 1470 | if securite.tls.mode == TlsMode::Interne { |
| 1455 | 1471 | depot.supprimer(); |
| 1456 | 1472 | } |
| 1473 | + if journal_vue(&brouillon, journal_modifiable).is_some() { | |
| 1474 | + brouillon.composants_parametres.console = | |
| 1475 | + Some(crate::config::ParametresConsole { journal_sans_ajout_seul: journal_modifiable }); | |
| 1476 | + } | |
| 1457 | 1477 | brouillon.enregistrer_securite(securite); |
| 1458 | 1478 | etat.depot.sauver(&brouillon, &secrets)?; |
| 1459 | 1479 | Ok(apres_validation(&brouillon, Etape::Securite, &retour, &entetes)) |
M
installer/src/assistant/installation.rs
+36
-0
@@ -460,6 +460,15 @@ fn cartes(brouillon: &Brouillon, config: &OpenIamConfig, secrets: &Secrets) -> V
| 460 | 460 | config.composants_parametres.source_llng().libelle().to_owned(), |
| 461 | 461 | ) |
| 462 | 462 | })) |
| 463 | + // Journal d'audit de la console (OI-209, E005-C12). | |
| 464 | + .chain(config.composants.contains(&ComposantId::Console).then(|| { | |
| 465 | + let choix = if config.journal_console_modifiable_accepte() { | |
| 466 | + "modifiable accepté si le serveur refuse le verrou" | |
| 467 | + } else { | |
| 468 | + "verrouillé, exigé" | |
| 469 | + }; | |
| 470 | + ("Journal d'audit de la console", choix.to_owned()) | |
| 471 | + })) | |
| 463 | 472 | .collect(), |
| 464 | 473 | }, |
| 465 | 474 | Carte { |
@@ -1789,6 +1798,33 @@ mod tests {
| 1789 | 1798 | Finalisation { etat: dossier.clone(), dossier, config: exemple(), secrets, ajouts: None } |
| 1790 | 1799 | } |
| 1791 | 1800 | |
| 1801 | + // OI-209, scénarios : la carte Sécurité dit le choix du journal de la console ; cochée, la | |
| 1802 | + // case ajoute un avertissement. | |
| 1803 | + #[test] | |
| 1804 | + fn e010_la_carte_securite_dit_le_choix_du_journal_de_la_console() { | |
| 1805 | + use crate::config::{ParametresConsole, console::AVERTISSEMENT_JOURNAL_MODIFIABLE, tests}; | |
| 1806 | + let ligne = |c: &OpenIamConfig| { | |
| 1807 | + let carte = cartes(&Brouillon::depuis_config(c.clone()), c, &Secrets::default()) | |
| 1808 | + .into_iter() | |
| 1809 | + .find(|k| k.titre == "Sécurité") | |
| 1810 | + .expect("carte Sécurité"); | |
| 1811 | + carte.lignes.into_iter().find(|(l, _)| *l == "Journal d'audit de la console").map(|(_, v)| v) | |
| 1812 | + }; | |
| 1813 | + let averti = |c: &OpenIamConfig| { | |
| 1814 | + avertissements(&Brouillon::depuis_config(c.clone()), c, &Secrets::default()) | |
| 1815 | + .iter() | |
| 1816 | + .any(|a| a == AVERTISSEMENT_JOURNAL_MODIFIABLE) | |
| 1817 | + }; | |
| 1818 | + let verrou = tests::exemple_console(); | |
| 1819 | + let mut modifiable = verrou.clone(); | |
| 1820 | + modifiable.composants_parametres.console = Some(ParametresConsole { journal_sans_ajout_seul: true }); | |
| 1821 | + assert_eq!(ligne(&verrou).as_deref(), Some("verrouillé, exigé")); | |
| 1822 | + assert_eq!(ligne(&modifiable).as_deref(), Some("modifiable accepté si le serveur refuse le verrou")); | |
| 1823 | + assert_eq!(ligne(&tests::exemple_sso()), None, "sans la console"); | |
| 1824 | + assert!(averti(&modifiable)); | |
| 1825 | + assert!(!averti(&verrou)); | |
| 1826 | + } | |
| 1827 | + | |
| 1792 | 1828 | #[test] |
| 1793 | 1829 | fn le_recapitulatif_liste_les_comptes_de_service_quand_ils_existent() { |
| 1794 | 1830 | let secrets = Secrets { |
M
installer/src/brouillon.rs
+16
-0
@@ -737,6 +737,10 @@ impl Brouillon {
| 737 | 737 | .as_ref() |
| 738 | 738 | .is_some_and(|c| c.contains(&ComposantId::Sssd)) |
| 739 | 739 | .then(|| self.composants_parametres.sssd.clone().unwrap_or_default()), |
| 740 | + // Journal d'audit modifiable accepté (OI-209) : seulement avec la console. | |
| 741 | + console: self.composants_parametres.console.clone().filter(|_| { | |
| 742 | + self.composants.as_ref().is_some_and(|c| c.contains(&ComposantId::Console)) | |
| 743 | + }), | |
| 740 | 744 | }, |
| 741 | 745 | }; |
| 742 | 746 | let mut constats = config.valider(); |
@@ -1032,6 +1036,18 @@ mod tests {
| 1032 | 1036 | assert!(!rempli_avec(&sans).config().unwrap().mfa.admins, "sans la console, le choix est gardé"); |
| 1033 | 1037 | } |
| 1034 | 1038 | |
| 1039 | + // OI-209, scénario : Sans la console, la case enregistrée n'est pas transmise. | |
| 1040 | + #[test] | |
| 1041 | + fn oi209_sans_la_console_la_case_du_journal_n_est_pas_transmise() { | |
| 1042 | + let cochee = Some(crate::config::ParametresConsole { journal_sans_ajout_seul: true }); | |
| 1043 | + let mut avec = rempli_avec(&crate::config::tests::exemple_console()); | |
| 1044 | + avec.composants_parametres.console = cochee.clone(); | |
| 1045 | + assert_eq!(avec.config().unwrap().composants_parametres.console, cochee); | |
| 1046 | + let mut sans = rempli_avec(&crate::config::tests::exemple_sso()); | |
| 1047 | + sans.composants_parametres.console = cochee; | |
| 1048 | + assert_eq!(sans.config().unwrap().composants_parametres.console, None, "console retirée"); | |
| 1049 | + } | |
| 1050 | + | |
| 1035 | 1051 | #[test] |
| 1036 | 1052 | fn le_parcours_complet_mene_au_recapitulatif() { |
| 1037 | 1053 | let b = rempli_jusqu_a(Etape::Telemetrie); |
M
installer/src/config/ansible.rs
+2
-0
@@ -49,6 +49,8 @@ pub fn group_vars_avec(config: &OpenIamConfig, migration: EtatMigration) -> Stri
| 49 | 49 | ("oiam_binaire", Value::from(binaire_console().display().to_string())), |
| 50 | 50 | // Version de cet installeur, décrite au tableau de bord de la console (E-021, R-19). |
| 51 | 51 | ("oiam_installeur_version", Value::from(env!("CARGO_PKG_VERSION"))), |
| 52 | + // Journal d'audit de la console modifiable accepté à l'étape Sécurité (OI-209, Q-39). | |
| 53 | + ("oiam_console_journal_sans_ajout_seul", Value::from(config.journal_console_modifiable_accepte())), | |
| 52 | 54 | ]); |
| 53 | 55 | // Applications SSO (OI-094, contrat du plan M4) : déclarées seulement avec LemonLDAP::NG ; des |
| 54 | 56 | // listes vides font retirer par le rôle ce qui n'est plus déclaré. |
A
installer/src/config/console.rs
+37
-0
@@ -0,0 +1,37 @@
| 1 | +//! Réglages de la console d'exploitation saisis à l'étape Sécurité (OI-209, tranche 9 du plan | |
| 2 | +//! M9) : `composants_parametres.console` d'`openiam.yaml`. | |
| 3 | + | |
| 4 | +use serde::{Deserialize, Serialize}; | |
| 5 | + | |
| 6 | +/// E005-C12 : réglages de la console. | |
| 7 | +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] | |
| 8 | +#[serde(deny_unknown_fields)] | |
| 9 | +pub struct ParametresConsole { | |
| 10 | + /// Accepter un journal d'audit modifiable si le serveur refuse l'attribut « ajout seul » | |
| 11 | + /// (Q-39) ; rendu en `oiam_console_journal_sans_ajout_seul`. | |
| 12 | + #[serde(default)] | |
| 13 | + pub journal_sans_ajout_seul: bool, | |
| 14 | +} | |
| 15 | + | |
| 16 | +/// Avertissement du récapitulatif (E-010) quand la case est cochée. | |
| 17 | +pub const AVERTISSEMENT_JOURNAL_MODIFIABLE: &str = "Le journal d'audit de la console restera modifiable si son serveur refuse de le verrouiller : un compte qui prendrait la main sur la console pourrait réécrire son historique. La console le signalera sur son tableau de bord."; | |
| 18 | + | |
| 19 | +impl super::OpenIamConfig { | |
| 20 | + /// Journal d'audit modifiable accepté (E005-C12) : seulement avec la console. | |
| 21 | + pub fn journal_console_modifiable_accepte(&self) -> bool { | |
| 22 | + self.composants.contains(&crate::catalogue::ComposantId::Console) | |
| 23 | + && self.composants_parametres.console.as_ref().is_some_and(|c| c.journal_sans_ajout_seul) | |
| 24 | + } | |
| 25 | + | |
| 26 | + /// Constats de la console : un avertissement si le journal modifiable est accepté. | |
| 27 | + pub(super) fn valider_console(&self) -> Vec<super::Constat> { | |
| 28 | + if self.journal_console_modifiable_accepte() { | |
| 29 | + vec![super::Constat::avertissement( | |
| 30 | + "composants_parametres.console", | |
| 31 | + AVERTISSEMENT_JOURNAL_MODIFIABLE, | |
| 32 | + )] | |
| 33 | + } else { | |
| 34 | + Vec::new() | |
| 35 | + } | |
| 36 | + } | |
| 37 | +} |
M
installer/src/config/mod.rs
+4
-0
@@ -3,6 +3,7 @@
| 3 | 3 | |
| 4 | 4 | pub mod ad; |
| 5 | 5 | pub mod ansible; |
| 6 | +pub mod console; | |
| 6 | 7 | pub mod fournisseurs; |
| 7 | 8 | pub mod postes; |
| 8 | 9 | pub mod samba; |
@@ -16,6 +17,7 @@ use serde::{Deserialize, Serialize};
| 16 | 17 | |
| 17 | 18 | use crate::catalogue::{self, ComposantId}; |
| 18 | 19 | pub use ad::{EtatMigration, ParametresLscAd, RegleCollision, SourceAd}; |
| 20 | +pub use console::ParametresConsole; | |
| 19 | 21 | pub use fournisseurs::{Adressage, Fournisseur, Machine, TypeFournisseur}; |
| 20 | 22 | pub use postes::{ParametresSssd, Poste}; |
| 21 | 23 | pub use secrets::{Secret, Secrets}; |
@@ -476,6 +478,8 @@ impl OpenIamConfig {
| 476 | 478 | } |
| 477 | 479 | constats.extend(self.supervision.valider()); |
| 478 | 480 | constats.extend(self.telemetrie.valider()); |
| 481 | + // Journal d'audit de la console modifiable accepté (OI-209, E005-C12). | |
| 482 | + constats.extend(self.valider_console()); | |
| 479 | 483 | constats |
| 480 | 484 | } |
| 481 | 485 | } |
M
installer/src/config/sso.rs
+4
-1
@@ -18,11 +18,14 @@ pub struct ComposantsParametres {
| 18 | 18 | /// Postes Linux (OI-126, E-009c). |
| 19 | 19 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 20 | 20 | pub sssd: Option<ParametresSssd>, |
| 21 | + /// Console d'exploitation (OI-209, E005-C12). | |
| 22 | + #[serde(default, skip_serializing_if = "Option::is_none")] | |
| 23 | + pub console: Option<super::ParametresConsole>, | |
| 21 | 24 | } |
| 22 | 25 | |
| 23 | 26 | impl ComposantsParametres { |
| 24 | 27 | pub fn est_vide(&self) -> bool { |
| 25 | - self.lemonldap.is_none() && self.lsc_ad.is_none() && self.sssd.is_none() | |
| 28 | + self.lemonldap.is_none() && self.lsc_ad.is_none() && self.sssd.is_none() && self.console.is_none() | |
| 26 | 29 | } |
| 27 | 30 | |
| 28 | 31 | /// Sources Active Directory, dans l'ordre de priorité (vide sans paramètres LSC). |
M
installer/src/config/tests.rs
+69
-0
@@ -1419,3 +1419,72 @@ fn le_pare_feu_connait_le_role_et_les_ports_de_chaque_composant() {
| 1419 | 1419 | } |
| 1420 | 1420 | } |
| 1421 | 1421 | } |
| 1422 | + | |
| 1423 | +// --- OI-209 : journal d'audit de la console modifiable, accepté à l'étape Sécurité (plan M9, | |
| 1424 | +// tranche 9) --- | |
| 1425 | + | |
| 1426 | +fn avec_journal_modifiable(mut c: OpenIamConfig) -> OpenIamConfig { | |
| 1427 | + c.composants_parametres.console = Some(ParametresConsole { journal_sans_ajout_seul: true }); | |
| 1428 | + c | |
| 1429 | +} | |
| 1430 | + | |
| 1431 | +fn journal_sans_ajout_seul(c: &OpenIamConfig) -> Option<bool> { | |
| 1432 | + yaml(&ansible::group_vars(c))["oiam_console_journal_sans_ajout_seul"].as_bool() | |
| 1433 | +} | |
| 1434 | + | |
| 1435 | +// Scénario : La case cochée part dans la configuration et dans les variables Ansible. | |
| 1436 | +#[test] | |
| 1437 | +fn la_case_du_journal_modifiable_part_dans_les_variables_ansible() { | |
| 1438 | + assert_eq!(journal_sans_ajout_seul(&avec_journal_modifiable(exemple_console())), Some(true)); | |
| 1439 | +} | |
| 1440 | + | |
| 1441 | +// Scénarios : Sans la case, le verrou reste exigé ; sans la console, la case n'est pas transmise. | |
| 1442 | +#[test] | |
| 1443 | +fn sans_la_case_ou_sans_la_console_le_verrou_du_journal_reste_exige() { | |
| 1444 | + assert_eq!(journal_sans_ajout_seul(&exemple_console()), Some(false)); | |
| 1445 | + let mut decochee = exemple_console(); | |
| 1446 | + decochee.composants_parametres.console = Some(ParametresConsole::default()); | |
| 1447 | + assert_eq!(journal_sans_ajout_seul(&decochee), Some(false)); | |
| 1448 | + assert_eq!( | |
| 1449 | + journal_sans_ajout_seul(&avec_journal_modifiable(exemple_sso())), | |
| 1450 | + Some(false), | |
| 1451 | + "sans la console" | |
| 1452 | + ); | |
| 1453 | +} | |
| 1454 | + | |
| 1455 | +// Scénario : La case cochée ajoute un avertissement au récapitulatif. | |
| 1456 | +#[test] | |
| 1457 | +fn accepter_un_journal_modifiable_avertit() { | |
| 1458 | + let avertit = |c: &OpenIamConfig| { | |
| 1459 | + c.valider() | |
| 1460 | + .iter() | |
| 1461 | + .any(|k| k.gravite == Gravite::Avertissement && k.chemin == "composants_parametres.console") | |
| 1462 | + }; | |
| 1463 | + assert!(avertit(&avec_journal_modifiable(exemple_console()))); | |
| 1464 | + assert!(!avertit(&exemple_console())); | |
| 1465 | + assert!(!avertit(&avec_journal_modifiable(exemple_sso())), "sans la console, rien à signaler"); | |
| 1466 | +} | |
| 1467 | + | |
| 1468 | +// Scénario : En évolution, la case reste modifiable. | |
| 1469 | +#[test] | |
| 1470 | +fn en_evolution_la_case_du_journal_reste_modifiable() { | |
| 1471 | + // Une évolution ajoute toujours un composant : ici White Pages. | |
| 1472 | + let ajout = |mut c: OpenIamConfig| { | |
| 1473 | + c.composants.insert(ComposantId::WhitePages); | |
| 1474 | + c.services.insert(Service::Pages, "pages.exemple.fr".into()); | |
| 1475 | + c | |
| 1476 | + }; | |
| 1477 | + let (verrou, modifiable) = (exemple_console(), avec_journal_modifiable(exemple_console())); | |
| 1478 | + let cochee = ajout(modifiable.clone()).valider_evolution(&verrou); | |
| 1479 | + assert!(cochee.is_empty(), "case cochée en évolution : {cochee:?}"); | |
| 1480 | + let decochee = ajout(verrou).valider_evolution(&modifiable); | |
| 1481 | + assert!(decochee.is_empty(), "case décochée en évolution : {decochee:?}"); | |
| 1482 | +} | |
| 1483 | + | |
| 1484 | +#[test] | |
| 1485 | +fn le_reglage_du_journal_se_relit_depuis_openiam_yaml() { | |
| 1486 | + let c = avec_journal_modifiable(exemple_console()); | |
| 1487 | + let texte = serde_norway::to_string(&c).unwrap(); | |
| 1488 | + assert!(texte.contains("journal_sans_ajout_seul: true"), "{texte}"); | |
| 1489 | + assert_eq!(serde_norway::from_str::<OpenIamConfig>(&texte).unwrap(), c); | |
| 1490 | +} |
M
installer/templates/assistant/securite.html
+14
-0
@@ -105,5 +105,19 @@
| 105 | 105 | <p x-show="!admins" x-cloak class="border-l-4 border-l-warning bg-warning-bg p-md text-sm text-foreground" role="status">Les administrateurs pourront se connecter sans second facteur (déconseillé, D-012) : le récapitulatif le rappellera.</p> |
| 106 | 106 | </fieldset> |
| 107 | 107 | {% endif %} |
| 108 | + {% if let Some(coche) = journal %} | |
| 109 | + {# E005-C12 : journal d'audit de la console, dont certains serveurs refusent le verrou (OI-209, Q-39) #} | |
| 110 | + <fieldset class="flex flex-col gap-md"> | |
| 111 | + <legend class="text-lg text-foreground">Journal d'audit de la console</legend> | |
| 112 | + <p class="text-sm text-muted-foreground">La console verrouille son journal d'audit : on peut y ajouter des lignes, jamais les modifier ni les effacer, même en tant que root. Certains conteneurs refusent ce verrou, comme les conteneurs LXC non privilégiés de Proxmox. L'installation s'arrête alors.</p> | |
| 113 | + <div class="flex flex-col gap-xs"> | |
| 114 | + <label class="flex items-start gap-sm text-sm text-foreground"> | |
| 115 | + <input type="checkbox" name="console_journal_modifiable" value="on"{% if coche %} checked{% endif %} class="mt-xxs size-4 shrink-0 accent-primary" aria-describedby="aide-console_journal_modifiable"> | |
| 116 | + <span>Accepter un journal d'audit modifiable si le serveur refuse de le verrouiller</span> | |
| 117 | + </label> | |
| 118 | + <p id="aide-console_journal_modifiable" class="ml-lg text-xs text-muted-foreground">Déconseillé. La console signalera sur son tableau de bord que son journal reste modifiable. Voir le <a href="https://gitrust.ebii.fr/guides/proteger-le-journal-d-audit-de-la-console.html" class="text-primary underline underline-offset-4">guide « Protéger le journal d'audit de la console »</a>.</p> | |
| 119 | + </div> | |
| 120 | + </fieldset> | |
| 121 | + {% endif %} | |
| 108 | 122 | {% call a::actions(precedent) %}{% endcall %} |
| 109 | 123 | </form> |
M
installer/tests/console.rs
+45
-0
@@ -238,3 +238,48 @@ async fn e004_en_compose_la_console_ne_demande_aucun_role() {
| 238 | 238 | poster(&banc, &cookie, &csrf, "/install/composants", AVEC_CONSOLE).await; |
| 239 | 239 | assert_eq!((statut, redirection.as_str()), (StatusCode::NO_CONTENT, "/install/securite"), "{body}"); |
| 240 | 240 | } |
| 241 | + | |
| 242 | +// --- OI-209 : journal d'audit modifiable accepté à l'étape Sécurité (plan M9, tranche 9) --- | |
| 243 | + | |
| 244 | +const GUIDE_JOURNAL: &str = "https://gitrust.ebii.fr/guides/proteger-le-journal-d-audit-de-la-console.html"; | |
| 245 | +const SECURITE_CONSOLE: &str = "annuaire=annuaire.exemple.fr&auth=auth.exemple.fr&sso_admin=admin-sso.exemple.fr&console=console.exemple.fr&tls=interne&preset=anssi&mfa_exigence=tous&mfa_admins=on"; | |
| 246 | + | |
| 247 | +fn journal_accepte(banc: &Banc) -> Option<bool> { | |
| 248 | + brouillon(banc).composants_parametres.console.map(|c| c.journal_sans_ajout_seul) | |
| 249 | +} | |
| 250 | + | |
| 251 | +// Scénarios : Avec la console, l'étape Sécurité propose la case, décochée ; sans la console, la | |
| 252 | +// section n'apparaît pas. | |
| 253 | +#[tokio::test] | |
| 254 | +async fn e005_avec_la_console_la_case_du_journal_modifiable_est_proposee_decochee() { | |
| 255 | + let (banc, cookie, csrf) = jusqu_aux_composants("local", &[]).await; | |
| 256 | + poster(&banc, &cookie, &csrf, "/install/composants", AVEC_CONSOLE).await; | |
| 257 | + let (_, page) = lire(&banc, &cookie, "/install/securite").await; | |
| 258 | + assert!(contient(&page, "Journal d'audit de la console"), "{page}"); | |
| 259 | + let case = bloc(&page, r#"name="console_journal_modifiable""#, ">"); | |
| 260 | + assert!(!case.contains("checked") && !case.contains("disabled"), "{case}"); | |
| 261 | + assert!(page.contains(GUIDE_JOURNAL), "l'aide renvoie au guide : {page}"); | |
| 262 | + | |
| 263 | + let (banc, cookie, csrf) = jusqu_aux_composants("local", &[]).await; | |
| 264 | + poster(&banc, &cookie, &csrf, "/install/composants", "composants=openldap&composants=lemonldap").await; | |
| 265 | + let (_, page) = lire(&banc, &cookie, "/install/securite").await; | |
| 266 | + assert!(!page.contains("console_journal_modifiable"), "{page}"); | |
| 267 | + assert!(!contient(&page, "Journal d'audit de la console"), "{page}"); | |
| 268 | +} | |
| 269 | + | |
| 270 | +// Scénarios : La case cochée est enregistrée ; sans la case, le verrou reste exigé. | |
| 271 | +#[tokio::test] | |
| 272 | +async fn e005_la_case_du_journal_modifiable_est_enregistree() { | |
| 273 | + let (banc, cookie, csrf) = jusqu_aux_composants("local", &[]).await; | |
| 274 | + poster(&banc, &cookie, &csrf, "/install/composants", AVEC_CONSOLE).await; | |
| 275 | + let cochee = format!("{SECURITE_CONSOLE}&console_journal_modifiable=on"); | |
| 276 | + let (statut, _, body) = poster(&banc, &cookie, &csrf, "/install/securite", &cochee).await; | |
| 277 | + assert_eq!(statut, StatusCode::NO_CONTENT, "{body}"); | |
| 278 | + assert_eq!(journal_accepte(&banc), Some(true)); | |
| 279 | + let (_, page) = lire(&banc, &cookie, "/install/securite").await; | |
| 280 | + assert!(bloc(&page, r#"name="console_journal_modifiable""#, ">").contains("checked"), "relue cochée"); | |
| 281 | + | |
| 282 | + let (statut, _, body) = poster(&banc, &cookie, &csrf, "/install/securite", SECURITE_CONSOLE).await; | |
| 283 | + assert_eq!(statut, StatusCode::NO_CONTENT, "{body}"); | |
| 284 | + assert_eq!(journal_accepte(&banc), Some(false), "décochée : verrou exigé"); | |
| 285 | +} |
M
installer/tests/evolution.rs
+46
-0
@@ -1343,3 +1343,49 @@ async fn d085_une_machine_installee_ne_se_detruit_pas_chez_le_fournisseur() {
| 1343 | 1343 | let (_, page) = lire(&banc, &cookie, "/install/cibles").await; |
| 1344 | 1344 | assert!(!page.contains("/retrait\""), "aucun bouton Retirer sur une machine installée : {page}"); |
| 1345 | 1345 | } |
| 1346 | + | |
| 1347 | +// OI-209, scénario : En évolution, la case du journal modifiable reste modifiable (plan M9, | |
| 1348 | +// tranche 9). Base avec la console, verrou exigé ; l'évolution ajoute White Pages et coche la case. | |
| 1349 | +#[tokio::test] | |
| 1350 | +async fn oi209_en_evolution_la_case_du_journal_modifiable_se_coche() { | |
| 1351 | + use open_iam_installer::catalogue::RoleHote; | |
| 1352 | + use open_iam_installer::config::Service; | |
| 1353 | + let banc = installe().await; | |
| 1354 | + modifier_base(&banc, |c| { | |
| 1355 | + c.deploiement.topologie = Topologie::Multi; | |
| 1356 | + c.deploiement.hotes = vec![Hote { | |
| 1357 | + nom: "iam1.exemple.fr".into(), | |
| 1358 | + adresse: "ok.exemple.fr".into(), | |
| 1359 | + port: 22, | |
| 1360 | + utilisateur: "root".into(), | |
| 1361 | + roles: [RoleHote::Annuaire, RoleHote::Outils, RoleHote::Sso, RoleHote::Console].into(), | |
| 1362 | + local: false, | |
| 1363 | + machine: None, | |
| 1364 | + }]; | |
| 1365 | + c.composants.extend([ComposantId::Lemonldap, ComposantId::Console]); | |
| 1366 | + c.services.insert(Service::Auth, "auth.exemple.fr".into()); | |
| 1367 | + c.services.insert(Service::SsoAdmin, "admin-sso.exemple.fr".into()); | |
| 1368 | + c.services.insert(Service::Console, "console.exemple.fr".into()); | |
| 1369 | + }); | |
| 1370 | + let (cookie, csrf) = evolution(&banc).await; | |
| 1371 | + let composants = "composants=openldap&composants=sauvegarde&composants=ssp&composants=lemonldap&composants=console&composants=white_pages"; | |
| 1372 | + let (statut, _, body) = poster(&banc, &cookie, &csrf, "/install/composants", composants).await; | |
| 1373 | + assert_eq!(statut, StatusCode::NO_CONTENT, "{body}"); | |
| 1374 | + let (_, page) = lire(&banc, &cookie, "/install/securite").await; | |
| 1375 | + let case = bloc(&page, r#"name="console_journal_modifiable""#, ">"); | |
| 1376 | + assert!(!case.contains("checked") && !case.contains("disabled"), "non figée, décochée : {case}"); | |
| 1377 | + let (statut, _, body) = poster( | |
| 1378 | + &banc, | |
| 1379 | + &cookie, | |
| 1380 | + &csrf, | |
| 1381 | + "/install/securite", | |
| 1382 | + "pages=pages.exemple.fr&console_journal_modifiable=on", | |
| 1383 | + ) | |
| 1384 | + .await; | |
| 1385 | + assert_eq!(statut, StatusCode::NO_CONTENT, "l'évolution accepte la case cochée : {body}"); | |
| 1386 | + assert!(brouillon_yaml(&banc).contains("journal_sans_ajout_seul: true"), "{}", brouillon_yaml(&banc)); | |
| 1387 | + let (statut, page) = lire(&banc, &cookie, "/install/recapitulatif").await; | |
| 1388 | + assert_eq!(statut, StatusCode::OK); | |
| 1389 | + assert!(page.contains("modifiable accepté si le serveur refuse le verrou"), "{page}"); | |
| 1390 | + assert!(!page.contains("Une évolution ne peut qu"), "{page}"); | |
| 1391 | +} |
M
tests/e2e/p2-console.sh
+11
-1
@@ -283,6 +283,16 @@ assert any("srv1.exemple.fr" in l and "(cette console)" not in l for l in lignes
| 283 | 283 | assert "Chaîne vérifiée" in page, "chaîne"' "$travail/tableau.html" |
| 284 | 284 | } |
| 285 | 285 | controle "le tableau de bord montre jean.dupont, son second facteur, srv1 et srv2 « (cette console) »" tableau |
| 286 | +# OI-209 : l'encadré « Journal d'audit modifiable » paraît exactement quand le journal n'a pas | |
| 287 | +# l'attribut « ajout seul » (sur ces conteneurs, leur système de fichiers ne le prend pas en charge). | |
| 288 | +encadre_juste() { | |
| 289 | + if sur_srv2 "lsattr /var/lib/open-iam-console/audit.jsonl 2>/dev/null | awk '{print \$1}' | grep -q a"; then | |
| 290 | + ! grep -q 'id="journal-modifiable"' "$travail/tableau.html" | |
| 291 | + else | |
| 292 | + grep -q 'id="journal-modifiable"' "$travail/tableau.html" && grep -q "proteger-le-journal-d-audit-de-la-console" "$travail/tableau.html" | |
| 293 | + fi | |
| 294 | +} | |
| 295 | +controle "le tableau de bord signale le journal modifiable exactement quand il n'est pas en ajout seul" encadre_juste | |
| 286 | 296 | csrf_console="$(grep -oE 'X-CSRF-Token":"[0-9a-f]{64}' "$travail/tableau.html" | grep -oE '[0-9a-f]{64}$' || true)" |
| 287 | 297 | sortie="$(web -b "$pot_console" -o /dev/null -D "$travail/deconnexion" -w '%{http_code}' -X POST \ |
| 288 | 298 | -H 'HX-Request: true' -H "X-CSRF-Token: $csrf_console" "$console/console/deconnexion")" |
@@ -321,6 +331,6 @@ assert any(l[\"evenement\"] == sys.argv[1] and l[\"identite\"] == \"jean.dupont\
| 321 | 331 | } |
| 322 | 332 | controle "la connexion de jean.dupont est inscrite, avec son adresse" inscrite connexion |
| 323 | 333 | controle "sa déconnexion est inscrite" inscrite deconnexion |
| 324 | -controle "le journal est en ajout seul, ou son absence signalée par le rôle" sur_srv2 "lsattr $J 2>/dev/null | grep -q -- '-a-' || ! lsattr $J >/dev/null 2>&1" | |
| 334 | +controle "le journal est en ajout seul, ou son absence signalée par le rôle" sur_srv2 "lsattr $J 2>/dev/null | awk '{print \$1}' | grep -q a || ! lsattr $J >/dev/null 2>&1" | |
| 325 | 335 | |
| 326 | 336 | if (( echecs == 0 )); then printf '\n\033[1;32m✓ Recette P2 de la console verte (srv1 %s, srv2 %s)\033[0m\n' "$ip1" "$ip2"; else printf '\n\033[1;31m✕ %d échec(s)\033[0m\n' "$echecs"; exit 1; fi |
M
tests/navigateur/console.mjs
+3
-0
@@ -30,6 +30,9 @@ export async function parcourirConsole(ouvrir, verifier, { axe, largeurs, base }
| 30 | 30 | } |
| 31 | 31 | await page.waitForNetworkIdle({ idleTime: 200 }); |
| 32 | 32 | verifier(await page.evaluate(() => Boolean(window.htmx && window.Alpine)), "console : HTMX et Alpine chargés"); |
| 33 | + // OI-209 : le journal du banc est un fichier de test, jamais en ajout seul : l'encadré E021-C7 est | |
| 34 | + // affiché, et axe-core le contrôle avec le reste de la page. | |
| 35 | + verifier(Boolean(await page.$("#journal-modifiable")), "E021-C7 : l'encadré du journal modifiable est affiché"); | |
| 33 | 36 | await controlerA11y("E-021"); |
| 34 | 37 | |
| 35 | 38 | // C-022 au clavier : Entrée ouvre et met le focus sur le premier élément, les flèches restent dans |
GitRust