Skip to content

Conversation

@HeroCC
Copy link
Contributor

@HeroCC HeroCC commented Sep 16, 2025

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Addresses SNOW-2341451: externalbrowser support for headless environments #2537 and partially SNOW-862000: Support for External Authentication while running from EMR using spark-magic #1637. It's not the optimal solution IMO (as it still requires a port-forward / network access), but is minimally invasive.

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

An interactive console isn't always available, and we can't open a browser from inside docker. However, if the SNOWFLAKE_AUTH_FORCE_SERVER is set, we'll ignore browser-open failures, and listen for the token anyways.

I tested it on a Airflow docker instance running on my laptop and was able to execute queries. Used the following env vars:

SF_AUTH_SOCKET_PORT: '9067' # so we know which port to forward from host to container
SNOWFLAKE_AUTH_FORCE_SERVER: 'true' # to force the server to listen, even without a browser
SF_AUTH_SOCKET_ADDR: '0.0.0.0' # to allow connections from outside the container

The console isn't always available, and accepting both simultaneously is proving difficult.
@github-actions
Copy link

github-actions bot commented Sep 16, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@HeroCC
Copy link
Contributor Author

HeroCC commented Sep 16, 2025

I have read the CLA Document and I hereby sign the CLA (on behalf of my role at Datadog)

@HeroCC
Copy link
Contributor Author

HeroCC commented Sep 16, 2025

I have read the CLA Document and I hereby sign the CLA

@HeroCC HeroCC marked this pull request as ready for review September 16, 2025 12:58
@HeroCC HeroCC requested a review from a team as a code owner September 16, 2025 12:58
@sfc-gh-pczajka
Copy link
Collaborator

Thanks for the contribution! Looks good, I pushed description and linter fixes.

I'm running tests in #2577 (fork branches do not have permissions for gh secrets), I'll merge the PR if everything goes well

@sfc-gh-pczajka sfc-gh-pczajka added the DO_NOT_PORT_CHANGES_TO_SP Add this label when changes in this PR do not need to be port to SP connector label Oct 17, 2025
@sfc-gh-pczajka sfc-gh-pczajka enabled auto-merge (squash) October 17, 2025 12:00
@sfc-gh-pczajka sfc-gh-pczajka merged commit 54906d6 into snowflakedb:main Oct 17, 2025
43 of 105 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

DO_NOT_PORT_CHANGES_TO_SP Add this label when changes in this PR do not need to be port to SP connector

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants