spectacles icon indicating copy to clipboard operation
spectacles copied to clipboard

Github Actions SQL Validator with OAuth connections

Open emcfarlane opened this issue 3 years ago • 3 comments

Running under github action: spectacles sql --project project --branch cli --incremental

Using BigQuery, connection is setup by looker using a service account. When running get the following error prefix with:

OAuth log in required.

The lookml and content work as intended. Permissions are set up via env vars. What's causing the issue?

emcfarlane avatar May 16 '22 16:05 emcfarlane

Hi @emcfarlane. Thanks for creating the ticket.

It looks like Looker is expecting the user to have authenticated with OAuth instead of a service account.

Could you please sudo as the user you created and see if you're able to run queries as that user in the Looker UI?

DylanBaker avatar May 17 '22 08:05 DylanBaker

Found the issue on our side, we are in the process of moving tables to have an OAuth connection. Is there a way for spectacles to use the service account and looker to default to OAuth?

emcfarlane avatar May 17 '22 09:05 emcfarlane

I'm not sure there is a way to dynamically split which users use which method.

I think what most people have done in this setup is to sudo as the Spectacles user to authenticate via OAuth. This would allow that user to use the permissions of the user who went through that process.

Would that work for your setup?

DylanBaker avatar May 17 '22 12:05 DylanBaker