Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p88Dy-0007GE-HJ for pgsql-general@arkaria.postgresql.org; Wed, 21 Dec 2022 23:10:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p88Dw-0007on-72 for pgsql-general@arkaria.postgresql.org; Wed, 21 Dec 2022 23:10:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p88Dv-0007od-N1 for pgsql-general@lists.postgresql.org; Wed, 21 Dec 2022 23:10:07 +0000 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p88Dr-0004By-ES for pgsql-general@lists.postgresql.org; Wed, 21 Dec 2022 23:10:06 +0000 Received: by mail-qv1-xf36.google.com with SMTP id mn15so154474qvb.13 for ; Wed, 21 Dec 2022 15:10:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=QE6omIU/oIii2xMUzyE0KTN/RlX9k3T9gT4cMpNiIDI=; b=dw/ifSkARuzRdSdk1PY9OzgcgxLE9f54VleFl263JCOPp4VFe7XxngLxlWWQGgjZqT HKv9ZFRjZJFjPCea5D2imE3GAmXkGLGpp/6j5eJzlTcwlWH2PYOFxTrWgLUWI6JbaX9m 5FWjzIXTyG68cP0AqXY5rugEvpcnTxn39a5aX+MKL2CjMZ/h6oEHx3uxFjVHdo8mrv0g kCrrh3NsfyBrPR/3E+ZALhPRr/si624mIDrovsm7+uBkQlEQIb3iDW+rL4uqL7Rxui8z 9u5nzgI6fZ8t8xesa5deJUPvAIVs0dKWcI7YW5CowBNQYbdfZOu6ZUC4GqR/o5QWOiUc 9lGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=QE6omIU/oIii2xMUzyE0KTN/RlX9k3T9gT4cMpNiIDI=; b=yxMTu8Ad0k027MZrdoJgbF3xYw2PO7P86rEwOU0e8BSRAXewMdxvbPfBHT/+4kLi7H YF/bp5Ym26XaJ1XGUOMRGlM/QQ8rjPoBbkt/q/R54uXh2IzigOzKEM1v6wKe6UUGk6Tz r/HjaeXAKcQ1OUgI90NeZ/5PzdSnSVcOsYhRJhX299CDDKNpcfcuu/dOgg35+s2kETUA RAsGiGnG+G6R4H075MP/SmL2OmhHQF60c+yrLoBgnocckSqwke0y2QwnhVFkDQtjaI/s QAvRP026S0NEX+stqzPrisRpXtMiFshSXpizlOmweWutpdAWmwVI8y6aF1ZgU+oeRgGp KCSQ== X-Gm-Message-State: AFqh2krxouGHuIgwbDznAXEbC53AvFqfXJ+amS5afbrMmIRFROKtcY6m FHNhxvtThds4lVoshxDrO2WRh92XMxZqCw== X-Google-Smtp-Source: AMrXdXtFuBvPjXll172yQUUz/C0+DEIvb9R37lKW7tSZCH+3Pqm+lX4h2G0A99Y76aJQT0oIPDArZg== X-Received: by 2002:a05:6214:719:b0:4bb:a62e:c1bc with SMTP id c25-20020a056214071900b004bba62ec1bcmr21600670qvz.25.1671664201863; Wed, 21 Dec 2022 15:10:01 -0800 (PST) Received: from [192.168.1.66] (108-250-206-84.lightspeed.nworla.sbcglobal.net. [108.250.206.84]) by smtp.googlemail.com with ESMTPSA id bs35-20020a05620a472300b007049f19c736sm3679938qkb.7.2022.12.21.15.10.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Dec 2022 15:10:01 -0800 (PST) Content-Type: multipart/alternative; boundary="------------Vv0QwR0DECsZhHqu4cRFHhSO" Message-ID: <2b9e2d41-9eb8-7ab9-0cb7-816b9eb1cef1@gmail.com> Date: Wed, 21 Dec 2022 17:10:00 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Regd. the Implementation of Wallet (in Oracle) config equivalent in postgreSQL whilst the database migration Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <285552b7273f57396398e5f7c538c7c4be60dce7.camel@cybertec.at> <69C40063-CF22-44FE-958A-74845CFBB039@ultra-secure.de> From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------Vv0QwR0DECsZhHqu4cRFHhSO Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit If a hacker gets in with root access, they can copy /your/ (and my) Postgresql database files (or, more easily, the backup files) off site, restore them, and then have access to your database.  Not so much TDE-encrypted databases, since the backups are encrypted too and you need the key to decrypt them, As for the Bad Things which happen if you lose the keys... well, *don't lose the keys!!* On 12/21/22 16:25, Benedict Holland wrote: > What would you be missing? You can encrypt databases. You can encrypt the > s3 buckets using kms. You can govern access via ssh Auth. When you do > backups, you can encrypt the tar.gz files or whatever format and store it > on s3. Same with the wal files. The fact that oracle charges for this is a > joke. Of course, you would need to ensure compliance with your opsec teams > and stuck with best security practices but it seems top to bottom > encryption is unrelated or tangentially related to the databases. > > Also, if you lose the encryption keys for your backups then bad things > happen. I doubt what I did was production viable but I limited database > access to a handful of users, encrypted the disks, left the Wal files > unencrypted but mounted with read access for a single user, compressed > full backups with encryption and a password, generated sah keys for anyone > who needed service accounts to access the systems, enforced database > ownership permissions, and and gave server access to a tiny team with 2fa. > The way 8 figured it, if someone somehow rooted the box we were screwed > anyway. > > For an internal database, this seemed sufficient. For an external > database, I would highly recommend paid consulting security firms or hire > people who know to build an externally facing platform. > > Thanks > Ben > > On Wed, Dec 21, 2022, 4:39 PM Rainer Duffner wrote: > > > >> Am 21.12.2022 um 22:34 schrieb Laurenz Albe : >> >> There is no exact equivalent, but there is something similar and much >> better: you can >> authenticate the client with SSL client certificates: >> https://www.postgresql.org/docs/current/auth-cert.html > > > Isn’t the wallet the part where the encryption keys are stored? > > Indeed, one of the few remaining features that only Oracle (and of > course other commercial RDMSs) has seems to be full HSM support for TDE. > > > Rainer > -- Angular momentum makes the world go 'round. --------------Vv0QwR0DECsZhHqu4cRFHhSO Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit If a hacker gets in with root access, they can copy your (and my) Postgresql database files (or, more easily, the backup files) off site, restore them, and then have access to your database.  Not so much TDE-encrypted databases, since the backups are encrypted too and you need the key to decrypt them,

