Merge pull request #14 from berq/patch-14
[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 \subsubsection{Oracle}
5 \begin{description}
6 \item[Tested with Version:] not tested
7
8 \item[References:] (German)
9 {\small \url{www.telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si}}
10
11 Please read in the above link the following pages about SSL and ciphersuites:\\
12 p. 129, Req 396 and Req 397 \\
13 \end{description}
14
15 \subsubsection{SQL Server}
16 \todo{write this}
17
18
19
20
21 \subsubsection{MySQL}
22
23 \begin{description}
24 \item[Tested with Version:] Debian 7.0 and MySQL 5.5
25
26 \item[Settings:] \mbox{}
27
28 \paragraph*{my.cnf}\mbox{}\\
29
30 \begin{lstlisting}[breaklines]
31 [mysqld]
32 ssl
33 ssl-ca=/etc/mysql/ssl/ca-cert.pem
34 ssl-cert=/etc/mysql/ssl/client-cert.pem
35 ssl-key=/etc/mysql/ssl/client-key.pem
36 ssl-cipher=EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EDH+CAMELLIA256:EECDH:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!AES128:!CAMELLIA128:!ECDSA:AES256-SHA
37 \end{lstlisting}
38
39 \item[Additional settings:]
40
41
42 \item[Justification for special settings (if needed):]
43
44 % 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
45
46 \item[References:]
47 {\small \url{https://dev.mysql.com/doc/refman/5.5/en/ssl-connections.html}}
48
49
50 \item[How to test:]
51
52 After restarting the server run the following query to see if the ssl settings are correct:
53 \begin{lstlisting}[breaklines]
54 show variables like '%ssl%';
55 \end{lstlisting}
56
57
58 \end{description}
59
60
61 \subsubsection{DB2}
62 \begin{description}
63 \item[Tested with Version:] not tested
64
65 \item[References:]
66 {\small \url{http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.sec.doc%2Fdoc%2Fc0053544.html}}
67
68
69 \paragraph*{ssl_cipherspecs}\mbox{}\\
70 In the link above the whole SSL-configuration is in-depth described. The following command shows only how to set the recommended ciphersuites.
71 \begin{lstlisting}[breaklines]
72 # recommended and supported ciphersuites 
73
74 db2 update dbm cfg using SSL_CIPHERSPECS 
75 TLS_RSA_WITH_AES_256_CBC_SHA256,
76 TLS_RSA_WITH_AES_128_GCM_SHA256,
77 TLS_RSA_WITH_AES_128_CBC_SHA256,
78 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
79 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
80 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
81 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
82 TLS_RSA_WITH_AES_256_GCM_SHA384,
83 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
84 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
85 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
86 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
87 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
88 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
89 TLS_RSA_WITH_AES_256_CBC_SHA,
90 TLS_RSA_WITH_AES_128_CBC_SHA,
91 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
92 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
93
94 \end{lstlisting}
95 \end{description}
96
97 \subsubsection{Postgresql}
98
99 \begin{description}
100 \item[Tested with Version:] Debian 7.0 and PostgreSQL 9.1
101
102 \item[References:]
103
104 It's recommended to read 
105
106 {\small \url{http://www.postgresql.org/docs/X.X/interactive/runtime-config-connection.html\#RUNTIME-CONFIG-CONNECTION-SECURITY}}
107 (please change X.X with your preferred version e.g. 9.1).
108
109 \item[Settings:] \mbox{}
110
111
112 To start in SSL mode the server.crt and server.key must exist in the server's data directory \$PGDATA. 
113
114 Starting with version 9.2, you have the possibility to set the path.
115
116 \begin{lstlisting}[breaklines]
117 ssl_key_file = '/your/path/server.key'
118 ssl_cert_file = '/your/path/server.crt'
119 ssl_ca_file = '/your/path/root.crt'
120 \end{lstlisting}
121
122 \paragraph*{postgresql.conf}\mbox{}\\
123
124 \begin{lstlisting}[breaklines]
125 #>=8.3
126 ssl = on 
127 ssl_ciphers = 'EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EDH+CAMELLIA256:EECDH:EDH+aRSA:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED:!AES128:!CAMELLIA128:!ECDSA:AES256-SHA'
128 \end{lstlisting}
129
130
131
132 \item[How to test:]
133 To test your ssl settings, run psql with the sslmode parameter:
134 \begin{lstlisting}[breaklines]
135 psql "sslmode=require host=postgres-server dbname=database" your-username
136 \end{lstlisting}
137
138 \end{description}
139