public enum SecurityProfile extends java.lang.Enum<SecurityProfile>
The security profile to be used is set at the launch of PlantUML and cannot
be changed by users. The security profile defines what an instance of
PlantUML is allowed to do:
- access some local file
- connection to some remote URL
- print some technical information to the users.
The security profile is defined:
- either by an environment variable
- or an option at command line
There is also a default value, which is LEGACY in this current implementation.
Enum Constant and Description |
---|
ALLOWLIST |
INTERNET
This mode is designed for PlantUML running in a web server.
|
LEGACY
This mode reproduce old PlantUML version behaviour.
|
SANDBOX
Running in SANDBOX mode is completely secure.
|
UNSECURE
Running in UNSECURE mode means that PlantUML can access to any local file and
can connect to any URL.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canWeReadThisEnvironmentVariable(java.lang.String name) |
long |
getTimeout()
Retrieve the timeout for URL.
|
java.lang.String |
longDescription()
A Human understandable description.
|
static SecurityProfile |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SecurityProfile[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SecurityProfile SANDBOX
This mode is defined for test and debug, since it's not very useful for users. However, you can use it if you need to.
public static final SecurityProfile ALLOWLIST
public static final SecurityProfile INTERNET
public static final SecurityProfile LEGACY
Right now, this is the default Security Profile but this will be removed from future version because it is now full secure, especially on Internet server.
public static final SecurityProfile UNSECURE
Some technical information (file path, Java version) are also printed in some error messages. This is not an issue if you are running PlantUML locally. But you should not use this mode if PlantUML is running on some server, especially if the server is accessible from Internet.
public static SecurityProfile[] values()
for (SecurityProfile c : SecurityProfile.values()) System.out.println(c);
public static SecurityProfile valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String longDescription()
public long getTimeout()
public boolean canWeReadThisEnvironmentVariable(java.lang.String name)