Fixing cache pollution in the Kerberos test suite

From: Jacob Champion <pchampion(at)vmware(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Fixing cache pollution in the Kerberos test suite
Date: 2021-01-25 18:33:18
Message-ID: 1fcb175bafef6560f47a8c31229fa7c938486b8d.camel@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I was running tests with a GSS-enabled stack, and ran into some very
long psql timeouts after running the Kerberos test suite. It turns out
the suite pushes test credentials into the user's global cache, and
these no-longer-useful credentials persist after the suite has
finished. (You can see this in action by running the test/kerberos
suite and then running `klist`.) This leads to long hangs, I assume
while the GSS implementation tries to contact a KDC that no longer
exists.
Attached is a patch that initializes a local credentials cache inside
tmp_check/krb5cc, and tells psql to use it via the KRB5CCNAME envvar.
This prevents the global cache pollution. WDYT?

--Jacob

Attachment Content-Type Size
test-kerberos-use-a-local-credentials-cache.patch text/x-patch 2.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2021-01-25 18:36:46 Re: Fixing cache pollution in the Kerberos test suite
Previous Message Tom Lane 2021-01-25 18:05:35 Re: The mysterious pg_proc.protrftypes