简体   繁体   中英

How do I retrieve certificate definition in Azure Synapse dedicated pool?

I have created certificate with following definition. The certificate is created.Is there any option to retrieve certificate definition from system objects?If we can retrieve definition,what is the best way to restrict user to view create certificate definition?

I checked sys.sql_modules table but couldn't find anything

CREATE CERTIFICATE xxxx_Certificate ENCRYPTION BY PASSWORD = 'pGFD4bb925DGvbd2439587y' WITH SUBJECT = 'YYYY Information', EXPIRY_DATE = '20221231' ;

Regards, Rajib

As per my knowledge there is no proper way retrieve Azure key vault secret using T-SQL. We can retrieve key vault secret using Py spark code in Synapse pool. I created Azure key vault and created secret. Image for reference:

在此处输入图像描述

value of secret:

在此处输入图像描述

I created synapse analytics and opened synapse studio and created notebook as mentioned below

在此处输入图像描述

I executed below code to retrieve the value of secret.

from notebookutils import mssparkutils
mssparkutils.credentials.getSecret('<keyvault_name>' , '<secret_name>')

I got the azure key vault value.

在此处输入图像描述

you can follow this way to retrieve secret value from Azure key vault.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM