Repository Public MIT Research preview
1% S10-F05 — Moindre privilège : trois clés fictives, cinq outils, une porte d'approbation.2% Idée : la portée d'une clé dit ce qui est POSSIBLE ; l'approbation dit si CET appel destructif est3% voulu, maintenant. Le contenu de la matrice vient du code (S10-F05-donnees.tex).4\input{S10-F05-donnees.tex}%5\begin{tikzpicture}[x=1mm, y=1mm]6 \newcommand{\AtlasFigPermX}[1]{29+14.6*#1}7 \newcommand{\AtlasFigPermY}[1]{35.2-9*#1}8 % Colonne des outils destructifs9 \draw[atlas boundary, line width=.9pt, rounded corners=3pt] (\AtlasFigPermX{5}-7.2,3.6) rectangle (\AtlasFigPermX{5}+7.2,50.5);10 % En-têtes : un outil par colonne11 \newcommand{\AtlasFigPermColonne}[4]{%12 \node[atlas label, font=\ttfamily\AtlasSizeTiny, align=center] at (\AtlasFigPermX{#1},45.5) {#2};13 \def\AtlasFigPermEffet{#4}\def\AtlasFigPermDestructif{destructif}%14 \ifx\AtlasFigPermEffet\AtlasFigPermDestructif15 \node[atlas note, text=atlasHazard] at (\AtlasFigPermX{#1},38.6) {#4};16 \else17 \node[atlas note] at (\AtlasFigPermX{#1},38.6) {#4};18 \fi}19 \AtlasFigPermColonnes20 \node[atlas note, anchor=west] at (0,45.5) {outil};21 \node[atlas note, anchor=west] at (0,38.6) {effet};22 \draw[atlasRule, line width=.6pt] (0,35.2) -- (\AtlasFigPermX{5}+7.2,35.2);23 % Rangées : une clé par rangée24 \newcommand{\AtlasFigPermCase}[3]{%25 \ifnum#3=1\relax \pic[atlasValid, scale=.42] at (\AtlasFigPermX{#2},\AtlasFigPermY{#1}) {atlas check};26 \else \pic[atlasHazard, scale=.34] at (\AtlasFigPermX{#2},\AtlasFigPermY{#1}) {atlas cross};\fi}27 \newcommand{\AtlasFigPermLigne}[8]{%28 \node[atlas label, font=\ttfamily\AtlasSizeLabel, anchor=west] at (0,\AtlasFigPermY{#1}+1.6) {#2};29 \node[atlas note, anchor=west] at (0,\AtlasFigPermY{#1}-2.2) {#3 outils sur \AtlasFigPermOutils};30 \AtlasFigPermCase{#1}{1}{#4}\AtlasFigPermCase{#1}{2}{#5}\AtlasFigPermCase{#1}{3}{#6}%31 \AtlasFigPermCase{#1}{4}{#7}\AtlasFigPermCase{#1}{5}{#8}}32 \AtlasFigPermLignes33 \node[atlas note, anchor=west] at (0,0) {Coche : la portée de la clé permet l'outil. Croix : l'appel est refusé avant d'atteindre l'API.};34 % Porte d'approbation, pour la seule case destructive permise35 \node[atlas gate, text width=11mm] (g) at (124.5,24) {Accord ?};36 37 \draw[atlas arrow] (\AtlasFigPermX{5}+3,\AtlasFigPermY{3}) -| (g.south);38 \node[atlas block valid, text width=17mm, minimum height=8mm] (oui) at (124.5,44.5) {oui : \AtlasFigPermAppelsAccord\ appel à l'API};39 \draw[atlas arrow valid] (g.north) -- (oui.south);40 \node[atlas note, text=atlasHazard, anchor=north west, text width=12mm] at (128,16.5) {non : \AtlasFigPermAppelsRefus\ appel, rien n'est supprimé};41\end{tikzpicture}42