Revert paragraphDiamond
[ach-master.git] / src / practical_settings / DBs.tex
1 %%\subsection{Database Systems}
2 % This list is based on : http://en.wikipedia.org/wiki/Relational_database_management_system#Market_share
3
4 %% ---------------------------------------------------------------------- 
5 \subsection{Oracle}
6 \subsubsection{Tested with Versions}
7 \todo{not tested yet}
8
9
10 \subsubsection{References}
11 \begin{itemize*}
12   \item Technical safety requirements by \emph{Deutsche Telekom AG} (German). Please read section 17.12 or pages 129 and following (Req 396 and Req 397) about SSL and ciphersuites \url{http://www.telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si}
13 \end{itemize*}
14
15
16
17 %% ---------------------------------------------------------------------- 
18 %%\subsection{SQL Server}
19 %%\todo{write this}
20
21
22
23 %% ---------------------------------------------------------------------- 
24 \subsection{MySQL}
25
26
27 \subsubsection{Tested with Versions}
28 \begin{itemize*}
29   \item Debian Wheezy and MySQL 5.5
30 \end{itemize*}
31
32
33 \subsubsection{Settings}
34 \paragraph*{my.cnf}
35 \begin{lstlisting}
36 [mysqld]
37 ssl
38 ssl-ca=/etc/mysql/ssl/ca-cert.pem
39 ssl-cert=/etc/mysql/ssl/server-cert.pem
40 ssl-key=/etc/mysql/ssl/server-key.pem
41 ssl-cipher=%*\cipherStringB*)
42 \end{lstlisting}
43
44
45 %\subsubsection{Additional settings}
46
47
48 %\subsubsection{Justification for special settings (if needed)}
49 % in case you have the need for further justifications why you chose this and that setting or if the settings do not fit into the standard Variant A or Variant B schema, please document this here
50
51
52 \subsubsection{References}
53 \begin{itemize*}
54   \item MySQL Documentation on SSl Connections: \url{https://dev.mysql.com/doc/refman/5.5/en/ssl-connections.html}
55 \end{itemize*}
56
57
58 \subsubsection{How to test}
59 After restarting the server run the following query to see if the ssl settings are correct:
60 \begin{lstlisting}
61 show variables like '%ssl%';
62 \end{lstlisting}
63
64
65 %% ---------------------------------------------------------------------- 
66 \subsection{DB2}
67 \subsubsection{Tested with Version}
68 \todo{not tested}
69
70
71 \subsubsection{Settings}
72 \paragraph{ssl\_cipherspecs:}
73 In the link above the whole SSL-configuration is described in-depth. The following command shows only how to set the recommended ciphersuites.
74 \begin{lstlisting}
75 # recommended and supported ciphersuites 
76
77 db2 update dbm cfg using SSL_CIPHERSPECS 
78 TLS_RSA_WITH_AES_256_CBC_SHA256,
79 TLS_RSA_WITH_AES_128_GCM_SHA256,
80 TLS_RSA_WITH_AES_128_CBC_SHA256,
81 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
82 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
83 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
84 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
85 TLS_RSA_WITH_AES_256_GCM_SHA384,
86 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
87 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
88 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
89 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
90 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
91 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
92 TLS_RSA_WITH_AES_256_CBC_SHA,
93 TLS_RSA_WITH_AES_128_CBC_SHA,
94 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
95 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
96 \end{lstlisting}
97
98
99 \subsubsection{References}
100 \begin{itemize*}
101   \item IMB Db2 Documentation on \emph{Supported cipher suites} \url{http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=\%2Fcom.ibm.db2.luw.admin.sec.doc\%2Fdoc\%2Fc0053544.html}
102 \end{itemize*}
103
104 %% ---------------------------------------------------------------------- 
105
106 \subsection{PostgreSQL}
107 \subsubsection{Tested with Versions}
108 \begin{itemize*}
109   \item Debian Wheezy and PostgreSQL 9.1
110   \item Linux Mint 14 nadia / Ubuntu 12.10 quantal with PostgreSQL 9.1+136 and OpenSSL 1.0.1c
111 \end{itemize*}
112
113
114 \subsubsection{Settings}
115 To start in SSL mode the server.crt and server.key must exist in the server's data directory \$PGDATA.
116
117 Starting with version 9.2, you have the possibility to set the path manually.
118
119 \begin{lstlisting}
120 ssl_key_file = '/your/path/server.key'
121 ssl_cert_file = '/your/path/server.crt'
122 ssl_ca_file = '/your/path/root.crt'
123 \end{lstlisting}
124
125 \paragraph*{postgresql.conf}
126 \begin{lstlisting}
127 #>=8.3
128 ssl = on 
129 ssl_ciphers = '%*\cipherStringB*)'
130 \end{lstlisting}
131
132
133 \subsubsection{References}
134 \begin{itemize*}
135   \item It's recommended to read \url{http://www.postgresql.org/docs/9.1/interactive/runtime-config-connection.html\#RUNTIME-CONFIG-CONNECTION-SECURITY} (please edit the version with your preferred one).
136   \item PostgreSQL Documentation on \emph{Secure TCP/IP Connections with SSL}: \url{http://www.postgresql.org/docs/9.1/static/ssl-tcp.html}
137   \item PostgreSQL Documentation on \emph{host-based authentication}: \url{http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html}
138 \end{itemize*}
139
140
141 \subsubsection{How to test}
142 To test your ssl settings, run psql with the sslmode parameter:
143 \begin{lstlisting}
144 psql "sslmode=require host=postgres-server dbname=database" your-username
145 \end{lstlisting}
146