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
LEGACYdefault mode is more secure than older PlantUML behaviour.
Another way is an option in the command line (do not forget the
setenv PLANTUML_SECURITY_PROFILE INTERNET
Or if you are using Java and PlantUML as a library:
java -DPLANTUML_SECURITY_PROFILE=INTERNET -jar /path/to/plantuml.jar ...
UNSECUREmode, it means that PlantUML can access to all local files of the running server 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.
LEGACYbecause this mode will be removed in future releases and the default mode will be more restricted.
INTERNETmode, 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 port (like 8080 for some Intranet server), you can also use allowlists.
ALLOWLISTmode, PlantUML cannot have any access to local files or URL. You have to use allowlists to explicitely authorize access to local or remote ressources.
SANDBOXmode, 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.pathfor local files
plantuml.include.pathfor local files
plantuml.allowlist.urlfor remote ressources (URL)
:(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/ ...