Security risks of setting trustworthy = on in sql server 2012

后端 未结 2 759
执笔经年
执笔经年 2021-01-05 01:01

I get the following errors in my development database:

A .NET Framework error occurred during execution of user-defined routine or aggregate \"SpCreateTable\         


        
2条回答
  •  遥遥无期
    2021-01-05 01:46

    Setting TRUSTWORTHY ON opens a potential security breach by allowing any code to reach external resources under database impersonation context. It's perfectly fine to allow your DB to access protected network shares using a code you're in control of, however it might be not that wise to allow the same for any code.

    Setting this flag just opens a door for anyone gained dbo permissions for a particular DB as you might register any assembly and it'll have DB impersonation context at its discretion.

提交回复
热议问题