- Catégories :
Fonctions système (Informations système)
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.
Pour plus de détails sur la liste autorisée pour les clients Snowflake que vous utilisez, voir Allowing Host names.
Syntaxe¶
SYSTEM$ALLOWLIST()
Arguments¶
Aucun.
Renvoie¶
Le type de données de la valeur renvoyée est VARIANT. La valeur est un tableau de structures JSON. Chaque structure JSON contient trois paires clé/valeur :
typeSnowflake prend en charge les types suivants :
SNOWFLAKE_DEPLOYMENTHost name and port number information for your Snowflake account.
SNOWFLAKE_DEPLOYMENT_REGIONLESSHost name and port number information for your organization.
Pour plus d’informations, voir Identificateurs de compte.
STAGELocation (such as Amazon S3, Google Cloud Storage, or Microsoft Azure) where files that the Snowflake client can read or write are stored.
SNOWSQL_REPOEndpoint accessed by SnowSQL to perform automatic downloads or upgrades.
OUT_OF_BAND_TELEMETRYLes hôtes auxquels les pilotes signalent des métriques et des incidents hors bande tels que des problèmes OCSP.
CLIENT_FAILOVERHost 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_POINTHost name and port number for certificate revocation list (CRL) distribution endpoints.
OCSP_CACHEUne autre source d’informations de certificat OCSP fournie par Snowflake au cas où le répondeur principal OCSP ne serait pas joignable. La plupart des dernières versions des clients Snowflake accèdent au cache OCSP au lieu de se connecter directement au répondeur OCSP.
OCSP_CACHE_REGIONLESSSource alternative fournie par Snowflake d’informations sur les certificats OCSP pour votre organisation. La plupart des dernières versions des clients Snowflake accèdent au cache OCSP au lieu de se connecter directement au répondeur OCSP.
OCSP_CLIENT_FAILOVERSource alternative fournie par Snowflake d’informations sur les certificats OCSP pour la redirection de clients.
DUO_SECURITYThe host name for the Duo Security service that is used with Authentification multifactorielle (MFA) while authenticating to Snowflake.
OCSP_RESPONDERHost name to contact to verify that the OCSP TLS certificate has not been revoked.
Notez que cette valeur n’est pas nécessaire lors de la configuration de la connectivité privée au service Snowflake ; suivez les instructions de la rubrique correspondante pour sélectionner la valeur OCSP à ajouter à votre liste d’autorisations.
SNOWSIGHT_DEPLOYMENT_REGIONLESSHost name and port number for your organization to access Snowsight.
Pour plus d’informations, voir Identificateurs de compte et Snowsight : l’interface Web de Snowflake.
SNOWSIGHT_DEPLOYMENTHost name and port number to access Snowsight for your Snowflake account.
hostSpecifies the full host name for
type, for example:"xy12345.east-us-2.azure.snowflakecomputing.com","ocsp.snowflakecomputing.com".portSpecifies the port number for
type, for example:443,80.
Notes sur l’utilisation¶
La sortie peut inclure plusieurs entrées pour certains types (par exemple,
STAGE,OCSP_RESPONDER).Parfois, Snowflake ne peut pas résoudre la connexion de socket du client qui appelle la fonction, et l’instruction qui appelle la fonction échoue avec l’un des messages d’erreur suivants :
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
En outre, Snowflake renvoie une liste vide pour les champs OCSP dans la sortie de la fonction. Pour résoudre le problème, vous pouvez attendre quelques minutes et réexécuter l’instruction si la connexion réseau est transitoire. Si le problème persiste, contactez le service d’assistance de Snowflake.
Exemples¶
Pour appeler la fonction :
SELECT SYSTEM$ALLOWLIST();Exemple de sortie :
[ {"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}, ... ]Dans cet exemple de sortie, notez les éléments suivants :
Pour des raisons de lisibilité, des espaces et des caractères de nouvelle ligne ont été ajoutés. De plus, certaines entrées ont été omises.
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 forSNOWFLAKE_DEPLOYMENT.
Pour extraire des informations dans une sortie tabulaire plutôt que JSON, utilisez la fonction FLATTEN conjointement avec la fonction PARSE_JSON :
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;Exemple de sortie :
+------------------------+---------------------------------------------------+------+ | 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 | ... +------------------------+---------------------------------------------------+------+