Skip to content

Conversation

HeroCC
Copy link

@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.
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
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant