From 460731bcf9cf9ffec50d5761cd63887a72a93b3d Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 10 May 2012 16:35:24 +0200 Subject: Better colors and presentation. --- figures/Makefile | 35 +++++++ figures/ldap.tex | 160 +++++++++++++++++++++++++++++ figures/network.tex | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 486 insertions(+) create mode 100644 figures/Makefile create mode 100644 figures/ldap.tex create mode 100644 figures/network.tex (limited to 'figures') diff --git a/figures/Makefile b/figures/Makefile new file mode 100644 index 0000000..0b2fd5a --- /dev/null +++ b/figures/Makefile @@ -0,0 +1,35 @@ +BUILD=ldap network + +PDF=$(patsubst %,%.pdf,$(BUILD)) +SVG=$(patsubst %,%.svg,$(BUILD)) +PNG=$(patsubst %,%.png,$(BUILD)) + +.PHONY: all force clean cleanall +# let rubber take care of the pdf dependencies +.PHONY: $(BUILD) all dvi ps pdf svg png clean wc + +all: pdf + +dvi: pdf +ps: pdf +pdf: $(PDF) +svg: $(SVG) +png: $(PNG) + + +%.svg: %.pdf + inkscape $*-cropped.pdf --export-plain-svg=$@ + +%.png: %.pdf +# inkscape $^ --export-area-drawing --export-png=$@ + convert -density 120 -quality 85 $*-cropped.pdf $@ + +%.pdf: %.tex + pdflatex -shell-escape $^ + +clean: + rm -rf *.aux *.log *.auxlock network-cropped* ldap-cropped* $(PDF) $(SVG) $(PNG) + + +wc: $(PDF) + @for I in $^; do echo -n "$$I: "; ps2ascii "$$I" | wc -w; done 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} diff --git a/figures/network.tex b/figures/network.tex new file mode 100644 index 0000000..6cebbf8 --- /dev/null +++ b/figures/network.tex @@ -0,0 +1,291 @@ +\documentclass[10pt,landscape,a4paper]{article} +\usepackage[left=0pt,top=0pt,right=0pt,bottom=0pt]{geometry} +\usepackage[english]{babel} +\usepackage[T1]{fontenc} +\usepackage[utf8x]{inputenc} +\usepackage{ae} +\usepackage{tikz} +\usetikzlibrary{shadows,positioning,calc,fit,fadings,external} + +\tikzset{% + external/optimize command away=\withCurrentBoundingBox +} +\def\withCurrentBoundingBox{\pgfusepath{use as bounding box}} +\tikzexternalize + +\newcommand{\machine}[2][]{ + \begin{pgfonlayer}{background} + \node (machine)[% + fill=yellow!50, opacity=.3, rounded corners, draw, dashed, + fit=#2,inner sep=7pt, + label={[name=machine name]below:\phantom{x}}] {}; + \end{pgfonlayer} + \begin{pgfonlayer}{foreground} + \node at (machine name) {\texttt{#1}}; + \end{pgfonlayer} +} + +\pgfdeclarelayer{background} +\pgfdeclarelayer{foreground} +\pgfsetlayers{background,main,foreground} + +\tikzstyle{service}=[fill=blue!20, + text width=5em, text centered, + minimum height=2.5em, + drop shadow] +\tikzstyle{client}=[fill=green!20, + text width=5em, text centered, + minimum height=2.5em, + drop shadow] +\tikzstyle{what} = [sloped,font=\footnotesize] +\tikzstyle{proto} = [sloped,font=\footnotesize\ttfamily] +\tikzstyle{port} = [sloped,font=\tiny\ttfamily] + +\tikzstyle{route} = [line width=1.5pt,line cap=rect,draw=blue!30] +\tikzstyle{from user} = [draw=green!30] +\tikzstyle{TODO} = [draw=red!30,text=red] + +\pgfdeclarehorizontalshading{shade out}{\paperheight}{ + color(0mm)=(transparent!0); + color(20mm)=(transparent!0); + color(30mm)=(transparent!80); + color(40mm)=(transparent!100); + color(50mm)=(transparent!80); + color(60mm)=(transparent!0); + color(\paperwidth)=(transparent!0) +} +\pgfdeclarefading{fade in}{\pgfuseshading{shade out}} + +\pgfdeclarehorizontalshading{shade in}{\paperheight}{ + color(0mm)=(transparent!100); + color(20mm)=(transparent!100); + color(30mm)=(transparent!20); + color(40mm)=(transparent!0); + color(50mm)=(transparent!20); + color(60mm)=(transparent!100); + color(\paperwidth)=(transparent!100) +} +\pgfdeclarefading{fade out}{\pgfuseshading{shade in}} + + +\thispagestyle{empty} +\begin{document} + +\centering +\vspace*{\fill} +\tikzsetnextfilename{network-cropped} +\begin{tikzpicture} + + \begin{scope}[node distance=5pt] + % The member's machine + \node (IMAP-client)[client] {IMAP client}; + \node (SMTP-client)[client] [above=of IMAP-client] {SMTP client}; + \node (web-browser)[client] [below=of IMAP-client] {Web browser}; + \machine[\textnormal{Your machine}]{ (SMTP-client) (IMAP-client) (web-browser) } + \end{scope} + + \begin{scope}[xshift=10cm, node distance=2cm and 2cm, on grid] + % mistral + \node (o) {}; + \node (LDAP-producer) [service] [above right=of o] {LDAP server}; + \node (SMTP-server-IMAP)[service] [above left=of o] {SMTP server}; + \node (IMAP-server) [service] [below left=of o] {IMAP server}; + \node (mailboxes) [service] [below right=of o] {Mailboxes}; + \machine[mistral]{ (IMAP-server) (LDAP-producer) (mailboxes) } + \end{scope} + + \begin{scope}[xshift=10cm, yshift=-7cm] + % harvey + \node (webmail)[service] {Webmail}; + \machine[harvey]{ (webmail) } + \end{scope} + + \begin{scope}[xshift=10cm, yshift=7cm, node distance=2cm and 2cm, on grid] + % luxemburg, elefant + \node (o) {}; + \node (SMTP-server) [service] [left=of o] {SMTP server}; + \node (LDAP-consumer)[service] [right=of o] {LDAP replicate}; + \machine[luxemburg\textnormal{,} elefant]{ (SMTP-server) (LDAP-consumer) } + \end{scope} + + \begin{scope}[xshift=20cm, node distance=1.25cm, on grid] + % gnu + \node (o) {}; + \node (MSA)[service] [above=of o] {MSA}; + \node (MTA)[service] [below=of o] {MTA}; + \machine[gnu]{ (MSA) (MTA) } + \end{scope} + + \withCurrentBoundingBox + + \begin{pgfonlayer}{background} + \begin{scope} + \pgfsetfading{fade in}{\pgftransformshift{\pgfpoint{14cm}{0}}} +% \fill (-20cm,-10cm) rectangle +(40cm,20cm); + \draw[->, route, from user] + (IMAP-client.east) + .. controls +(2.5cm,0) and +(-2.5cm,0) .. + (IMAP-server.west); + + \draw[->, route, from user] + (web-browser.south) + .. controls +(0,-4cm) and +(-3.5cm,0) .. + (webmail.west); + + \draw[->, route, from user, TODO] + (SMTP-client.north) + .. controls +(0,5cm) and +(-5cm,0) .. + ($0.5*(SMTP-server)+0.5*(LDAP-consumer)+(0,1.5cm)$) + .. controls +(5cm,0) and +(0,5cm) .. + (MSA.north); + \end{scope} + + \begin{scope} + \pgfsetfading{fade out}{\pgftransformshift{\pgfpoint{14cm}{0}}} +% \fill (-20cm,-10cm) rectangle +(40cm,20cm); + \draw[dashed, route, from user] + (IMAP-client.east) + .. controls +(2.5cm,0) and +(-2.5cm,0) .. + (IMAP-server.west); + + \draw[dashed, route, from user] + (web-browser.south) + .. controls +(0,-4cm) and +(-3.5cm,0) .. + (webmail.west); + + \draw[dashed, route, from user, TODO] + (SMTP-client.north) + .. controls +(0,5cm) and +(-5cm,0) .. + ($0.5*(SMTP-server)+0.5*(LDAP-consumer)+(0,1.5cm)$) + .. controls +(5cm,0) and +(0,5cm) .. + (MSA.north); + \end{scope} + + \begin{scope} + \draw[route, from user, draw=none] + (IMAP-client.east) + .. controls +(2.5cm,0) and +(-2.5cm,0) .. + (IMAP-server.west) + node[pos=0.5,above,proto] {IMAPS} + node[pos=0.5,below,what] {\texttt{getmail}} + node[pos=0.96,above,port] {993}; + + \draw[route, from user, draw=none] + (web-browser.south) + .. controls +(0,-4cm) and +(-3.5cm,0) .. + (webmail.west) + node[pos=0.5,above,proto] {HTTPS} + node[pos=0.98,above,port] {443}; + + \draw[route, from user, TODO, draw=none] + (SMTP-client.north) + .. controls +(0,5cm) and +(-5cm,0) .. + ($0.5*(SMTP-server)+0.5*(LDAP-consumer)+(0,1.5cm)$) + node[pos=1,above,proto] {ESMTPSA} + node[pos=1,below,what] {\texttt{sendmail}} + .. controls +(5cm,0) and +(0,5cm) .. + (MSA.north) + node[pos=0.985,above,port] {587}; + \end{scope} + + \draw[->, route] + (IMAP-server) + .. controls +(30:2cm) and +(-120:2cm) .. + (LDAP-producer) + node[pos=0.5,above,proto] {LDAP} + node[pos=0.5,below,what] {auth. bind} + node[pos=0.92,above,port] {389}; + + \draw[->, route] + (webmail.north) + .. controls +(0,1.5cm) and +(0,-1.5cm) .. + (IMAP-server.south) + node[pos=0.5,above,proto] {IMAPS} + node[pos=0.94,above,port] {993}; + + \draw[->, route] + (webmail.30) + .. controls +(30:8cm) and +(0,-2.5cm) .. + (LDAP-producer.south) + node[pos=0.5,above,proto] {LDAP \textnormal{(over \texttt{SSH})}} + node[pos=0.15,above,what] {auth. bind to} + node[pos=0.15,below,what] {mod. password} + node[pos=0.96,above,port] {389}; + + \draw[->,route] (MSA) edge + node[above,proto] {ESMTP} + node[pos=0.9,below,port] {25} + (MTA); + + \draw[->, route] + (MSA.west) + .. controls +(-2.5cm,0) and +(2.5cm,0) .. + (LDAP-producer.east) + node[pos=0.5,above,proto] {LDAP \textnormal{(over \texttt{SSH})}} + node[pos=0.5,below,what] {auth. bind} + node[pos=0.96,below,port] {389}; + + \draw[->,route] (SMTP-server) edge[TODO] + node[above,proto] {LDAPI} + node[below,what] {virtual lookups} + (LDAP-consumer) edge + node[above,proto] {ESMTP \textnormal{(over \texttt{SSH})}} + node[pos=0.96,below,port] {25} + (SMTP-server-IMAP); + + \draw[->,route] (SMTP-server-IMAP) edge + node[above,proto] {LDAP} + node[below,what] {virtual lookups} + node[pos=0.92,above,port] {389} + (LDAP-producer) edge + node[below,what] {\texttt{deliver}} + (IMAP-server); + + \draw[->,route] (IMAP-server) edge + node[below,what] {read,write} + (mailboxes); + + \draw[->,route] (LDAP-consumer) edge + node[above,proto] {LDAP \textnormal{(over \texttt{SSH})}} + node[below,what] {\texttt{syncrepl}} + node[pos=0.95,above,port] {389} + (LDAP-producer); + + \draw[->,route,TODO] + (webmail.east) + .. controls +(3.5cm,0) and +(0,-4cm) .. + (MTA.south) + node[pos=0.5,above,proto] {ESMTPS} + node[pos=0.5,below,what] {\texttt{sendmail}} + node[pos=0.98,above,port] {25}; + \end{pgfonlayer} + + + \begin{pgfonlayer}{background} + \draw[->,route,path fading=north] + ($(SMTP-server.west)+(-5cm,2cm)$) + .. controls +(2cm,0) and +(-2cm,0) .. + (SMTP-server.west); + \end{pgfonlayer} + \path[draw=none] + ($(SMTP-server.west)+(-5cm,2cm)$) + .. controls +(2cm,0) and +(-2cm,0) .. + (SMTP-server.west) + node[pos=0.5,above,proto] {ESMTP} + node[pos=0.97,above,port] {25}; + + \begin{pgfonlayer}{background} + \draw[->,route,TODO,path fading=south] + (MTA.east) + .. controls +(2cm,0) and +(0,2cm) .. + ($(MTA.east)+(2cm,-5cm)$); + \end{pgfonlayer} + \path[TODO,draw=none] + (MTA.east) + .. controls +(2cm,0) and +(0,2cm) .. + ($(MTA.east)+(2cm,-5cm)$) + node[pos=0.5,above,proto] {ESMTP}; +\end{tikzpicture} +\vspace*{\fill} + +\end{document} -- cgit v1.2.3