Skip to main content

External Access Integration

You can provide configuration to Snowflake Object Lifecycle Engine for the following operations with external access integration:

  • Manage the lifecycle of new and existing external access integrations
  • Manage grants of notification integration

Usage

- external_access_integration:
name: <external_access_integrations-name>
<configuration-key>: <value>
grants:
<privilege>:
- rel(role.<role-name>)
- rel(role.<role-name>)

Supported parameters

The engine supports the parameters listed below.

Configuration KeyRequired/OptionalData Types and ValuesDescription
allowed_network_rulesRequiredString: See Supported configuration of allowed_network_rulesSpecifies the allowed network rules. You can only specify egress rules.
allowed_api_authentication_integrationsOptionalBoolean: True enables deletion prevention, False does nothingSpecifies the security integrations whose OAuth authorization server issued the secret used by the UDF or procedure.
allowed_authentication_secretsOptionalString: See Supported configuration of allowed_authentication_secretsSpecifies the secrets that UDF or procedure handler code can use when accessing the external network locations referenced in allowed network rules.
commentOptionalStringA comment for the integration.
enabledOptionalBooleanSpecifies whether to initiate or suspend the integration operation.
TRUE enables the integration. FALSE disables the external access integration for maintenance.
grantsOptionalMap: See Supported External Access Integration Grants to RolesList of privileges and roles to which privileges are granted on the current EXTERNAL_ACCESS_INTEGRATION.
manage_modeOptionalString: all (default), none, grantsConfigures what properties to manage for the external access integration.
See Changing Manage Mode before changing the value.
namespacingOptionalString: both (default), none, prefix, suffixSpecifies whether prefix or suffix or both are to be added to EXTERNAL_ACCESS_INTEGRATION name.

allowed_network_rules parameter

While we support the allowed_network_rules parameter, we do not yet support managing Network Rule objects in Snowflake through SOLE. Therefore, establishing network rules will be handled using pre-hooks.

dataops/snowflake/hooks.template.yml
account_level_hooks:
# execute after the DB and other account-level objects
post_hooks:
- commands:
- "CREATE OR REPLACE SCHEMA {{ env.DATAOPS_DATABASE }}.<schema_name>;"
- "CREATE OR REPLACE NETWORK RULE {{ env.DATAOPS_DATABASE }}.<schema_name>.<network_rule_name> TYPE = HOST_PORT MODE = EGRESS VALUE_LIST = ('example.com', 'company.com:443');"
environment: snowflake
auto_commit: false

When utilizing the allowed_network_rules parameter in external_access_integration, users must specify the fully qualified name of allowed_network_rules.

Example

- external_access_integration:
name: <external_access_integrations-name>
comment: "test integration"
allowed_network_rules:
- {{ env.DATAOPS_DATABASE }}.<schema_name>.<network_rule_name>

allowed_authentication_secrets parameter

While we support the allowed_authentication_secrets parameter, we do not yet support managing Secret objects in Snowflake through SOLE. Therefore, establishing network rules will be handled using pre-hooks.

dataops/snowflake/hooks.template.yml
account_level_hooks:
# execute after the DB and other account-level objects
post_hooks:
- commands:
- "CREATE OR REPLACE SCHEMA {{ env.DATAOPS_DATABASE }}.<schema_name>;"
- "CREATE OR REPLACE SECRET {{ env.DATAOPS_DATABASE }}.<schema_name>.<secret_name> TYPE = OAUTH2 API_AUTHENTICATION = mysecurityintegration OAUTH_SCOPES = ('useraccount') COMMENT = 'secret for the service now connector';"
environment: snowflake
auto_commit: false

When utilizing the allowed_authentication_secrets parameter in external_access_integration, users must specify the fully qualified name of allowed_authentication_secrets.

Example

- external_access_integration:
name: <external_access_integrations-name>
comment: "test integration"
allowed_authentication_secrets:
- {{ env.DATAOPS_DATABASE }}.<schema_name>.<secrets_name>

Supported external access integration grants to roles

Following are the privileges you can grant to roles in the notification integration definition:

  • USAGE
  • OWNERSHIP

Examples

- external_access_integration:
name: "EXTERNAL_ACCESS_INTEGRATION"
comment: "test integration"
allowed_network_rules:
- Ext_Database.Ext_Schema.NETWORK_RULE_1
enabled: true