22 Mart 2018 Perşembe

SecurityManager Sınıfı

Giriş
Şu satırı dahil ederiz
import java.lang.SecurityManager;
Açıklaması şöyle
SecurityManager is designed so you can run untrusted bytecode securely within Java applications. SecurityManager sandboxes the bytecode in order to prevent attacks.
Açıklaması şöyle
 the Oracle team deprecated the Security Manager in Java 17. One of the arguments it based its decision on is that it was initially designed to protect against applets. Applets were downloaded from the Internet, so they had to be considered untrusted code. Hence, we had to run them in a sandbox.
...
The Security Manager was a JVM component that allowed you to define a white list of what an application could do, regardless of the application code. It solved all the above issues: you could run any code but only allowed it to do a limited number of things.
The Security Manager came with several drawbacks; chief amongst them is that it was a bore to configure permissions. However, there are tools to generate the policy file. Since they are automated, you need to review the discovered permissions carefully. It’s easier to read through ~500 lines of configuration than 10k or 100k lines of code.

Since many didn’t know about tools, few did use the Security Manager. But when it was, it was very beneficial. 

Hiç yorum yok:

Yorum Gönder