Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guf3E-0004TS-Vw for pgsql-general@arkaria.postgresql.org; Fri, 15 Feb 2019 15:05:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1guf3D-0005RI-Az for pgsql-general@arkaria.postgresql.org; Fri, 15 Feb 2019 15:05:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guf3C-0005RB-Tw for pgsql-general@lists.postgresql.org; Fri, 15 Feb 2019 15:05:15 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guf36-0005kn-9A for pgsql-general@lists.postgresql.org; Fri, 15 Feb 2019 15:05:14 +0000 Received: by mail-qt1-x843.google.com with SMTP id w4so11224239qtc.1 for ; Fri, 15 Feb 2019 07:05:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brunol-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=EunmMpgoA4Xy/6Swl/8GDKqCQbdrYh6vCBd61pYPtug=; b=CqTknAmoD04WloXho8WME2S7YWHizlqR6wD+eBRWYOMFmdKSG/dOnQZ9qgv5ER+mS/ Tb4e2Jq9dd4lq2QlXOAm0QJH/32Vt+PLh2m1TYibFZcI9ZWfgiWnHI82kQ2BQyv5g+SU fYkEhJoajQnSw3SP/4BuUJLjKsb5o9IEpogZmCJCk5erISkXTZ6ShWWd4ageLc93DyeS 3e3LJZ8k3W2+BlEpMjYYQeXo+elZcsAQZjEF/OI7GaV2iwbwsbC9iqwYrNcjFyA0VATW vcRIIoitGUp239AFNlNb//YkJRcYz1oLRxUzRzJqCMa1u9INA70atfxphYjsdduB2Gvl 92Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=EunmMpgoA4Xy/6Swl/8GDKqCQbdrYh6vCBd61pYPtug=; b=RbojwWS/DVhjRZSlsJPxXD+3pyd4Ni8D56mAxJ/PIg9v2p90z3ACVaa1S6hpdvaYWm v+fIJzXiM4S6BjHdpEpvHP6EhkMLqwFHbPOyYfkw6VAoOooO4cGFzLQ/X/iemAO6IGTV oQ3PDFByok04vHdj24x0nEpLYq6a/gASk6R1KvW9CiyaWNQiUGiOEvPihGzsUZCqUBDU PwjaEDfxSw0myxNwCj6t7LPKI8L9hK2ZMqiaMieuvrKv21uX9mYTmM2llychjXbFhugN olW5AaeOKHUag2GSMy48sAqE4GMyGlWB+RVrB9rVlM/ARK+J5qzNYRJ0fZh6+Ia5OLSN RFmg== X-Gm-Message-State: AHQUAuah0ZHXQUjSLIvGr2oyVusyqr6fPrsrK0P2Ayu0uVy678EMbjRn seS06tqWy54UUvpqSGuMzouneRv+ud797A== X-Google-Smtp-Source: AHgI3IbeU4pSp1K+iWaBeMmZzUuEmcSsUDPLhgatQ+LDTHkNTB8oAIz2gIHJvi9jwG/XPi8Jtos3uQ== X-Received: by 2002:ac8:1101:: with SMTP id c1mr7791532qtj.174.1550243105188; Fri, 15 Feb 2019 07:05:05 -0800 (PST) Received: from axiom.brunol.com ([132.203.211.12]) by smtp.gmail.com with ESMTPSA id n2sm3689428qtc.13.2019.02.15.07.05.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 07:05:04 -0800 (PST) Subject: Re: Shared hosting with FDW on AWS RDS To: Bruce Momjian , Paul Jungwirth Cc: pgsql-general@lists.postgresql.org References: <4776368.YtMxgcCULL@localhost.localdomain> <20190215032115.GA14824@momjian.us> From: Bruno Lavoie Message-ID: <5bbe09a3-5061-b550-06be-a1c9f9a2e929@brunol.com> Date: Fri, 15 Feb 2019 10:05:03 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190215032115.GA14824@momjian.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-02-14 10:21 p.m., Bruce Momjian wrote: > On Sun, Feb 10, 2019 at 03:19:48PM -0800, Paul Jungwirth wrote: >> On 2/10/19 2:57 PM, auxsvr wrote: >>> We'd like to configure an RDS server for shared hosting. The idea is that every customer will be using a different database and FDW will be configured, so that the remote tables have access to the full data >> I've set up something like this before (but on EC2), and the only problem I >> couldn't solve was that any user can see your full customer list by typing >> `\l` or `\du`. They can't see other customers' stuff, but they can see how >> many customers you have and their database/login names. The only way around >> it I know is that run separate "clusters" aka RDS instances. >> >> You can try to lock this down somewhat by revoking access to various system >> tables, but it starts breaking a lot of tools (e.g. some GUI tools don't >> know what to do if they get an error just listing the databases). Also it is >> so piecemeal I wouldn't trust that I'd blocked off all avenues of getting >> the information. >> >> I'd love to be corrected on this btw if anyone has better information! :-) > Heroku had that issue and used hash values for the user and database > names. Yes, we have the same problem here... We want to consolidate users and databases and we can do it easily with PostgreSQL, while that's not easily the case with some other RDBMS. Even if we can mask real clients name by using hashes, it is still sort of an information leakage that our security team is concerned about, and that is a burden to manage from our clients. It would be nice to have PG to not list things you don't have rights to. I think that MySQL "show databases" list only stuff you have access to. Would modifying pg_catalog views make it possible? Thanks Bruno