バージョンごとのドキュメント一覧

20.15. OAuth Authorization/Authentication #

OAuth 2.0 is an industry-standard framework, defined in <ulink url="https://datatracker.ietf.org/doc/html/rfc6749">RFC 6749</ulink>, to enable third-party applications to obtain limited access to a protected resource. OAuth client support has to be enabled when <productname>PostgreSQL</productname> is built, see <xref linkend="installation"/> for more information. 《機械翻訳》OAuth 2.0は、RFC 6749で定義されている業界標準のフレームワークであり、サードパーティのアプリケーションが保護されたリソースへの限定されたアクセスを取得できるようにする。 OAuthクライアントサポートは、PostgreSQLが構築されている場合、詳細については第17章を参照有効にする必要がある。

This documentation uses the following terminology when discussing the OAuth ecosystem: 《機械翻訳》この文書では、OAuthエコシステムについて議論する際に次の用語を使用している。

Resource Owner (or End User)

The user or system who owns protected resources and can grant access to them. This documentation also uses the term <emphasis>end user</emphasis> when the resource owner is a person. When you use <application>psql</application> to connect to the database using OAuth, you are the resource owner/end user. 《機械翻訳》保護されたリソースを所有し、アクセスを与えることができるユーザまたはシステム。 この文書は、リソース所有者が個人の場合にもエンドユーザという用語を使用します。 psqlを使用して、OAuthを使用してデータベースに接続する場合、ユーザはリソース所有者/エンドユーザになります。

Client

The system which accesses the protected resources using access tokens. Applications using libpq, such as <application>psql</application>, are the OAuth clients when connecting to a <productname>PostgreSQL</productname> cluster. 《機械翻訳》システムトークンを使用して保護されたリソースにアクセスするアクセス。 psql,などのlibpqを使用するアプリケーションは、PostgreSQLクラスタに接続するときのOAuthクライアントです。

Resource Server

The system hosting the protected resources which are accessed by the client. The <productname>PostgreSQL</productname> cluster being connected to is the resource server. 《機械翻訳》システムホスティングは、クライアントによってアクセスされる保護されたリソースです。 PostgreSQL接続先のクラスタはリソースサーバです。

Provider

The organization, product vendor, or other entity which develops and/or administers the OAuth authorization servers and clients for a given application. Different providers typically choose different implementation details for their OAuth systems; a client of one provider is not generally guaranteed to have access to the servers of another. 《機械翻訳》特定のベンダのOAuth認証サーバおよびクライアントを開発および/または管理する組織、製品エンティティ、またはその他のアプリケーション。 通常、プロバイダが異なれば、OAuthシステムに対して選択する実装の詳細も異なる。 あるプロバイダのクライアントが別のプロバイダのサーバに対してアクセスを持つことは、一般的に保証されていない。

