Giter Club home page Giter Club logo

Comments (1)

mdesmet avatar mdesmet commented on May 30, 2024

See following thread on dbt slack channel for more info.

  1. When changing the authentication method to oauth as in the PR, the url is printed in the console.

image

If you follow each url, the driver will execute the openid connect flow, of course you need to follow this url's in the order specified in the console. of course his is not a great user experience.

  1. Modified trino-python-client to launch a webbrowser instead of printing the link
def handle_redirect_auth_url(auth_url):
    print("Opening your browser for the external authentication:")
    webbrowser.open_new(auth_url)

This approach has two issues:

  • it will launch a new browser window for each executed query.
  • It seems to not work when multiple queries are launched simultaneously (not investigated in detail)

Some initial conclusions:

Comparing with how this is done in the snowflake pyhon connector, they actually provide a localhost callback url for the authentication flow, so they can capture the access token on the clientside, while in Trino's case the access token is retrieved on the server side and not exposed to the client (implicit flow vs authorization code.

A workaround could call the OIDC endpoint and retrieve a token and use that token (jwt authentication method in dbt-trino), in our case we would have to enable the implicit flow as our custom OIDC provider doesn't provide any means to request a token outside of the standard flows. Also this has to take into account token expiration. Most important i think this pushes complexity down upon the dbt user instead of providing a plug & play experience (which is really what dbt is about).

from dbt-trino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.