Integration with CipherTrust Manager
Perform the following steps to integrate Snowflake with the CipherTrust Manager:
Create a user and key in CM. This user should have the ability to export the key. This user is provided as an environment variable for the function. The examples provided have the key as a hardcoded value, but this can be easily altered to be provided as an environment variable, obtained from a secrets manager or in the header of the Json passed in from the API Gateway.
Update the
CADP_for_JAVA.properties
file with the CM settings such as IP/NAE Port and so on. The file is located under the resource’s directory in the eclipse project.Note
These properties can also be overwritten with CADP code as well if your desire is to pass them in as environment variables or headers of the JSON request.
Example:
System.setProperty("com.ingrian.security.nae.NAE_IP.1", "10.20.1.9");
When all the above steps are performed you should see your UDFs in Snowflake under Routines in the UI. Here is a sample query using one of the UDF’s.
Sample Query:
select THALES_CADP_GCP_ENCRYPT_NBR(emp_id) as EMPENC, emp_id from emp_big limit 5
Output