Add External Browser Auth#2
Conversation
|
I want to test it but I think it needs a tag for me to specify building the container from this branch. Per ChatGPT:
|
|
Great point! I didn't have a good way to test the image easily other than:
This is also why I haven't put together a Now that you shared that tagging is a solid option to actually test these builds, there is now a CI step that: 1. Builds and pushes the dev container base image to GitHub with the following tags: 2. The base image is usable via the staging or pr tag in any test dbt project's {
"image": "ghcr.io/brooklyn-data/dbt-fusion-devcontainer/dbt-fusion:staging"
}or {
"image": "ghcr.io/brooklyn-data/dbt-fusion-devcontainer/dbt-fusion:pr-<#>"
}3. Post-merge cleanup Let me know if this works for you! |
|
Ok, I was able to build the container with the |
|
Awwhh mannn. It's so weird thought that the automatic external browser auth does work for me (but I'm using Cursor which may handle container-host UX better?). I'll test it out with VS Code! In the meantime, I use a Snowflake PAT to circumvent the need for external browser authentication. Such that my dbt_project:
target: default
outputs:
default:
type: snowflake
account: <sf_account_name>
user: <sf_user_name>
password: <sf_personal_access_token> # Snowflake PAT goes here instead of user password
database: <sf_dev_db>
warehouse: <sf_dev_wh>
schema: <dbt_dev_schema> |
|
Ahh - that worked! I didn't know Snowflake had PATs. So handy. My setup is now totally working 🎉 |

Summary
Adding a config in the
Dockerfileto allow for automatic opening of user's default browser for external authentication.Details
@foundinblank:
Current Behaviour
Terminal output when using
externalbrowser: xinprofiles.yml:Note: Manually clicking the external URL for me works even though it doesn't automatically open.
Approach:
Add
xdg-utilsfor external browser authenticationxdg-utilsis needed to enable automatic browser opening for Snowflake or any other external browser authentication. The package hasxdg-openwhich is the command that is used to launch the authentication URL in your default browser.