Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 464
Implement GSSAPI authentication#1122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
| set -Eexuo pipefail | ||
| if [ "$RUNNER_OS" == "Linux" ]; then | ||
| # Assume Ubuntu since this is the only Linux used in CI. | ||
| sudo apt-get update | ||
| sudo apt-get install -y --no-install-recommends \ | ||
| libkrb5-dev krb5-user krb5-kdc krb5-admin-server | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2007,7 +2007,8 @@ async def connect(dsn=None, *, | ||
| connection_class=Connection, | ||
| record_class=protocol.Record, | ||
| server_settings=None, | ||
| target_session_attrs=None): | ||
| target_session_attrs=None, | ||
| krbsrvname=None): | ||
| r"""A coroutine to establish a connection to a PostgreSQL server. | ||
| The connection parameters may be specified either as a connection | ||
| @@ -2235,6 +2236,10 @@ async def connect(dsn=None, *, | ||
| or the value of the ``PGTARGETSESSIONATTRS`` environment variable, | ||
| or ``"any"`` if neither is specified. | ||
| :param str krbsrvname: | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mention the new parameter in a ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. | ||
| Kerberos service name to use when authenticating with GSSAPI. This | ||
| must match the server configuration. Defaults to 'postgres'. | ||
| :return: A :class:`~asyncpg.connection.Connection` instance. | ||
| Example: | ||
| @@ -2303,6 +2308,9 @@ async def connect(dsn=None, *, | ||
| .. versionchanged:: 0.28.0 | ||
| Added the *target_session_attrs* parameter. | ||
| .. versionchanged:: 0.30.0 | ||
| Added the *krbsrvname* parameter. | ||
| .. _SSLContext: https://docs.python.org/3/library/ssl.html#ssl.SSLContext | ||
| .. _create_default_context: | ||
| https://docs.python.org/3/library/ssl.html#ssl.create_default_context | ||
| @@ -2344,7 +2352,8 @@ async def connect(dsn=None, *, | ||
| statement_cache_size=statement_cache_size, | ||
| max_cached_statement_lifetime=max_cached_statement_lifetime, | ||
| max_cacheable_statement_size=max_cacheable_statement_size, | ||
| target_session_attrs=target_session_attrs | ||
| target_session_attrs=target_session_attrs, | ||
| krbsrvname=krbsrvname, | ||
| ) | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add handling of the
PGKRBSRVNAMEenvironment variable as well to stay compatible with libpq.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.