Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-996175: Support for RFC1123 compliant Snowflake tenancy FQDN #1839

Open
Seethaar opened this issue Dec 21, 2023 · 5 comments
Open

SNOW-996175: Support for RFC1123 compliant Snowflake tenancy FQDN #1839

Seethaar opened this issue Dec 21, 2023 · 5 comments
Assignees
Labels
enhancement The issue is a request for improvement or a new feature triaged

Comments

@Seethaar
Copy link

What is the current behavior?

The FQDN to access Snowflake public endpoint seem to derived from the Snowflake account name and when the account name contains underscores _, that gets carried forward to the FQDN. This violates RFC1123 apparently. While Snowflake support says, _ is interchangeable with -, this is being not supported by Snowflake connector. Hence we are forced to stay with the non-compliant URLs which are incompatible with the Next Generation Firewalls, which invalidates such URLs, which opens security gaps.

What is the desired behavior?

Snowflake connector should accomodate FQDNs with - some how.

How would this improve snowflake-connector-python?

Having an RFC compliance improves Customer Experience.

References and other background

https://www.digicert.com/kb/ssl-support/underscores-not-allowed-in-fqdns.htm

What is your Snowflake account identifier, if any?

quantium_dg_cip_dev, quantium_dg_cip_prd

@github-actions github-actions bot changed the title Support for RFC1123 compliant Snowflake tenancy FQDN SNOW-996175: Support for RFC1123 compliant Snowflake tenancy FQDN Dec 21, 2023
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Jan 10, 2024
@sfc-gh-dszmolka
Copy link
Contributor

hi and thank you for raising this issue, taking a look (also the support case your colleague raised)

@sfc-gh-dszmolka
Copy link
Contributor

as mentioned in the support case: could not reproduce the issue with snowflake-connector-python==3.6.0

import snowflake.connector
import logging
import os
 
for logger_name in ['snowflake','botocore']:
  logger = logging.getLogger(logger_name)
  logger.setLevel(logging.DEBUG)
  ch = logging.FileHandler('python_connector.log')
  ch.setLevel(logging.DEBUG)
  ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s'))
  logger.addHandler(ch)
 
for myaccount in ['d_sz_m_o_l_k_a', 'd-sz-m-o-l-k-a']:
    print(f'Trying account notation {myaccount}')
    con = snowflake.connector.connect(
        user='admin',
        account='myorgname-' + myaccount,
        password='password'
    )
 
    print(con.cursor().execute("select current_user()").fetchall())
    con.close()

results in

# python test.py 
Trying account notation d_sz_m_o_l_k_a
[('ADMIN',)]
Trying account notation d-sz-m-o-l-k-a
[('ADMIN',)]

can you please try it with this version of the driver and see if it reproduces for you? if it does, would it be please possible to provide a runnable piece of code which when run, leads to the issue you're seeing; hyphens - not supported in the Connector?

@sfc-gh-dszmolka sfc-gh-dszmolka added triaged need more information Need more information to continue triage/fix/implementation and removed investigating feature labels Jan 16, 2024
@sfc-gh-dszmolka
Copy link
Contributor

closing this issue as there's no activity for a while now - if this is still an issue, do let us know please and we can reopen if it needs further investigation

@sfc-gh-dszmolka sfc-gh-dszmolka closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
@Fleid
Copy link

Fleid commented May 31, 2024

Hey @sfc-gh-dszmolka, it's Florian from dbt Labs :)

We are seeing issues popping up on that with dbt-snowflake and Python 3.11.

Users and customers with _ in their Snowflake account name encounter an error due to a change in Python 3.11 SSL. Apparently it no longer supports URLs with underscores.

If indeed _ and - are interchangeable for your account names, it would be lovely if the connector would just replace them outright?

@sfc-gh-dszmolka sfc-gh-dszmolka added enhancement The issue is a request for improvement or a new feature and removed need more information Need more information to continue triage/fix/implementation labels Jun 1, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka removed their assignment Jun 1, 2024
@sfc-gh-dszmolka
Copy link
Contributor

thanks for the feedback! reopening the issue for the driver team to consider this enhancement request for future plans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is a request for improvement or a new feature triaged
Projects
None yet
Development

No branches or pull requests

4 participants