Debian Codegraph @

src/docsrc/html/security.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <!--
3 Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
4 and the EPL 1.0 (https://h2database.com/html/license.html).
5 Initial Developer: H2 Group
6 -->
7 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
8 <head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
9 <meta name="viewport" content="width=device-width, initial-scale=1" />
10 <title>
11 Features
12 </title>
13 <link rel="stylesheet" type="text/css" href="stylesheet.css" />
14 <!-- [search] { -->
15 <script type="text/javascript" src="navigation.js"></script>
16 </head><body onload="frameMe();">
17 <table class="content"><tr class="content"><td class="content"><div class="contentDiv">
18 <!-- } -->
19
20 <h1>Securing your H2</h1>
21
22 <a href="#introduction">
23 Introduction</a><br />
24 <a href="#network">
25 Network exposed</a><br />
26 <a href="#alias">
27 Alias / Stored Procedures</a><br />
28 <a href="#roles">
29 Grants / Roles / Permissions</a><br />
30 <a href="#encrypted_storage">
31 Encrypted storage</a><br />
32
33 <h2 id="introduction">Introduction</h2>
34 <p>
35 H2 is __not__ designed to be run in an adversarial environment. You should absolutely not expose your H2 server to untrusted connections.
36 </p>
37 <p>
38 Running H2 in embedded mode is the best choice - it is not externally exposed.
39 </p>
40
41 <h2 id="network">Network exposed</h2>
42 <p>
43 When running an H2 server in TCP mode, first prize is to run with it only listening to connections on localhost (i.e 127.0.0.1).
44 </p>
45 <p>
46 Second prize is running listening to restricted ports on a secured network.
47 </p>
48 <p>
49 If you expose H2 to the broader Internet, you can secure the connection with SSL, but this is a rather tricky thing to get right, between JVM bugs, certificates and choosing a decent cipher.
50 </p>
51
52 <h2 id="alias">Alias / Stored procedures</h2>
53 <p>
54 Anything created with <code>CREATE ALIAS</code> can do anything the JVM can do, which includes reading/writing from the filesystem on the machine the JVM is running on.
55 </p>
56
57 <h2 id="roles">Grants / Roles / Permissions</h2>
58 <p>
59 <code>GRANT / REVOKE</code> TODO
60 </p>
61
62 <h2 id="encrypted_storage">Encrypted storage</h2>
63 <p>
64 Encrypting your on-disk database will provide a small measure of security to your stored data.
65 You should not assume that this is any kind of real security against a determined opponent however,
66 since there are many repeated data structures that will allow someone with resources and time to extract the secret key.
67 </p>
68 <p>
69 Also the secret key is visible to anything that can read the memory of the process.
70 </p>
71
72 <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
73