To help ensure that sensitive information is concealed from users who should not have access to it, you can use the SECURE keyword when creating an external user-defined function (UDF).
For a UDF or stored procedure, you can prevent users from seeing definition specifics. When you specify that the UDF or procedure is secure, these details are visible only to authorized users – in other words, to users who are granted a role that owns the function.
The below example illustrates use of SECURE
keyword:
create or replace SECURE external function geotax_address(address object)
returns variant
IMMUTABLE
api_integration = API_INTEGRATION
HEADERS = ('headers-api-key'= '<<DIS API KEY>>', 'headers-api-secret'='<<DIS API SECRET>>')
MAX_BATCH_ROWS = 10
as 'https://9a3cydoxrc.execute-api.us-east-1.amazonaws.com/v1/geo-tax-address';create or replace SECURE external function geotax_location(address object)
returns variant
IMMUTABLE
api_integration = API_INTEGRATION
HEADERS = ('headers-api-key'= '<<DIS API KEY>>', 'headers-api-secret'='<<DIS API SECRET>>')
MAX_BATCH_ROWS = 10
as 'https://9a3cydoxrc.execute-api.us-east-1.amazonaws.com/v1/geo-tax-location;
For more details on protecting sensitive information with secure UDF see Protecting Sensitive Information with Secure UDFs by snowflake.