slides01.tex
changeset 6 4c40d4b2d01c
parent 5 1280309e6bfc
child 7 bd2b16f82601
equal deleted inserted replaced
5:1280309e6bfc 6:4c40d4b2d01c
   374 \small Servers from\\[-2mm] 
   374 \small Servers from\\[-2mm] 
   375 \small Dot.com Inc.
   375 \small Dot.com Inc.
   376 \end{tabular}
   376 \end{tabular}
   377 \end{textblock}
   377 \end{textblock}
   378 
   378 
       
   379 \begin{textblock}{1}(5.6,6)
       
   380   \begin{tikzpicture}[scale=2.5]
       
   381   \draw[white] (0,0) node (X) {};
       
   382   \draw[white] (1,0) node (Y) {};
       
   383   \only<1>{\draw[red, <-, line width = 2mm] (X) -- (Y);
       
   384   \node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {};}
       
   385   \only<2>{\draw[red, ->, line width = 2mm] (X) -- (Y);
       
   386   \node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X)!.5!(Y) $) {};}
       
   387   \only<3>{\draw[red, <-, line width = 2mm] (X) -- (Y);
       
   388   \node [inner sep=7pt,label=above:\textcolor{black}{POST data}] at ($ (X)!.5!(Y) $) {};}
       
   389   \end{tikzpicture}
       
   390 \end{textblock}
       
   391 
       
   392 
   379 \begin{textblock}{1}(9,5.5)
   393 \begin{textblock}{1}(9,5.5)
   380 \begin{tabular}{c}
   394 \begin{tabular}{c}
   381 \includegraphics[scale=0.15]{pics/laptop.png}\\[-2mm]
   395 \includegraphics[scale=0.15]{pics/laptop.png}\\[-2mm]
   382 \small Client
   396 \small Client
   383 \end{tabular}
   397 \end{tabular}
   396 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   410 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   397 \mode<presentation>{
   411 \mode<presentation>{
   398 \begin{frame}[c]
   412 \begin{frame}[c]
   399 \frametitle{\begin{tabular}{c}Scala + Play\end{tabular}}
   413 \frametitle{\begin{tabular}{c}Scala + Play\end{tabular}}
   400 
   414 
       
   415 \footnotesize simple response from the server:
       
   416 
   401 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
   417 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
   402 \texttt{\lstinputlisting{app0.scala}}}\bigskip
   418 \texttt{\lstinputlisting{app0.scala}}}\bigskip
   403 
   419 
   404 \footnotesize
   420 \footnotesize
   405 alternative response:\\
   421 alternative response:\\
   406 
   422 
   407 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
   423 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
   408 \texttt{Ok("<H1>Hello world!</H1>").as(HTML)}}
   424 \texttt{\lstinline{Ok("<H1>Hello world!</H1>").as(HTML)}}}
   409 \end{frame}}
   425 \end{frame}}
   410 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   426 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   411 
   427 
   412 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   413 \mode<presentation>{
   429 \mode<presentation>{
   417 \texttt{\lstinputlisting{app1.scala}}}
   433 \texttt{\lstinputlisting{app1.scala}}}
   418 
   434 
   419   
   435   
   420 \end{frame}}
   436 \end{frame}}
   421 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   437 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   438 
       
   439 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   440 \mode<presentation>{
       
   441 \begin{frame}[c]
       
   442 \frametitle{\begin{tabular}{c}Cookies\end{tabular}}
       
   443 
       
   444 
       
   445 \begin{textblock}{1}(1.5,5)
       
   446 \begin{tabular}{c}
       
   447 \includegraphics[scale=0.15]{pics/servers.png}\\[-2mm]
       
   448 \small Servers from\\[-2mm] 
       
   449 \small Dot.com Inc.
       
   450 \end{tabular}
       
   451 \end{textblock}
       
   452 
       
   453 \begin{textblock}{1}(5.6,5.6)
       
   454   \begin{tikzpicture}[scale=2.5]
       
   455   \draw[white] (0,0) node (X) {};
       
   456   \draw[white] (1,0) node (Y) {};
       
   457   \draw[white] (0.05,-0.3) node (X1) {};
       
   458   \draw[white] (0.95,-0.3) node (Y1) {};
       
   459   \only<1-2>{\draw[red, <-, line width = 2mm] (X) -- (Y);
       
   460   \node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {};}
       
   461   \only<2>{\draw[red, <-, line width = 1mm] (X1) -- (Y1);
       
   462   \node [inner sep=2pt,label=below:\textcolor{black}{read a cookie}] at ($ (X1)!.5!(Y1) $) {};}
       
   463   \only<3->{\draw[red, ->, line width = 2mm] (X) -- (Y);
       
   464   \node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X)!.5!(Y) $) {};}
       
   465   \only<3->{\draw[red, ->, line width = 1mm] (X1) -- (Y1);
       
   466   \node [inner sep=2pt,label=below:\textcolor{black}{write a cookie}] at ($ (X1)!.5!(Y1) $) {};}
       
   467   \end{tikzpicture}
       
   468 \end{textblock}
       
   469 
       
   470 
       
   471 \begin{textblock}{1}(9.5,5.5)
       
   472 \begin{tabular}{c}
       
   473 \includegraphics[scale=0.15]{pics/laptop.png}\\[-2mm]
       
   474 \small Client
       
   475 \end{tabular}
       
   476 \end{textblock}
       
   477   
       
   478 \only<4->{  
       
   479 \begin{textblock}{13}(1,11)  
       
   480 \small\begin{itemize}
       
   481 \item cookies: max 4KB data\\[-2mm]
       
   482 \item cookie theft, cross-site scripting attacks\\[-2mm]
       
   483 \item session cookies, persistent cookies, HttpOnly cookies, third-party cookies, zombie cookies 
       
   484 \end{itemize}  
       
   485 \end{textblock}}
       
   486 
       
   487 \only<5>{
       
   488 \begin{textblock}{11}(1,3)
       
   489 \begin{tikzpicture}
       
   490 \draw (0,0) node[inner sep=2mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
       
   491 {\normalsize\color{darkgray}
       
   492 \begin{minipage}{10cm}\raggedright\small
       
   493 {\bf EU Privacy Directive about Cookies:}\smallskip\\
       
   494 ``In May 2011, a European Union law was passed stating that websites that leave non-essential cookies on visitors' devices have to alert the visitor and get acceptance from them. This law applies to both individuals and businesses based in the EU regardless of the nationality of their website's visitors or the location of their web host. It is not enough to simply update a website's terms and conditions or privacy policy. The deadline to comply with the new EU cookie law was 26th May 2012 and failure to do so could mean a fine of up to \pounds{}500,000.''
       
   495 \end{minipage}};
       
   496 \end{tikzpicture}
       
   497 \end{textblock}}
       
   498   
       
   499 \end{frame}}
       
   500 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   501 
       
   502 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   503 \mode<presentation>{
       
   504 \begin{frame}[c]
       
   505 \frametitle{\begin{tabular}{c}My First Webapp\end{tabular}}
       
   506 
       
   507 {\bf GET request:}\smallskip
       
   508 \begin{enumerate}
       
   509 \item read cookie from client
       
   510 \item if none is present, set \texttt{visits} to \textcolor{blue}{$0$}
       
   511 \item if cookie is present, extract \texttt{visits}
       
   512 \item if \texttt{visits} is greater or equal \textcolor{blue}{$10$}, \\
       
   513 print valued customer message\\
       
   514 otherwise just normal message
       
   515 \item increase \texttt{visits} by \textcolor{blue}{$1$} and store new cookie with client
       
   516 \end{enumerate}
       
   517 
       
   518   
       
   519 \end{frame}}
       
   520 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   521 
       
   522 
       
   523 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   524 \mode<presentation>{
       
   525 \begin{frame}[c]
       
   526 \mbox{}\\[-9mm]
       
   527 
       
   528 {\lstset{language=Scala}\fontsize{8}{10}\selectfont
       
   529 \texttt{\lstinputlisting{app2.scala}}}
       
   530 
       
   531   
       
   532 \end{frame}}
       
   533 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   534 
       
   535 
       
   536 
   422 
   537 
   423 % linkedIn password
   538 % linkedIn password
   424 % http://erratasec.blogspot.co.uk/2012/06/confirmed-linkedin-6mil-password-dump.html
   539 % http://erratasec.blogspot.co.uk/2012/06/confirmed-linkedin-6mil-password-dump.html
   425 
   540 
   426 % rainbow tables
   541 % rainbow tables