You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Sourabh Bajaj <so...@neeva.co> on 2019/08/21 17:03:08 UTC

Using IAM auth token for sql_alchemy

Hi,

I'm trying to use IAM created auth tokens for connecting to the airflow
database. One question I had was: How often does sql_alchemy_conn_cmd get
called? so want to figure out the lifetime of a connection.

Best,
Sourabh

Re: Using IAM auth token for sql_alchemy

Posted by Sourabh Bajaj <so...@neeva.co>.
Thanks for the clarification. I guess my only solution for now is to create a user/password.

It would be nice to be able to change this since we can avoid creating any passwords for the database.

On 2019/08/22 13:15:27, Ash Berlin-Taylor <as...@apache.org> wrote: 
> To clarify this:
> 
> The sql_alchemy_conn_cmd would be called every time that we ask for the sql_alchemy_conn config setting, but we do that just once at process start up.
> 
> -ash
> 
> > On 22 Aug 2019, at 12:25, Ash Berlin-Taylor <as...@apache.org> wrote:
> > 
> > The sql_alchemy_conn_cmd will only get called once at process (scheduler, webserver) start up, so that wouldn't work for IAM creds, sadly.
> > 
> > To support this probably needs some deeper changes in Airflow - but I don't have an immediate idea what they might need to be. It would be nice though
> > 
> > -ash
> > 
> >> On 21 Aug 2019, at 18:03, Sourabh Bajaj <so...@neeva.co> wrote:
> >> 
> >> Hi,
> >> 
> >> I'm trying to use IAM created auth tokens for connecting to the airflow
> >> database. One question I had was: How often does sql_alchemy_conn_cmd get
> >> called? so want to figure out the lifetime of a connection.
> >> 
> >> Best,
> >> Sourabh
> > 
> 
> 

Re: Using IAM auth token for sql_alchemy

Posted by Ash Berlin-Taylor <as...@apache.org>.
To clarify this:

The sql_alchemy_conn_cmd would be called every time that we ask for the sql_alchemy_conn config setting, but we do that just once at process start up.

-ash

> On 22 Aug 2019, at 12:25, Ash Berlin-Taylor <as...@apache.org> wrote:
> 
> The sql_alchemy_conn_cmd will only get called once at process (scheduler, webserver) start up, so that wouldn't work for IAM creds, sadly.
> 
> To support this probably needs some deeper changes in Airflow - but I don't have an immediate idea what they might need to be. It would be nice though
> 
> -ash
> 
>> On 21 Aug 2019, at 18:03, Sourabh Bajaj <so...@neeva.co> wrote:
>> 
>> Hi,
>> 
>> I'm trying to use IAM created auth tokens for connecting to the airflow
>> database. One question I had was: How often does sql_alchemy_conn_cmd get
>> called? so want to figure out the lifetime of a connection.
>> 
>> Best,
>> Sourabh
> 


Re: Using IAM auth token for sql_alchemy

Posted by Ash Berlin-Taylor <as...@apache.org>.
The sql_alchemy_conn_cmd will only get called once at process (scheduler, webserver) start up, so that wouldn't work for IAM creds, sadly.

To support this probably needs some deeper changes in Airflow - but I don't have an immediate idea what they might need to be. It would be nice though

-ash

> On 21 Aug 2019, at 18:03, Sourabh Bajaj <so...@neeva.co> wrote:
> 
> Hi,
> 
> I'm trying to use IAM created auth tokens for connecting to the airflow
> database. One question I had was: How often does sql_alchemy_conn_cmd get
> called? so want to figure out the lifetime of a connection.
> 
> Best,
> Sourabh