Enum Class SecurityLevel
- All Implemented Interfaces:
SecurityPolicy,Serializable,Comparable<SecurityLevel>,Constable
Levels are ordered from weakest to strongest.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConfidential information is sensitive and should be used only on limited and need-to-know basis.Personal identifiable information (PII) is data that can be used to identify an individual directly and indirectly.Public information is general message that does not disclose any information about system.Restricted information is highly sensitive.System external information is exposing information of the system that are potentially know.System internal is exposing internal state or behavior of the system.Third party information is coming from third party libraries and there is a risk of exposing sensitive or internal information. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SecurityLevel[]Parse values and return SecurityLevel enum items.static SecurityLevelReturns the enum constant of this class with the specified name.static SecurityLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PUBLIC
Public information is general message that does not disclose any information about system. It is information that is already publicly known or information that is known in user's context.Example of public information is age restriction for registration, expected format of some input values.
Disclosure of such information usually should not put a system into a risk.
-
SYSTEM_EXTERNAL
System external information is exposing information of the system that are potentially know. User may get know this information with none or some effort.Typically, external system information could be HTTP methods of particular endpoint, required endpoint parameters, validation values ranges or their format.
Disclosure of such information may give attacker insight into external system facade and/or its constraints.
-
SYSTEM_INTERNAL
System internal is exposing internal state or behavior of the system. This information may impose system into a risk.Typically, internal information could be a path to a file, full class name, non-public system settings, used libraries with their versions or similar information.
Disclosure of such information may give attacker deeper insight into the system and may help to precisely target its vulnerabilities.
-
THIRD_PARTY
Third party information is coming from third party libraries and there is a risk of exposing sensitive or internal information. This level of sensitivity is similar toSYSTEM_INTERNALwith the difference that value is taken directly from the third party exception or its message. This information should help easy identification of the cause of problem.Typically, third party information is vendor error code (e.g. SQLException#getSQLState ), or content of exception message.
Disclosure may potentially expose any kind of sensitive information. Full third party exception messages could be particularly dangerous as you do not have a control over what the message contains. Future versions of library may change message, and you may not realize sensitivity of exposed content.
-
PERSONAL_INFORMATION
Personal identifiable information (PII) is data that can be used to identify an individual directly and indirectly. Examples of such information could be (not limited to): name, surname, home address, e-mail address, national ID, phone number, date of birth, bank account number, photo, geolocation, biometric information, behavioral data and similarly. Those information could be subject of law in a particular country, please find it out for yourself what information belongs to this category.Disclosure or careless handling with such information may negatively affect business and result in financial or legal impact to the business.
-
CONFIDENTIAL
Confidential information is sensitive and should be used only on limited and need-to-know basis. This information should not be exposed and accessed only through system logs. This information should help to investigate the cause of a problem. Access should be audited.Typically, sensitive information may include anonymized user data, pricing information, reports, etc.
Disclosure of such information may negatively affect business and ultimately your brand.
-
RESTRICTED
Restricted information is highly sensitive. This level should be used only on a very limited and only need-to-know basis. The level should not ever be exposed, only logged. One may enable logging only in the case of problem investigation and only if there is no other way how to retrieve information of what happens in the system. Access should be audited.Typically, restricted information contains potentially identifiable information, user information or other business secrets.
Disclosure of such information may result in a significant financial or legal impact to the business.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
parse
Parse values and return SecurityLevel enum items.- Parameters:
values- values to parse.- Returns:
- Array of parsed items in the case
-