|
| 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'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'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 | +} |
0 commit comments