Kategorien:

Systemfunktionen (Systeminformationen)

SYSTEM$ALLOWLIST

Returns host names and port numbers to add to your firewall’s allowed list so that you can access Snowflake from behind your firewall. The output of this function can then be passed into SnowCD.

Typically, Snowflake customers use a firewall to prevent unauthorized access. By default, your firewall might block access to Snowflake. To update your firewall’s allowed list, you need to know the host names and port numbers for the URL for your Snowflake account, stages, and other hosts used by Snowflake.

Weitere Informationen zur Zulassungsliste für die von Ihnen verwendeten Snowflake-Clients finden Sie unter Allowing Host names.

Syntax

SYSTEM$ALLOWLIST()
Copy

Argumente

Keine.

Rückgabewerte

Der Datentyp des zurückgegebenen Werts ist VARIANT. Der Wert ist ein Array von JSON-Strukturen. Jede JSON-Struktur enthält drei Schlüssel/Wert-Paare:

type

Snowflake unterstützt die folgenden Typen:

SNOWFLAKE_DEPLOYMENT

Host name and port number information for your Snowflake account.

SNOWFLAKE_DEPLOYMENT_REGIONLESS

Host name and port number information for your organization.

Weitere Informationen dazu finden Sie unter Kontobezeichner.

STAGE

Location (such as Amazon S3, Google Cloud Storage, or Microsoft Azure) where files that the Snowflake client can read or write are stored.

SNOWSQL_REPO

Endpoint accessed by SnowSQL to perform automatic downloads or upgrades.

OUT_OF_BAND_TELEMETRY

Die Hosts, an die Treiber Kennzahlen und Out-of-Band-Vorfälle wie z. B. OCSP-Probleme melden.

CLIENT_FAILOVER

Host name and port number for the connection URL for Client Redirect. Note that each row in the query output that specifies this value refers to either the primary connection or the secondary connection depending on how the connection URLs were configured.

CRL_DISTRIBUTION_POINT

Hostname und Portnummer für Verteilungsendpunkte der Zertifikatssperrliste (CRL).

OCSP_CACHE

Von Snowflake bereitgestellte alternative Quelle für OCSP-Zertifikatinformationen, falls der primäre OCSP-Responder nicht erreichbar ist. Die meisten neueren Versionen der Snowflake-Clients greifen auf den OCSP-Cache zu, anstatt sich direkt mit dem OCSP-Responder zu verbinden.

OCSP_CACHE_REGIONLESS

Von Snowflake bereitgestellte alternative Quelle für OCSP-Zertifikatsinformationen für Ihre Organisation. Die meisten neueren Versionen der Snowflake-Clients greifen auf den OCSP-Cache zu, anstatt sich direkt mit dem OCSP-Responder zu verbinden.

OCSP_CLIENT_FAILOVER

Von Snowflake bereitgestellte alternative Quelle für OCSP-Zertifikatsinformationen für die Clientumleitung.

DUO_SECURITY

The host name for the Duo Security service that is used with Mehrstufige Authentifizierung (MFA) while authenticating to Snowflake.

OCSP_RESPONDER

Host name to contact to verify that the OCSP TLS certificate has not been revoked.

Beachten Sie, dass dieser Wert nicht erforderlich ist, wenn Sie private Konnektivität zum Snowflake-Dienst konfigurieren. Folgen Sie der Anleitung unter dem entsprechenden Thema, um den OCSP-Wert auszuwählen, der zu Ihrer Zulassungsliste hinzugefügt werden soll.

SNOWSIGHT_DEPLOYMENT_REGIONLESS

Host name and port number for your organization to access Snowsight.

Weitere Informationen dazu finden Sie unter Kontobezeichner und Snowsight: Die Snowflake-Weboberfläche.

SNOWSIGHT_DEPLOYMENT

Host name and port number to access Snowsight for your Snowflake account.

host

Specifies the full host name for type, for example: "xy12345.east-us-2.azure.snowflakecomputing.com", "ocsp.snowflakecomputing.com".

