postgres.git / summary / log / commit / refs
commit 5e41e193f3f401109522eda1dd90d6e2c873bbd7
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Fri Nov 06 20:56:10 2026 +0000
First released in: 18.7, 19.0
doc: Clarify that OAuth bearer tokens are sent in clear text
The bearer token used by OAUTHBEARER authentication is transmitted in
clear text over the network, which makes it vulnerable to sniffing and
similar attacks. This adds a note that SSL connections are recommended
for OAuth authentication.
Backpatch down to v18 where OAuth was introduced.
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAN4CZFNy23wWKF+78QG3cfunjJpQWFc7eNP7qcYPB6Sg-NhTQQ@mail.gmail.com
Backpatch-through: 18
doc/src/sgml/client-auth.sgml | 8 ++++++--
doc/src/sgml/protocol.sgml | 10 ++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml
index 105f1a975dc..9b3490cbbdb 100644
--- a/doc/src/sgml/client-auth.sgml
+++ b/doc/src/sgml/client-auth.sgml
@@ -662,7 +662,9 @@ include_dir <replaceable>directory</replaceable>
<listitem>
<para>
Authorize and optionally authenticate using a third-party OAuth 2.0
- identity provider. See <xref linkend="auth-oauth"/> for details.
+ identity provider. Since the bearer token is sent in clear text over
+ the network, this should not be used on untrusted networks. See
+ <xref linkend="auth-oauth"/> for details.
</para>
</listitem>
</varlistentry>
@@ -2469,7 +2471,9 @@ host ... radius radiusservers="server1,server2" radiussecrets="""secret one"",""
<ulink url="https://datatracker.ietf.org/doc/html/rfc6750">RFC 6750</ulink>,
which are a type of access token used with OAuth 2.0 where the token is an
opaque string. The format of the access token is implementation specific
- and is chosen by each authorization server.
+ and is chosen by each authorization server. The bearer token is sent
+ in clear-text, and is vulnerable to network sniffing. For this reason
+ OAuth should only be used over SSL connections.
</para>
<para>
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 40bf4e6d741..f40d3746ab4 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1975,6 +1975,16 @@ SELCT 1/0;<!-- this typo is intentional -->
server.
</para>
+ <note>
+ <para>
+ The bearer token is sent across the connection, as part of the client
+ initial response, and grants access to the database like a clear-text
+ password. On an unencrypted connection it can be captured by network
+ sniffing. For this reason <literal>OAUTHBEARER</literal> should only be
+ used over SSL connections.
+ </para>
+ </note>
+
<para>
<literal>OAUTHBEARER</literal> does not support channel binding, and there
is no "OAUTHBEARER-PLUS" mechanism. This mechanism does not make use of
[parent: 32973315d26b]