From 460731bcf9cf9ffec50d5761cd63887a72a93b3d Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem.moulin@fripost.org>
Date: Thu, 10 May 2012 16:35:24 +0200
Subject: Better colors and presentation.

---
 figures/ldap.tex | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 160 insertions(+)
 create mode 100644 figures/ldap.tex

(limited to 'figures/ldap.tex')

diff --git a/figures/ldap.tex b/figures/ldap.tex
new file mode 100644
index 0000000..123ab83
--- /dev/null
+++ b/figures/ldap.tex
@@ -0,0 +1,160 @@
+\documentclass[10pt,a4paper]{article}
+\usepackage[english]{babel}
+\usepackage[T1]{fontenc}
+\usepackage[utf8x]{inputenc}
+\usepackage{array}
+\usepackage{ae}
+\usepackage{tikz}
+\usetikzlibrary{trees,calc,external}
+\tikzexternalize
+
+\def\dn#1{\texttt{#1}}
+
+\newenvironment{entry}[1]
+  {\begin{minipage}[t][0pt][t]{10cm}
+     \texttt{#1}
+     \\[.1\baselineskip] \phantom{cn=}%
+     \begin{tabular}[!t]{@{}>{\ttfamily\bgroup}l<{\egroup}@{:~}%
+                            >{\sffamily\bgroup}l<{\egroup}@{}}%
+  }
+  {  \end{tabular}
+   \end{minipage}}
+
+\tikzset{
+  ldaptree/.style = {
+    grow via three points={one child at (1cm,-1.5\baselineskip) and two children at (1cm,-1.5\baselineskip) and (1cm,-3\baselineskip)},
+    growth parent anchor=south west,
+    edge from parent path={($(\tikzparentnode.south west)+(2.5ex,0)$) |- (\tikzchildnode.west)},
+  },
+  every node/.style = {anchor=west},
+  dn/.style = {font=\ttfamily}
+}
+
+\thispagestyle{empty}
+\begin{document}
+
+\tikzsetnextfilename{ldap-cropped}
+\begin{tikzpicture}[ldaptree]
+  \node[dn] { {o=mailhosting,dc=fripost,dc=org} }
+    child {
+      node[dn] { ou=managers } 
+      child {
+        node {
+          \begin{entry}{cn=gustav}
+            userPassword & \{SSHA\}xxxxxx
+          \end{entry}
+        }
+      } 
+      child [missing] {}
+      child[dn] {
+        node {
+          \begin{entry}{cn=ljo}
+            userPassword & \dots
+          \end{entry}
+        }
+      }
+    }
+    child [missing] {}
+    child [missing] {}
+    child [missing] {}
+    child [missing] {}
+    child {
+      node[dn] { ou=services } 
+      child {
+        node {
+          \begin{entry}{cn=SMTP}
+            userPassword & \{SSHA\}xxxxxx
+          \end{entry}
+        }
+      } 
+      child [missing] {}
+      child {
+        node {
+          \begin{entry}{cn=SASLauth}
+            userPassword & \dots
+          \end{entry}
+        }
+      } 
+    }
+    child [missing] {}
+    child [missing] {}
+    child [missing] {}
+    child [missing] {}
+    child {
+      node[dn] { ou=virtual }
+      child {
+        node {
+          \begin{entry}{dc=fripost.org}
+            isActive & TRUE
+          \end{entry}
+        }
+        child [missing] {}
+        child 
+        {
+          node {
+            \begin{entry}{mailTarget=user@fripost.org}
+              mailLocalAddress & user-alias \\
+              isActive & TRUE 
+            \end{entry}
+          }
+        }
+        child [missing] {}
+        child [missing] {}
+        child 
+        { node { \dn{mailTarget=\dots} } 
+        }
+        child 
+        {
+          node {
+            \begin{entry}{uid=user}
+              userPassword & \{SSHA\}xxxxxx \\
+              isactive & TRUE 
+            \end{entry}
+          }
+        }
+        child [missing] {}
+        child [missing] {}
+        child 
+        { node { \dn{uid=\dots} } 
+        }
+      }
+      child [missing] {}
+      child [missing] {}
+      child [missing] {}
+      child [missing] {}
+      child [missing] {}
+      child [missing] {}
+      child [missing] {}
+      child [missing] {}
+      child [missing] {}
+      child [missing] {}
+      child {
+        node {
+          \begin{entry}{dc=example.org}
+            owner & \texttt{uid=user,dc=fripost.org,ou=virtual,\dots} \\
+            isActive & TRUE
+          \end{entry}
+        }
+        child [missing] {}
+        child 
+          {
+          node {
+            \begin{entry}{mailTarget=user@fripost.org}
+              mailLocalAddress & user \\
+              isActive & TRUE
+            \end{entry}
+          }
+        }
+        child [missing] {}
+        child [missing] {}
+        child 
+        { node { \dn{mailTarget=\dots} } 
+        }
+        child 
+        { node { \dn{uid=\dots} } 
+        }
+      }
+    };
+\end{tikzpicture}
+
+\end{document}
-- 
cgit v1.2.3

