Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
170b66a0
Commit
170b66a0
authored
Nov 20, 2008
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue a proper error message when MD5 is attempted when
db_user_namespace is enabled. Also document this limitation.
parent
176961c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
4 deletions
+30
-4
doc/src/sgml/client-auth.sgml
doc/src/sgml/client-auth.sgml
+3
-1
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+12
-1
src/backend/libpq/auth.c
src/backend/libpq/auth.c
+5
-1
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+10
-1
No files found.
doc/src/sgml/client-auth.sgml
View file @
170b66a0
<!-- $PostgreSQL: pgsql/doc/src/sgml/client-auth.sgml,v 1.11
2 2008/11/20 11:48:26 mha
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/client-auth.sgml,v 1.11
3 2008/11/20 20:45:29 momjian
Exp $ -->
<chapter id="client-authentication">
<chapter id="client-authentication">
<title>Client Authentication</title>
<title>Client Authentication</title>
...
@@ -712,6 +712,8 @@ omicron bryanh guest1
...
@@ -712,6 +712,8 @@ omicron bryanh guest1
If you are at all concerned about password
If you are at all concerned about password
<quote>sniffing</> attacks then <literal>md5</> is preferred.
<quote>sniffing</> attacks then <literal>md5</> is preferred.
Plain <literal>password</> should always be avoided if possible.
Plain <literal>password</> should always be avoided if possible.
<literal>md5</> cannot be used with <xref
linkend="guc-db-user-namespace">.
</para>
</para>
<para>
<para>
...
...
doc/src/sgml/config.sgml
View file @
170b66a0
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.19
5 2008/11/11 02:42:31 tgl
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.19
6 2008/11/20 20:45:29 momjian
Exp $ -->
<chapter Id="runtime-config">
<chapter Id="runtime-config">
<title>Server Configuration</title>
<title>Server Configuration</title>
...
@@ -706,6 +706,17 @@ SET ENABLE_SEQSCAN TO OFF;
...
@@ -706,6 +706,17 @@ SET ENABLE_SEQSCAN TO OFF;
before the user name is looked up by the server.
before the user name is looked up by the server.
</para>
</para>
<para>
<varname>db_user_namespace</> causes the client's and
server's user name representation to differ.
Authentication checks are always done with the server's user name
so authentication methods must be configured for the
server's user name, not the client's. Because
<literal>md5</> uses the user name as salt on both the
client and server, <literal>md5</> cannot be used with
<varname>db_user_namespace</>.
</para>
<note>
<note>
<para>
<para>
This feature is intended as a temporary measure until a
This feature is intended as a temporary measure until a
...
...
src/backend/libpq/auth.c
View file @
170b66a0
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.17
3 2008/11/20 11:48:26 mha
Exp $
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.17
4 2008/11/20 20:45:30 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -413,6 +413,10 @@ ClientAuthentication(Port *port)
...
@@ -413,6 +413,10 @@ ClientAuthentication(Port *port)
break
;
break
;
case
uaMD5
:
case
uaMD5
:
if
(
Db_user_namespace
)
ereport
(
FATAL
,
(
errcode
(
ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION
),
errmsg
(
"MD5 authentication is not supported when
\"
db_user_namespace
\"
is enabled"
)));
sendAuthRequest
(
port
,
AUTH_REQ_MD5
);
sendAuthRequest
(
port
,
AUTH_REQ_MD5
);
status
=
recv_and_check_password_packet
(
port
);
status
=
recv_and_check_password_packet
(
port
);
break
;
break
;
...
...
src/backend/libpq/hba.c
View file @
170b66a0
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.17
4 2008/11/20 11:48:26 mha
Exp $
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.17
5 2008/11/20 20:45:30 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -846,7 +846,16 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
...
@@ -846,7 +846,16 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
else
if
(
strcmp
(
token
,
"reject"
)
==
0
)
else
if
(
strcmp
(
token
,
"reject"
)
==
0
)
parsedline
->
auth_method
=
uaReject
;
parsedline
->
auth_method
=
uaReject
;
else
if
(
strcmp
(
token
,
"md5"
)
==
0
)
else
if
(
strcmp
(
token
,
"md5"
)
==
0
)
{
if
(
Db_user_namespace
)
{
ereport
(
LOG
,
(
errcode
(
ERRCODE_CONFIG_FILE_ERROR
),
errmsg
(
"MD5 authentication is not supported when
\"
db_user_namespace
\"
is enabled"
)));
return
false
;
}
parsedline
->
auth_method
=
uaMD5
;
parsedline
->
auth_method
=
uaMD5
;
}
else
if
(
strcmp
(
token
,
"pam"
)
==
0
)
else
if
(
strcmp
(
token
,
"pam"
)
==
0
)
#ifdef USE_PAM
#ifdef USE_PAM
parsedline
->
auth_method
=
uaPAM
;
parsedline
->
auth_method
=
uaPAM
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment