I have a BigQuery User Defined Function (UDF) in which the definition contains a secret:
CREATE FUNCTION mydataset.HashWithPepper(input STRING, y INT64)
RETURNS STRING
AS SHA256(input + "secret_value_acting_as_a_pepper");
secret_value_acting_as_a_pepper
is being used to pepper the inputted value. That value is a secret and cannot be known by people using the function.
Is it possible to grant someone permission to call a UDF but not see the definition of it? I've looked at https://cloud.google.com/bigquery/docs/access-control#bq-permissions and noted the following:
Permission | Description |
---|---|
bigquery.routines.get | Get routine definitions and metadata. |
So clearly I do not want to grant bigquery.routines.get to my end-users, but how do I grant permission to call the UDF? I don't see a permission in bigquery.routines.* that pertains to calling a UDF.