LEGACY. It emulates the behavior of older PlantUML versions. This means you can safely upgrade to 1.2020.11. However, you should then pick up an appropriate mode for your usage.
This is needed because PlantUML can be used in many different configurations which require different security setting.
If you are using a version older than 1.2020.11 and if your system is accessible from Internet, you should probably upgrade because older versions of PlantUML may expose a little more than you would expect. Even the new
LEGACY default mode is now more secure than older PlantUML behavior.
setenv PLANTUML_SECURITY_PROFILE INTERNET
Another way is an option in the command line (do not forget the
java -DPLANTUML_SECURITY_PROFILE=INTERNET -jar /path/to/plantuml.jar ...
Or if you are using Java and PlantUML as a library:
UNSECURE mode, it can access to all local files of the running instance and can access to any URL.
Despite its name, this does not mean that you should not use it. If you are running locally PlantUML from some scripts for your generated documentation, this is completely safe and ok.
It may become an issue if this is used from a Web Server which is accessible from Internet, because you cannot control what users are doing in their diagram text.
LEGACY because this mode will be removed in future releases and the default mode will be more restricted.
INTERNET mode, PlantUML cannot have access to any local files (except if you are using allowlists, see below). However, all URLs on port 80 or 443 are accessible. If you need some specific ports (like 8080 for some Intranet server), you can also use allowlists.
ALLOWLIST mode, PlantUML cannot have any access to local files or URL.
You have to use allowlists to explicitely authorize access to local or remote resources.
SANDBOX mode, PlantUML cannot have any access to local files or URL. Even allowlists lists are ignored.
So this mode is completely close.
The main interest of this one is testing: if someone succeed some access running this mode, it means we have a security hole and we will fix it.
plantuml.allowlist.path for local files
plantuml.include.path for local files
plantuml.allowlist.url for remote ressources (URL)
; (Windows) or
: (Linux) separator the folders users will be authorized to have access to.
java -DPLANTUML_SECURITY_PROFILE=INTERNET -Dplantuml.allowlist.path=/usr/common/:/usr/plantuml/ ...
plantuml.allowlist.path. The only difference is that users will not have to specify full path of files for those folders: PlantUML will search files in thoses folder, even if users give only filenames without full path.
java -DPLANTUML_SECURITY_PROFILE=INTERNET -Dplantuml.include.path=c:/windows/plantuml/ ...
; (for both Windows and Linux) separator the URLs users will be authorized to have access to.
java -DPLANTUML_SECURITY_PROFILE=ALLOWLIST -Dplantuml.allowlist.url=https://plantuml.com/;http://somelocalserver:8080/commons/ ...