port

Specifies the port number for type, for example: 443, 80.

Nutzungshinweise

  • Die Ausgabe kann mehrere Einträge für bestimmte Typen (z. B. STAGE, OCSP_RESPONDER) enthalten.

  • Gelegentlich kann Snowflake die Socket-Verbindung vom Client, der die Funktion aufruft, nicht auflösen, und die Anweisung, die die Funktion aufruft, schlägt mit einer der folgenden Fehlermeldungen fehl:

    SYSTEM$ALLOWLIST: Fail to get SSL context
    SYSTEM$ALLOWLIST: SSLContext init failed
    SYSTEM$ALLOWLIST: Could not find host in OCSP dumping
    SYSTEM$ALLOWLIST: Peer unverified
    SYSTEM$ALLOWLIST: Connection failure
    

    Außerdem gibt Snowflake eine leere Liste für die OCSP-Felder in der Funktionsausgabe zurück. Zur Problembehandlung können Sie ein paar Minuten warten und die Anweisung erneut ausführen, wenn die Netzwerkverbindung nur transient (vorübergehend) ist. Wenn das Problem weiterhin besteht, wenden Sie sich an den Snowflake-Support.

Beispiele

So rufen Sie die Funktion auf:

SELECT SYSTEM$ALLOWLIST();
Copy

Beispielausgabe:

[
  {"type":"SNOWFLAKE_DEPLOYMENT",    "host":"xy12345.snowflakecomputing.com",                 "port":443},
  {"type":"STAGE",                   "host":"sfc-customer-stage.s3.us-west-2.amazonaws.com",  "port":443},
  ...
  {"type":"SNOWSQL_REPO",            "host":"sfc-repo.snowflakecomputing.com",                "port":443},
  ...
  {"type":"CRL_DISTRIBUTION_POINT",  "host":"crl.r2m01.amazontrust.com",                       "port":80},
  ...
  {"type":"OCSP_CACHE",              "host":"ocsp.snowflakecomputing.com",                     "port":80},
  {"type":"OCSP_RESPONDER",          "host":"o.ss2.us",                                        "port":80},
  ...
]
Copy

Achten Sie in dieser Beispielausgabe auf Folgendes:

  • Zur besseren Lesbarkeit wurden Leerzeichen und Zeilenumbrüche hinzugefügt. Außerdem wurden einige Einträge weggelassen.

  • The region ID (us-west-2) in some of the host names indicates the account is in the US West region; however, the region ID is not utilized in the host name for SNOWFLAKE_DEPLOYMENT.

Verwenden Sie die Funktion FLATTEN in Verbindung mit der Funktion PARSE_JSON, um die Informationen in eine tabellarische Ausgabe anstatt in JSON zu extrahieren:

SELECT t.VALUE:type::VARCHAR as type,
       t.VALUE:host::VARCHAR as host,
       t.VALUE:port as port
FROM TABLE(FLATTEN(input => PARSE_JSON(SYSTEM$ALLOWLIST()))) AS t;
Copy

Beispielausgabe:

+------------------------+---------------------------------------------------+------+
| TYPE                   | HOST                                              | PORT |
|------------------------+---------------------------------------------------+------|
| SNOWFLAKE_DEPLOYMENT   | xy12345.snowflakecomputing.com                    | 443  |
| STAGE                  | sfc-customer-stage.s3.us-west-2.amazonaws.com     | 443  |
  ...
| SNOWSQL_REPO           | sfc-repo.snowflakecomputing.com                   | 443  |
  ...
| CRL_DISTRIBUTION_POINT | crl.r2m01.amazontrust.com                         | 80   |
  ...
| OCSP_CACHE             | ocsp.snowflakecomputing.com                       | 80   |
| OCSP_RESPONDER         | ocsp.sca1b.amazontrust.com                        | 80   |
  ...
+------------------------+---------------------------------------------------+------+
Copy