This use of the term "provider" is not standard, but it seems to be in wide use colloquially. (It should not be confused with OpenID's similar term "Identity Provider". While the implementation of OAuth in <productname>PostgreSQL</productname> is intended to be interoperable and compatible with OpenID Connect/OIDC, it is not itself an OIDC client and does not require its use.) 《機械翻訳》この「プロバイダ」という用語の使用は標準的ではありませんが、口語的に広く使用されているようです。 (OpenIDの類似用語である「IDプロバイダ」と混同しないでください。 OAuthの実装はPostgreSQLOpenID Connect/OIDCとの相互運用と互換性を意図していますが、自分自身はOIDCクライアントではないため、使用する必要はありません。)

Authorization Server

The system which receives requests from, and issues access tokens to, the client after the authenticated resource owner has given approval. <productname>PostgreSQL</productname> does not provide an authorization server; it is the responsibility of the OAuth provider. 《機械翻訳》認証されたリソースシステムが承認した後に、アクセスから要求を受信し、クライアントに所有者トークンを発行するサーバ。 PostgreSQLは認可CAを提供しません。 これはOAuthプロバイダの責任です。

Issuer

An identifier for an authorization server, printed as an <literal>https://</literal> URL, which provides a trusted "namespace" for OAuth clients and applications. The issuer identifier allows a single authorization server to talk to the clients of mutually untrusting entities, as long as they maintain separate issuers. 《機械翻訳》OAuthクライアントおよびアプリケーションに識別子の「ネームスペース」を提供するhttps:// URLとして印刷される、認証サーバのためのトラステッド。 発行者識別子は、単一の認証サーバが、それらが別々の発行者を維持する限り、相互に信頼できないエンティティのクライアントと話すことを可能にする。

注記

For small deployments, there may not be a meaningful distinction between the "provider", "authorization server", and "issuer". However, for more complicated setups, there may be a one-to-many (or many-to-many) relationship: a provider may rent out multiple issuer identifiers to separate tenants, then provide multiple authorization servers, possibly with different supported feature sets, to interact with their clients. 《機械翻訳》小規模な展開では、「プロバイダ」、「許可サーバ」、および「発行者」の間に意味のある区別がない場合があります。 ただし、より複雑な設定では、1対多(または多対多)のリレーションが存在する場合があります。 プロバイダは、マルチプルの発行者識別子を別々のテナントに貸し出し、クライアントと対話するために、場合によってはサポートされるマルチプルセットが異なる機能許可サーバを提供します。

<productname>PostgreSQL</productname> supports bearer tokens, defined in <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. 《機械翻訳》PostgreSQLRFC 6750で定義されているベアラトークンをサポートします。 これは、OAuth 2.0で使用されるアクセストークンのタイプです。 トークンは不透明文字列です。 アクセストークンのフォーマットは実装固有であり、各認可サーバによって選択されます。

The following configuration options are supported for OAuth: 《マッチ度[86.666667]》次の設定オプションはPAMのためにサポートされています。 《機械翻訳》OAuthでは、次の設定オプションがサポートされています。

issuer

An HTTPS URL which is either the exact <link linkend="auth-oauth-issuer">issuer identifier</link> of the authorization server, as defined by its discovery document, or a well-known URI that points directly to that discovery document. This parameter is required. 《機械翻訳》ディスカバリー識別子によって定義された許可サーバの正確な発行者ドキュメントであるか、またはそのディスカバリードキュメントを直接指す既知のURIであるHTTPS URL。 このパラメータは必須です。

When an OAuth client connects to the server, a URL for the discovery document will be constructed using the issuer identifier. By default, this URL uses the conventions of OpenID Connect Discovery: the path <literal>/.well-known/openid-configuration</literal> will be appended to the end of the issuer identifier. Alternatively, if the <literal>issuer</literal> contains a <literal>/.well-known/</literal> path segment, that URL will be provided to the client as-is. 《機械翻訳》OAuthクライアントがサーバに接続する際に、その発行者のドキュメントを用いてディスカバリ識別子のURLを構築します。 デフォルトでは、このURLはOpenID Connect Discoveryの規約であるパス/.well-known/OpenID-configuration発行者の識別子の末尾に付加されます。 あるいは、issuer包含a /.well-known/パスセグメントの場合、そのURLがそのままクライアントに提供されます。

警告

The OAuth client in libpq requires the server's issuer setting to exactly match the issuer identifier which is provided in the discovery document, which must in turn match the client's <xref linkend="libpq-connect-oauth-issuer"/> setting. No variations in case or formatting are permitted. 《機械翻訳》libpqのOAuthクライアントは、発見サーバで提供された発行者識別子を正確にマッチするために、ドキュメントの発行者設定を必要とし、発見クライアントはのoauth_issuer設定をマッチする必要があります。 ケースやフォーマットの変更は許可されません。

scope

A space-separated list of the OAuth scopes needed for the server to both authorize the client and authenticate the user. Appropriate values are determined by the authorization server and the OAuth validation module used (see <xref linkend="oauth-validators" /> for more information on validators). This parameter is required. 《機械翻訳》スペースがリストの認可とサーバの認証の両方を行うために必要な、クライアントで区切られたOAuthスコープのユーザ。 適切な値は、認可サーバと使用されるOAuthバリデーションモジュールによって決定されます(バリデータの詳細は第50章を参照)。 このパラメータは必須です。

validator

The library to use for validating bearer tokens. If given, the name must exactly match one of the libraries listed in <xref linkend="guc-oauth-validator-libraries" />. This parameter is optional unless <literal>oauth_validator_libraries</literal> contains more than one library, in which case it is required. 《機械翻訳》bearerトークンの検証に使用するライブラリ。 指定する場合、名前はoauth_validator_librariesにリストされているライブラリの1つを正確にマッチする必要があります。 このパラメータは、必要とされる包含が複数のライブラリである場合を除き、オプショナルです。 oauth_validator_librariesケース

map

Allows for mapping between OAuth identity provider and database user names. See <xref linkend="auth-username-maps"/> for details. If a map is not specified, the user name associated with the token (as determined by the OAuth validator) must exactly match the role name being requested. This parameter is optional. 《機械翻訳》OAuthアイデンティティ・プロバイダとマッピング名の間のデータベースユーザを許可します。 詳細は、20.2を参照してください。 マップが指定されていない場合、(OAuthユーザによって決定される)トークンに関連付けられた名前は、要求されているロール名前を正確にマッチする必要があります。 このパラメータはオプショナルです。 バリデータ

delegate_ident_mapping

An advanced option which is not intended for common use. 《機械翻訳》一般的な使用を目的としない高度なオプション。

When set to <literal>1</literal>, standard user mapping with <filename>pg_ident.conf</filename> is skipped, and the OAuth validator takes full responsibility for mapping end user identities to database roles. If the validator authorizes the token, the server trusts that the user is allowed to connect under the requested role, and the connection is allowed to proceed regardless of the authentication status of the user. 《機械翻訳》1 pg_ident.confはスキップされたである標準ユーザマッピングに設定すると、OAuthバリデータはデータベースロールに対するマッピングエンドユーザIDに対して完全な責任を負います。 バリデータがトークンを認可すると、サーバはユーザが要求されたロールの下で接続できることを信頼し、ユーザの認証ステータスに関係なくコネクションを続行できます。

This parameter is incompatible with <literal>map</literal>. 《機械翻訳》このパラメータはmapと互換性がありません。

警告

<literal>delegate_ident_mapping</literal> provides additional flexibility in the design of the authentication system, but it also requires careful implementation of the OAuth validator, which must determine whether the provided token carries sufficient end-user privileges in addition to the <link linkend="oauth-validators">standard checks</link> required of all validators. Use with caution. 《機械翻訳》delegate_ident_mapping認証システムのデザインに追加の柔軟性を提供しますが、OAuthバリデータの慎重な実装も必要であり、提供されたトークンが、すべてのバリデータに必要な標準チェックに加えて、十分なエンドユーザ権限を持っているかどうかを判断する必要がある。 注意して使用してください。