<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Datomic Knowledgebase - Recent questions tagged h2</title>
<link>https://ask.datomic.com/index.php/tag/h2</link>
<description>Powered by Question2Answer</description>
<item>
<title>Possibly security issue with the dev H2 storage?</title>
<link>https://ask.datomic.com/index.php/1003/possibly-security-issue-with-the-dev-h2-storage</link>
<description>&lt;p&gt;While trying to understand more about the behaviour of Datomic dev (mainly from a security/encryption point of view), I attempted to connect to datomic.mv.db from an instance of the H2 console. I accidentally tried to log in as &quot;admin&quot; with a blank password and was surprised when I connected successfully. Connecting as &quot;admin&quot; with any password fails, so it seems explicitly to be blank. As far as I can tell I only have public  schema access and can't see any transacted data, but I am able to run SQL queries in the console.&lt;/p&gt;
&lt;p&gt;Clearly a dev transactor isn't intended to be high security, but admin with a blank password seems risky even for a dev environment. In most SQL environments I work with, the sa/admin account is just disabled if not used. Am I missing something?&lt;/p&gt;
&lt;p&gt;As an aside, does the dev transactor use H2's AES encryption or is the resulting data file unencrypted?&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1003/possibly-security-issue-with-the-dev-h2-storage</guid>
<pubDate>Wed, 13 Mar 2024 21:58:26 +0000</pubDate>
</item>
<item>
<title>Advice on CVEs of h2 version 1.3.171</title>
<link>https://ask.datomic.com/index.php/713/advice-on-cves-of-h2-version-1-3-171</link>
<description>&lt;p&gt;Using &lt;code&gt;com.datomic/datomic-pro&lt;/code&gt; version &quot;1.0.6362&quot; brings in a transitive dependency on &lt;code&gt;com.h2database/h2&lt;/code&gt; version &quot;1.3.171&quot;  (on-prem).&lt;/p&gt;
&lt;p&gt;The latter suffers from various CVEs:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-23463&quot;&gt;CVE-2021-23463&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-42392&quot;&gt;CVE-2021-42392&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-23221&quot;&gt;CVE-2022-23221&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;(c.f. &lt;a rel=&quot;nofollow&quot; href=&quot;https://mvnrepository.com/artifact/com.h2database/h2/1.3.171&quot;&gt;mvnrepository.com/artifact/com.h2database/h2/1.3.171&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is a Datomic upgrade planned to resolve this?&lt;/li&gt;
&lt;li&gt;If not and in the meantime, can you give any advice on how to deal with this? In particular:&lt;/li&gt;
&lt;li&gt;Can you give detailed advice on whether these vulnerabilities actually do or do not constitute a security risk?&lt;br&gt;
3.1 Some of the CVEs mention h2 console as part of an attack vector, and I have heard this would not apply to Datomic. However, I have not found official information on this. Moreover, if I understood correctly, there are other attack vectors. Please advise.&lt;br&gt;
3.2 The first linked CVE is a SQLXML XXE. It seems like this would not apply as long as &lt;code&gt;getSQLXML&lt;/code&gt; is not called, but this is just my impression and I do not know about usage in Datomic. Please advise.&lt;/li&gt;
&lt;li&gt;Do you have any advice on overriding the h2 dependency with an h2 version not suffering from these CVEs, say version &quot;2.1.210&quot;? As this a major upgrade, I expect problems. In particular, I expect migrating existing h2 databases to be problematic.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thank you very much for your assistance.&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/713/advice-on-cves-of-h2-version-1-3-171</guid>
<pubDate>Tue, 05 Apr 2022 16:21:32 +0000</pubDate>
</item>
<item>
<title>Remove com.h2database/h2 from classpath</title>
<link>https://ask.datomic.com/index.php/701/remove-com-h2database-h2-from-classpath</link>
<description>&lt;p&gt;When running Datomic on the Postgres storage, we wanted to exclude H2 from the Peer classpath, but this turns out not to be possible.&lt;/p&gt;
&lt;p&gt;With the following deps.edn&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps      {com.datomic/datomic-pro   {:mvn/version &quot;1.0.6362&quot;
                                        :exclusions  [com.h2database/h2]}
             org.postgresql/postgresql {:mvn/version &quot;42.3.1&quot;}}
 :mvn/repos {&quot;my.datomic.com&quot; {:url &quot;https://my.datomic.com/repo&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;trying to create the database leads to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/create-database &quot;datomic:sql://test?jdbc:postgresql://localhost:5432/datomic?user=datomic&quot;)
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:387).
org.h2.tools.Server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is there another way to accomplish this? &lt;/p&gt;
&lt;p&gt;The reason we want to exclude h2 from the classpath is because the maven artifact for h2 has several HIGH CVEs reported on it (&lt;a rel=&quot;nofollow&quot; href=&quot;https://mvnrepository.com/artifact/com.h2database/h2/1.3.172&quot;&gt;https://mvnrepository.com/artifact/com.h2database/h2/1.3.172&lt;/a&gt;). I understand that Datomic does not run the H2 console and is also does not involve SQLXML, so it is probably not vulnerable to the specific CVEs, however, it would be an easy way to remove a dev-only dependency in a production deployment.&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/701/remove-com-h2database-h2-from-classpath</guid>
<pubDate>Tue, 01 Feb 2022 15:36:23 +0000</pubDate>
</item>
</channel>
</rss>