Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jnTsd-0006wW-9Y for pgsql-general@arkaria.postgresql.org; Mon, 22 Jun 2020 21:21:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jnTsb-0001se-UQ for pgsql-general@arkaria.postgresql.org; Mon, 22 Jun 2020 21:21:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jnTsb-0001sX-KN for pgsql-general@lists.postgresql.org; Mon, 22 Jun 2020 21:21:25 +0000 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jnTsX-0003Wp-Gg for pgsql-general@lists.postgresql.org; Mon, 22 Jun 2020 21:21:24 +0000 Received: by mail-oi1-x231.google.com with SMTP id s21so16955231oic.9 for ; Mon, 22 Jun 2020 14:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=qhTbgjhwNDWL9uE51u7YnAUI5kA/lyj721auXjf8ISw=; b=L9rNKBlbe9skYFqEAV1OCTynLrKfPlko16npR8WiSsZ0stBiIBdnwfEbOImT4PLNlw 8rJjNaqLtpCTYUEPh8t6ZnA/tbPpbtyaIuAcgMNGpoMM5y6dWQnhsHwvNoEE/OvoPblK i2Y15FDBwe36wr/plk4U3eO1tB9k8OmUAFJMvvrlT5pSYhBdIhqGTG7w+Ud57LBlSJ2g mMzrbBPldeOSI1DtoFw0oRzQS6ZOK2AqVduJnMtQfxm0ws4KWPeGYcjyDw52mckNPp96 FQCTPGK0IlkOLz4+bcovpmK2+MeUKeEgw6Ev32CUmJ6dy/r0VSh2ipAQcBPkwLRPlofO 1J7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=qhTbgjhwNDWL9uE51u7YnAUI5kA/lyj721auXjf8ISw=; b=hzaFfGvMiRq2vTsZkxpQQOlURlzCZoop2HGZcVm7u6SQbOmB3F9Z+g0jjYOeh0Te9J ZqkyELpu0NNktg+kqWBbJoTkposK8bYxgkibrDZGdJZNkQ6cVY5IKd817OciToX4vK9h JRshkjeV81XRUKlMV6lIShP3/xdF4iQ5UByA1FPXsJZHC1LYpl8wP0XJspHUeu40/JcW KizjnfW5uBlDrXmyf2rOSeviAuILSPn8fa0zXYrc/zWbbqWkYw5eBrQQZcbf795t3LxN TS4HmQk/rawm5rO812w2m2xDjOo/M316oFOOIPoiaXnKz/2Ye5dt81mGG3QD0uBzSax1 pE/w== X-Gm-Message-State: AOAM531amD85lj2cG65OlsloJw5tbEOiuwGXhaFikMJAqGlOyF+J5na8 +H64T+t5brbXHBH46QjWjGolukkeAHSImw== X-Google-Smtp-Source: ABdhPJz0FONAZaDhTkFpWxKXZP6XwM43pVNucISwj6meo6BAQphMdki6kjh8VVrknG95tyhhWKJkwA== X-Received: by 2002:aca:cf4c:: with SMTP id f73mr13544961oig.165.1592860880527; Mon, 22 Jun 2020 14:21:20 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id f24sm3563160oto.55.2020.06.22.14.21.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 14:21:19 -0700 (PDT) Subject: Re: Can the current session be notified and refreshed with a new credentials context? To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <1fc4b6d1-e81f-2f8e-b958-18c13ac144e2@gmail.com> Date: Mon, 22 Jun 2020 16:21:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------6F948ECB291B01225D741A7D" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------6F948ECB291B01225D741A7D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 6/22/20 4:07 PM, AC Gomez wrote: > Suppose you have the following scenario: > > 1: Call some function with a certain user and password > 2: From inside that function, have several calls using DBLink > 3: At some point during the running of that function a password rotation(a > separate process) comes along and updates the session user password and > the User Mappings with this new rotated password > 4: Now there is a discrepancy between the password used when the session > started and the password in the User Mappings > 5: The result is that on the next DBLink call the main function will fail > because the session is still running with the old password but we have > changed the User Mappings. > > We have proven this by separating out every DBLINK call as its own new > session and running password rotation in between dblink calls. Then things > will work. > > My question: Is there a way to update or refresh the session with the new > password that was rotated so that the main function keeps running > seamlessly through all it's DBLink calls? > > If something like this is not available, then password rotation can _only > run_ when nothing else is running. I've not seen such a thing on *any* system. -- Angular momentum makes the world go 'round. --------------6F948ECB291B01225D741A7D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 6/22/20 4:07 PM, AC Gomez wrote:
Suppose you have the following scenario:

1: Call some function with a certain user and password
2: From inside that function, have several calls using DBLink
3: At some point during the running of that function a password rotation(a separate process) comes along and updates the session user password and the User Mappings with this new rotated password
4: Now there is a discrepancy between the password used when the session started and the password in the User Mappings
5: The result is that on the next DBLink call the main function will fail because the session is still running with the old password but we have changed the User Mappings.

We have proven this by separating out every DBLINK call as its own new session and running password rotation in between dblink calls. Then things will work.

My question: Is there a way to update or refresh the session with the new password that was rotated so that the main function keeps running seamlessly through all it's DBLink calls?

If something like this is not available, then password rotation can only run when nothing else is running.

I've not seen such a thing on any system.


--
Angular momentum makes the world go 'round.
--------------6F948ECB291B01225D741A7D--