From: Kouber Saparev <kouber@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Protected custom configuration option
Date: Wed, 25 Jul 2018 14:41:47 +0300
Message-ID: <CAN4RuQtYoZPceeD78PrDdfVDCgU2yKi9kny01obcEStMFZPtYQ@mail.gmail.com> (raw)
Hello,
I am looking for a way to define custom configuration option that will
only be accessible to roles with the "pg_read_all_settings" privilege.
I see such variables defined with the GUC_SUPERUSER_ONLY flag within
src/backend/utils/misc/guc.c:
{"ssl_ecdh_curve", PGC_SIGHUP, CONN_AUTH_SSL,
gettext_noop("Sets the curve to use for ECDH."),
NULL,
GUC_SUPERUSER_ONLY
},
&SSLECDHCurve,
Is it possible to have a custom setting defined with this flag and
how? Only through an extension written in C, maybe?
What I need is something like:
kouber=> show redis.pass;
ERROR: must be superuser or a member of pg_read_all_settings to
examine "redis.pass"
Cheers,
--
Kouber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: kouber@gmail.com
Subject: Re: Protected custom configuration option
In-Reply-To: <CAN4RuQtYoZPceeD78PrDdfVDCgU2yKi9kny01obcEStMFZPtYQ@mail.gmail.com>
References: <CAN4RuQtYoZPceeD78PrDdfVDCgU2yKi9kny01obcEStMFZPtYQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox