gpt4 book ai didi

.net - SQL Server 2017 上的 CLR 严格安全性

转载 作者:行者123 更新时间:2023-12-02 07:26:23 24 4
gpt4 key购买 nike

MSDN 上 this article说:

CLR uses Code Access Security (CAS) in the .NET Framework, which is no longer supported as a security boundary. A CLR assembly created with PERMISSION_SET = SAFE may be able to access external system resources, call unmanaged code, and acquire sysadmin privileges. Beginning with SQL Server 2017, an sp_configure option called clr strict security is introduced to enhance the security of CLR assemblies. clr strict security is enabled by default, and treats SAFE and EXTERNAL_ACCESS assemblies as if they were marked UNSAFE. The clr strict security option can be disabled for backward compatibility, but this is not recommended. Microsoft recommends that all assemblies be signed by a certificate or asymmetric key with a corresponding login that has been granted UNSAFE ASSEMBLY permission in the master database.

使用 PERMISSION_SET = SAFE 创建的 CLR 程序集如何能够访问外部系统资源、调用非托管代码并获取系统管理员权限?

为什么不再支持 CAS 作为安全边界?

据我了解,CLR 程序集不再安全,这是非常不幸的。

最佳答案

我知道这不是真正的解决方案,但您可以更改安全模式:

EXEC sp_configure 'show advanced options', 1
RECONFIGURE;
EXEC sp_configure 'clr strict security', 0;
RECONFIGURE;

对于那些想要继续工作的人来说,这是最简单的解决方案

关于.net - SQL Server 2017 上的 CLR 严格安全性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44083098/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com