カテゴリ:

システム関数 (システム情報)

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.

ご使用のSnowflakeクライアントの許可に関する詳細については、 Allowing Host names をご参照ください。

構文

SYSTEM$ALLOWLIST()
Copy

引数

なし。

戻り値

戻り値のデータ型は VARIANT です。値は JSON 構造の配列です。各 JSON 構造には、3つのキー/値ペアが含まれます。

type

Snowflakeは、次の型をサポートしています。

SNOWFLAKE_DEPLOYMENT

Host name and port number information for your Snowflake account.

SNOWFLAKE_DEPLOYMENT_REGIONLESS

Host name and port number information for your organization.

詳細については、 アカウント識別子 をご参照ください。

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

ドライバーがメトリックや 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

プライマリ OCSP レスポンダーに到達できない場合に備えて、Snowflakeが提供する OCSP 証明書情報の代替ソース。Snowflakeクライアントの最新バージョンのほとんどは、 OCSP レスポンダーに直接接続するのではなく、 OCSP キャッシュにアクセスします。

OCSP_CACHE_REGIONLESS

組織 のために、Snowflakeが提供する OCSP 証明書情報の代替ソース。Snowflakeクライアントの最新バージョンのほとんどは、 OCSP レスポンダーに直接接続するのではなく、 OCSP キャッシュにアクセスします。

OCSP_CLIENT_FAILOVER

クライアントリダイレクト のために、Snowflakeが提供する OCSP 証明書情報の代替ソース。

DUO_SECURITY

The host name for the Duo Security service that is used with 多要素認証(MFA) while authenticating to Snowflake.

OCSP_RESPONDER

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

Snowflakeサービスへのプライベート接続を構成する場合は、この値が必要ないことに注意してください。対応するトピックの手順に従って、ホワイトリストに追加する OCSP 値を選択します。

SNOWSIGHT_DEPLOYMENT_REGIONLESS

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

詳細については、 アカウント識別子 および Snowsight: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.

使用上の注意

  • 出力には、特定の型(例: STAGEOCSP_RESPONDER)に対する複数のエントリが含まれる場合があります。

  • 時として、Snowflakeが関数を呼び出すクライアントからのソケット接続を解決できず、関数を呼び出すステートメントが以下のエラーメッセージのいずれかで失敗することがあります。

    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
    

    さらに、Snowflakeは関数出力の OCSP フィールドに対して空のリストを返します。トラブルシューティングを行うには、ネットワーク接続が一時的である場合、数分待ってからステートメントを再実行します。問題が解決しない場合は、 Snowflakeサポート にお問い合わせください。

関数を呼び出すには、

SELECT SYSTEM$ALLOWLIST();
Copy

サンプル出力:

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

この出力例では、次のことに注意してください。

  • 読みやすくするために、空白文字と改行文字が追加されました。さらに、一部のエントリは省略されています。

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

情報を JSON ではなく表形式の出力に抽出するには、 FLATTEN 関数を 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

サンプル出力:

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