Categorias:

Funções do sistema (Informações do sistema)

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.

Para obter mais detalhes sobre a listagem permitida para os clientes do Snowflake que você utiliza, consulte Allowing Host names.

Sintaxe

SYSTEM$ALLOWLIST()
Copy

Argumentos

Nenhum.

Retornos

O tipo de dados do valor retornado é VARIANT. O valor é um conjunto de estruturas JSON. Cada estrutura JSON contém três pares chave/valor:

type

O Snowflake oferece suporte aos seguintes tipos:

SNOWFLAKE_DEPLOYMENT

Host name and port number information for your Snowflake account.

SNOWFLAKE_DEPLOYMENT_REGIONLESS

Host name and port number information for your organization.

Para obter mais informações, consulte Identificadores de conta.

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

Os hosts aos quais os drivers relatam métricas e incidentes fora de banda, tais como questões OCSP.

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

Host name and port number for certificate revocation list (CRL) distribution endpoints.

OCSP_CACHE

Fonte alternativa de informação de certificado OCSP fornecida pelo Snowflake caso o respondente primário OCSP não possa ser alcançado. A maioria das versões mais recentes dos clientes Snowflake acessam o cache OCSP em vez de conectar-se diretamente ao respondenteOCSP.

OCSP_CACHE_REGIONLESS

Fonte alternativa de informações de certificado OCSP para sua organização fornecida pelo Snowflake. A maioria das versões mais recentes dos clientes Snowflake acessam o cache OCSP em vez de conectar-se diretamente ao respondenteOCSP.

OCSP_CLIENT_FAILOVER

Fonte alternativa fornecida pelo Snowflake de informações do certificado OCSP para redirecionamento do cliente.

DUO_SECURITY

The host name for the Duo Security service that is used with Autenticação multifator (MFA) while authenticating to Snowflake.

OCSP_RESPONDER

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

Observe que este valor não é necessário ao configurar a conectividade privada ao serviço Snowflake; siga as instruções no tópico correspondente para selecionar o valor OCSP a ser adicionado à sua lista de permissões.

SNOWSIGHT_DEPLOYMENT_REGIONLESS

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

Para obter mais informações, consulte Identificadores de conta e Snowsight: a interface da Web do Snowflake.

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.

Notas de uso

  • A saída pode incluir entradas múltiplas para certos tipos (por exemplo, STAGE, OCSP_RESPONDER).

  • Ocasionalmente, o Snowflake não consegue resolver a conexão de soquete do cliente que chama a função, e a instrução que chama a função falha com uma das seguintes mensagens de erro:

    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
    

    Além disso, Snowflake retorna uma lista vazia para os campos OCSP na saída da função. Para solucionar problemas, você pode aguardar alguns minutos e executar novamente a instrução se a conexão de rede for transitória. Se o problema persistir, entre em contato com o suporte Snowflake.

Exemplos

Para chamar a função:

SELECT SYSTEM$ALLOWLIST();
Copy

Exemplo de saída:

[
  {"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

Nesta exemplo de saída, observe o seguinte:

  • Para facilitar a leitura, foram acrescentados espaços em branco e caracteres de nova linha. Além disso, algumas entradas foram omitidas.

  • 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.

Para extrair as informações na saída tabular em vez de JSON, use a função FLATTEN em conjunto com a função 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;
Copy

Exemplo de saída:

+------------------------+---------------------------------------------------+------+
| 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