Skip to content

Commit b732bb1

Browse files
FEATURE (security): Add security page
1 parent bff7d1f commit b732bb1

File tree

5 files changed

+316
-20
lines changed

5 files changed

+316
-20
lines changed

app/components/DocsSidebarComponent.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ const navItems: NavItem[] = [
3939
title: "Reset password",
4040
href: "/password",
4141
},
42+
{
43+
title: "How Postgresus is secured?",
44+
href: "/security",
45+
},
4246
{
4347
title: "FAQ",
4448
href: "/faq",

app/page.tsx

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ export default function Index() {
166166
},
167167
{
168168
"@type": "Question",
169-
name: "Does Postgresus reduce database security?",
169+
name: "How does Postgresus ensure security?",
170170
acceptedAnswer: {
171171
"@type": "Answer",
172-
text: "No. All the data executes within containers you control, on servers you own. Credentials and backup files are left on your server or in the cloud account of your choice. Because it's open source, you or your security team, can inspect every line to make sure it meets your organization's needs before it's run.",
172+
text: "Postgresus enforces security on three levels: (1) Sensitive data encryption — all passwords, tokens and credentials are encrypted with AES-256-GCM and stored separately from the database; (2) Backup encryption — each backup file is encrypted with a unique key derived from a master key, backup ID and random salt, making backups useless without your encryption key even if someone gains storage access; (3) Read-only database access — Postgresus only requires SELECT permissions and performs comprehensive checks to ensure no write privileges exist, preventing data corruption even if the tool is compromised. All operations run in containers you control on servers you own, and because it's open source, your security team can audit every line of code before deployment.",
173173
},
174174
},
175175
{
@@ -855,23 +855,27 @@ export default function Index() {
855855
</div>
856856

857857
<div className="h-[320px] max-h-[320px] w-[320px] rounded-2xl bg-white p-8 md:h-[390px] md:max-h-[390px] md:w-[390px]">
858-
<h3 className="mb-3 text-xl font-bold md:text-2xl">
859-
Encryption
860-
</h3>
858+
<h3 className="mb-3 text-xl font-bold md:text-2xl">Security</h3>
861859

862860
<div className="flex h-[120px] max-h-[120px] justify-center pt-7 sm:h-[200px] sm:max-h-[200px]">
863861
<img
864862
className="max-h-[100px] sm:max-h-[130px]"
865863
src="/images/index/feature-encryption.svg"
866-
alt="Backup encryption"
864+
alt="Security features"
867865
loading="lazy"
868866
/>
869867
</div>
870868

871869
<div className="pt-5 text-sm text-gray-600 sm:pt-5 sm:text-base">
872-
Enterprise-grade encryption protects your backups.
873-
Store encrypted files safely in shared cloud storage without
874-
security concerns
870+
Enterprise-grade encryption protects your sensitive
871+
data and backups. Read-only database access prevents data
872+
corruption.{" "}
873+
<a
874+
href="/security"
875+
className="font-semibold text-blue-600 hover:text-blue-700"
876+
>
877+
Read more →
878+
</a>
875879
</div>
876880
</div>
877881
</div>
@@ -1017,19 +1021,21 @@ export default function Index() {
10171021

10181022
<div className="mb-8 w-full pr-10 lg:w-1/2">
10191023
<h3 className="mb-3 max-w-[350px] font-bold md:text-xl">
1020-
6. Does Postgresus reduce database security?
1024+
6. How does Postgresus ensure security?
10211025
</h3>
10221026

10231027
<p className="max-w-[500px] md:text-lg">
1024-
No. All the data executes within containers you control, on
1025-
servers you own. Credentials and backup files are left on your
1026-
server or in the cloud account of your choice. Additionally,
1027-
Postgresus offers enterprise-grade AES-256-GCM encryption for
1028-
your backup files. This means even if someone gains access to
1029-
your storage, encrypted backups remain useless without the
1030-
decryption key. Because it&apos;s open source, you or your
1031-
security team can inspect every line to make sure it meets
1032-
your organization&apos;s needs before it&apos;s run.
1028+
Postgresus enforces security on three levels: (1) Sensitive
1029+
data encryption — all passwords, tokens and credentials are
1030+
encrypted with AES-256-GCM and stored separately from the
1031+
database; (2) Backup encryption — each backup file is
1032+
encrypted with a unique key derived from a master key, backup
1033+
ID and random salt, making backups useless without your
1034+
encryption key even if someone gains storage access; (3)
1035+
Read-only database access — Postgresus only requires SELECT
1036+
permissions and performs comprehensive checks to ensure no
1037+
write privileges exist, preventing data corruption even if the
1038+
tool is compromised.
10331039
</p>
10341040
</div>
10351041

app/security/page.tsx

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
import type { Metadata } from "next";
2+
import DocsNavbarComponent from "../components/DocsNavbarComponent";
3+
import DocsSidebarComponent from "../components/DocsSidebarComponent";
4+
import DocTableOfContentComponent from "../components/DocTableOfContentComponent";
5+
import { CopyButton } from "../components/CopyButton";
6+
7+
export const metadata: Metadata = {
8+
title: "Security - How Postgresus Protects Your Data | Postgresus",
9+
description:
10+
"Learn how Postgresus ensures enterprise-level security with AES-256-GCM encryption for sensitive data and backups, read-only database access, and comprehensive audit logging.",
11+
keywords: [
12+
"Postgresus security",
13+
"PostgreSQL backup security",
14+
"AES-256-GCM encryption",
15+
"database encryption",
16+
"backup encryption",
17+
"read-only database access",
18+
"enterprise security",
19+
"data protection",
20+
"secure backups",
21+
],
22+
openGraph: {
23+
title: "Security - How Postgresus Protects Your Data | Postgresus",
24+
description:
25+
"Learn how Postgresus ensures enterprise-level security with AES-256-GCM encryption for sensitive data and backups, read-only database access, and comprehensive audit logging.",
26+
type: "article",
27+
url: "https://postgresus.com/security",
28+
},
29+
twitter: {
30+
card: "summary",
31+
title: "Security - How Postgresus Protects Your Data | Postgresus",
32+
description:
33+
"Learn how Postgresus ensures enterprise-level security with AES-256-GCM encryption for sensitive data and backups, read-only database access, and comprehensive audit logging.",
34+
},
35+
alternates: {
36+
canonical: "https://postgresus.com/security",
37+
},
38+
robots: "index, follow",
39+
};
40+
41+
export default function SecurityPage() {
42+
const encryptionPipeline = `PostgreSQL pg_dump → Compression → Encryption → Cloud Storage`;
43+
44+
return (
45+
<>
46+
{/* JSON-LD Structured Data */}
47+
<script
48+
type="application/ld+json"
49+
dangerouslySetInnerHTML={{
50+
__html: JSON.stringify({
51+
"@context": "https://schema.org",
52+
"@type": "TechArticle",
53+
headline: "Security - How Postgresus Protects Your Data",
54+
description:
55+
"Learn how Postgresus ensures enterprise-level security with AES-256-GCM encryption for sensitive data and backups, read-only database access, and comprehensive audit logging.",
56+
author: {
57+
"@type": "Organization",
58+
name: "Postgresus",
59+
},
60+
publisher: {
61+
"@type": "Organization",
62+
name: "Postgresus",
63+
logo: {
64+
"@type": "ImageObject",
65+
url: "https://postgresus.com/logo.svg",
66+
},
67+
},
68+
}),
69+
}}
70+
/>
71+
72+
<DocsNavbarComponent />
73+
74+
<div className="flex min-h-screen">
75+
{/* Sidebar */}
76+
<DocsSidebarComponent />
77+
78+
{/* Main Content */}
79+
<main className="flex-1 px-4 py-6 sm:px-6 sm:py-8 lg:px-12">
80+
<div className="mx-auto max-w-4xl">
81+
<article className="prose prose-blue max-w-none">
82+
<h1 id="security">How Postgresus enforces security?</h1>
83+
84+
<p className="text-lg text-gray-700">
85+
Postgresus is responsible for sensitive data:
86+
</p>
87+
88+
<ul>
89+
<li>it accesses your DB;</li>
90+
<li>it backs it up (meaning makes a copy of data);</li>
91+
<li>
92+
it keeps credentials to be able to access your DB on a regular
93+
basis;
94+
</li>
95+
<li>
96+
it saves backups in cloud storages (if you enable it) - so
97+
other people can see them;
98+
</li>
99+
</ul>
100+
101+
<p>
102+
Therefore,{" "}
103+
<strong>
104+
there is a main priority for Postgresus to be enterprise-level
105+
secure and reliable
106+
</strong>
107+
.
108+
</p>
109+
110+
<p>To make sure:</p>
111+
112+
<ul>
113+
<li>sensitive data is never exposed and always encrypted;</li>
114+
<li>
115+
backups are encrypted and useless even if someone sees them in
116+
the cloud storage;
117+
</li>
118+
<li>
119+
Postgresus doesn&apos;t even receive access to DB with write
120+
or update access;
121+
</li>
122+
<li>all actions are logged and can be audited;</li>
123+
</ul>
124+
125+
<p>
126+
All these steps protect your data. As you know, there is no 100%
127+
secure system, but we do our best to make it as secure as
128+
possible. Even in case of hacking, nobody will be able to
129+
corrupt your data.
130+
</p>
131+
132+
<p>Postgresus enforces security on three levels:</p>
133+
134+
<ol>
135+
<li>Sensitive data encryption;</li>
136+
<li>Backups encryption;</li>
137+
<li>Read-only access to DB.</li>
138+
</ol>
139+
140+
<h2 id="level-1-sensitive-data-encryption">
141+
Level 1: sensitive data encryption
142+
</h2>
143+
144+
<p>
145+
Internally, Postgresus uses PostgreSQL DB to store connection
146+
details, configs, settings of notifiers and storages (S3, Google
147+
Drive, Dropbox, etc.).
148+
</p>
149+
150+
<p>Any sensitive data is encrypted. For example:</p>
151+
152+
<ul>
153+
<li>passwords</li>
154+
<li>tokens</li>
155+
<li>webhooks with secrets</li>
156+
</ul>
157+
158+
<p>
159+
So in DB Postgresus keeps only hashes or encoded values. For
160+
encryption is used <strong>AES-256-GCM</strong> algorithm. Also,
161+
despite the encryption, those values are never exposed via API
162+
or UI.
163+
</p>
164+
165+
<p>
166+
The secret key used for encryption is stored on local storage (
167+
<code>./postgresus-data/secret.key</code> by default) and is not
168+
present in the DB itself. So DB compromise doesn&apos;t give
169+
access to sensitive data.
170+
</p>
171+
172+
<h2 id="level-2-backups-encryption">
173+
Level 2: backups encryption
174+
</h2>
175+
176+
<p>
177+
Each backup file is encrypted on the fly during backup creation.
178+
Postgresus uses <strong>AES-256-GCM</strong> encryption
179+
algorithm, which ensures that backup data cannot be read without
180+
the encryption key and any tampering is detected during
181+
decryption.
182+
</p>
183+
184+
<p>Backups flow through this pipeline:</p>
185+
186+
<div className="relative my-6">
187+
<pre className="overflow-x-auto rounded-lg bg-gray-900 p-4 text-sm text-gray-100">
188+
<code>{encryptionPipeline}</code>
189+
</pre>
190+
<div className="absolute right-2 top-2">
191+
<CopyButton text={encryptionPipeline} />
192+
</div>
193+
</div>
194+
195+
<p>
196+
Each backup gets its own unique encryption key derived from:
197+
</p>
198+
199+
<ul>
200+
<li>
201+
Master key (stored in{" "}
202+
<code>./postgresus-data/secret.key</code>)
203+
</li>
204+
<li>Backup ID</li>
205+
<li>Random salt (unique per backup)</li>
206+
</ul>
207+
208+
<p>
209+
<strong>Result</strong>: Even if someone gains access to your
210+
cloud storage (S3, Google Drive, etc.), they cannot read the
211+
backups without your master key.
212+
</p>
213+
214+
<h2 id="level-3-read-only-access">
215+
Level 3: read-only access to DB
216+
</h2>
217+
218+
<p>
219+
Postgresus enforces the principle of least privilege - it only
220+
needs read access to create backups, never write access. This
221+
protects your database from accidental or malicious data
222+
corruption through the backup tool.
223+
</p>
224+
225+
<p>
226+
Before accepting database credentials, Postgresus performs
227+
checks across three levels:
228+
</p>
229+
230+
<ol>
231+
<li>
232+
<strong>Role-level</strong>: Verifies the user is NOT a
233+
superuser and cannot create roles or databases
234+
</li>
235+
<li>
236+
<strong>Database-level</strong>: Ensures no CREATE or TEMP
237+
privileges
238+
</li>
239+
<li>
240+
<strong>Table-level</strong>: Confirms zero write permissions
241+
(INSERT, UPDATE, DELETE, TRUNCATE, etc.)
242+
</li>
243+
</ol>
244+
245+
<p>
246+
The database user must pass all three checks to be considered
247+
read-only. If any write privilege is detected, Postgresus will
248+
warn you.
249+
</p>
250+
251+
<p>
252+
Postgresus suggests creating read-only users for you with proper
253+
permissions:
254+
</p>
255+
256+
<ul>
257+
<li>Grants SELECT on all current and future tables</li>
258+
<li>Grants USAGE on schemas (but not CREATE)</li>
259+
<li>Explicitly revokes all write privileges</li>
260+
</ul>
261+
262+
<p>
263+
<strong>Result</strong>: Even if Postgresus is compromised,
264+
server is hacked, secret key is stolen and credentials are
265+
decrypted, attackers cannot corrupt your database.
266+
</p>
267+
</article>
268+
</div>
269+
</main>
270+
271+
{/* Table of Contents */}
272+
<DocTableOfContentComponent />
273+
</div>
274+
</>
275+
);
276+
}

app/sitemap.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ export default function sitemap(): MetadataRoute.Sitemap {
3131
changeFrequency: "monthly",
3232
priority: 0.8,
3333
},
34+
{
35+
url: `${baseUrl}/security`,
36+
lastModified: currentDate,
37+
changeFrequency: "monthly",
38+
priority: 0.9,
39+
},
3440
{
3541
url: `${baseUrl}/faq`,
3642
lastModified: currentDate,

public/llms.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Content: Workspaces, user roles, audit logs, and global settings for managing ac
3939
URL: /password
4040
Content: How to reset user passwords using command-line tool
4141

42+
### Security
43+
URL: /security
44+
Content: Information about how Postgresus ensures enterprise-level security through three layers: sensitive data encryption with AES-256-GCM, backup encryption with unique keys per backup, and read-only database access enforcement. Explains how credentials are protected, how backups remain encrypted even if cloud storage is compromised, and how the principle of least privilege prevents database corruption.
45+
4246
### FAQ - Frequently Asked Questions
4347
URL: /faq
4448
Content: Frequently asked questions about Postgresus, including how to backup localhost databases, why Postgresus uses directory format with zstd compression instead of raw SQL dumps, and other common questions about installation, configuration, and backup strategies.
@@ -191,5 +195,5 @@ All data executes within containers you control on servers you own. Credentials
191195

192196
## Keywords
193197

194-
PostgreSQL, backup, monitoring, database, scheduled backups, Docker, self-hosted, open source, S3, Google Drive, Slack notifications, Discord, DevOps, database monitoring, pg_dump, database restore, Cloudflare R2, Microsoft Teams, health checks, compression, automation, encryption, AES-256-GCM, backup encryption, enterprise security
198+
PostgreSQL, backup, monitoring, database, scheduled backups, Docker, self-hosted, open source, S3, Google Drive, Slack notifications, Discord, DevOps, database monitoring, pg_dump, database restore, Cloudflare R2, Microsoft Teams, health checks, compression, automation, encryption, AES-256-GCM, backup encryption, enterprise security, read-only database access, data protection, secure backups, sensitive data encryption, security audit, least privilege
195199

0 commit comments

Comments
 (0)