As for the Bad Things which happen if you lose the keys... well, don't lose the keys!!

On 12/21/22 16:25, Benedict Holland wrote:
What would you be missing? You can encrypt databases. You can encrypt the s3 buckets using kms. You can govern access via ssh Auth. When you do backups, you can encrypt the tar.gz files or whatever format and store it on s3. Same with the wal files. The fact that oracle charges for this is a joke. Of course, you would need to ensure compliance with your opsec teams and stuck with best security practices but it seems top to bottom encryption is unrelated or tangentially related to the databases.

Also, if you lose the encryption keys for your backups then bad things happen. I doubt what I did was production viable but I limited database access to a handful of users, encrypted the disks, left the Wal files unencrypted but mounted with read access for a single user, compressed full backups with encryption and a password, generated sah keys for anyone who needed service accounts to access the systems, enforced database ownership permissions, and and gave server access to a tiny team with 2fa. The way 8 figured it, if someone somehow rooted the box we were screwed anyway.

For an internal database, this seemed sufficient. For an external database, I would highly recommend paid consulting security firms or hire people who know to build an externally facing platform.

Thanks
Ben

On Wed, Dec 21, 2022, 4:39 PM Rainer Duffner <rainer@ultra-secure.de> wrote:


Am 21.12.2022 um 22:34 schrieb Laurenz Albe <laurenz.albe@cybertec.at>:

There is no exact equivalent, but there is something similar and much better: you can
authenticate the client with SSL client certificates:
https://www.postgresql.org/docs/current/auth-cert.html


Isn’t the wallet the part where the encryption keys are stored?

Indeed, one of the few remaining features that only Oracle (and of course other commercial RDMSs) has seems to be full HSM support for TDE.


Rainer

--
Angular momentum makes the world go 'round.
--------------Vv0QwR0DECsZhHqu4cRFHhSO--