Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
auth-ident.html52 linesDownload Raw Back to html
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>21.8. Ident Authentication</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="sspi-auth.html" title="21.7. SSPI Authentication" /><link rel="next" href="auth-peer.html" title="21.9. Peer Authentication" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">21.8. Ident Authentication</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="sspi-auth.html" title="21.7. SSPI Authentication">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="client-authentication.html" title="Chapter 21. Client Authentication">Up</a></td><th width="60%" align="center">Chapter 21. Client Authentication</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="auth-peer.html" title="21.9. Peer Authentication">Next</a></td></tr></table><hr /></div><div class="sect1" id="AUTH-IDENT"><div class="titlepage"><div><div><h2 class="title" style="clear: both">21.8. Ident Authentication <a href="#AUTH-IDENT" class="id_link">#</a></h2></div></div></div><a id="id-1.6.8.15.2" class="indexterm"></a><p>3    The ident authentication method works by obtaining the client's4    operating system user name from an ident server and using it as5    the allowed database user name (with an optional user name mapping).6    This is only supported on TCP/IP connections.7   </p><div class="note"><h3 class="title">Note</h3><p>8     When ident is specified for a local (non-TCP/IP) connection,9     peer authentication (see <a class="xref" href="auth-peer.html" title="21.9. Peer Authentication">Section 21.9</a>) will be10     used instead.11    </p></div><p>12    The following configuration options are supported for <code class="literal">ident</code>:13    </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">map</code></span></dt><dd><p>14        Allows for mapping between system and database user names. See15        <a class="xref" href="auth-username-maps.html" title="21.2. User Name Maps">Section 21.2</a> for details.16       </p></dd></dl></div><p>17   </p><p>18    The <span class="quote">“<span class="quote">Identification Protocol</span>”</span> is described in19    <a class="ulink" href="https://datatracker.ietf.org/doc/html/rfc1413" target="_top">RFC 1413</a>.20    Virtually every Unix-like21    operating system ships with an ident server that listens on TCP22    port 113 by default. The basic functionality of an ident server23    is to answer questions like <span class="quote">“<span class="quote">What user initiated the24    connection that goes out of your port <em class="replaceable"><code>X</code></em>25    and connects to my port <em class="replaceable"><code>Y</code></em>?</span>”</span>.26    Since <span class="productname">PostgreSQL</span> knows both <em class="replaceable"><code>X</code></em> and27    <em class="replaceable"><code>Y</code></em> when a physical connection is established, it28    can interrogate the ident server on the host of the connecting29    client and can theoretically determine the operating system user30    for any given connection.31   </p><p>32    The drawback of this procedure is that it depends on the integrity33    of the client: if the client machine is untrusted or compromised,34    an attacker could run just about any program on port 113 and35    return any user name they choose. This authentication method is36    therefore only appropriate for closed networks where each client37    machine is under tight control and where the database and system38    administrators operate in close contact. In other words, you must39    trust the machine running the ident server.40    Heed the warning:41    </p><div class="blockquote"><table border="0" class="blockquote" style="width: 100%; cellspacing: 0; cellpadding: 0;" summary="Block quote"><tr><td width="10%" valign="top"> </td><td width="80%" valign="top"><p>42      The Identification Protocol is not intended as an authorization43      or access control protocol.44     </p></td><td width="10%" valign="top"> </td></tr><tr><td width="10%" valign="top"> </td><td colspan="2" align="right" valign="top">--<span class="attribution">RFC 1413</span></td></tr></table></div><p>45   </p><p>46    Some ident servers have a nonstandard option that causes the returned47    user name to be encrypted, using a key that only the originating48    machine's administrator knows.  This option <span class="emphasis"><em>must not</em></span> be49    used when using the ident server with <span class="productname">PostgreSQL</span>,50    since <span class="productname">PostgreSQL</span> does not have any way to decrypt the51    returned string to determine the actual user name.52   </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sspi-auth.html" title="21.7. SSPI Authentication">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="client-authentication.html" title="Chapter 21. Client Authentication">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="auth-peer.html" title="21.9. Peer Authentication">Next</a></td></tr><tr><td width="40%" align="left" valign="top">21.7. SSPI Authentication </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 21.9. Peer Authentication</td></tr></table></div></body></html>
codekingpro/portable-devtools · Team Ai