Package jenkins.security.csp
Record Class Directive
java.lang.Object
java.lang.Record
jenkins.security.csp.Directive
- Record Components:
name-default-src,frame-ancestors, etc.inheriting- whether the directive is inheriting or not. Only applies to directives based onFetchDirective.values-'self',data:,jenkins.io, etc.
@Restricted(org.kohsuke.accmod.restrictions.Beta.class)
public record Directive(String name, Boolean inheriting, List<String> values)
extends Record
Represents a defined Content Security Policy directive
- Since:
- TODO
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringDeprecated.by CSP specstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDisallow all.static final Stringstatic final Stringstatic final Stringstatic final StringUnsupported for use in plugins.static final StringDeprecated.by CSP specstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.This should not be used.static final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinheritingrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.values()Returns the value of thevaluesrecord component.
-
Field Details
-
DEFAULT_SRC
- See Also:
-
CHILD_SRC
- See Also:
-
CONNECT_SRC
- See Also:
-
FONT_SRC
- See Also:
-
FRAME_SRC
- See Also:
-
IMG_SRC
- See Also:
-
MANIFEST_SRC
- See Also:
-
MEDIA_SRC
- See Also:
-
OBJECT_SRC
- See Also:
-
PREFETCH_SRC
- See Also:
-
SCRIPT_SRC
- See Also:
-
SCRIPT_SRC_ELEM
- See Also:
-
SCRIPT_SRC_ATTR
- See Also:
-
STYLE_SRC
- See Also:
-
STYLE_SRC_ELEM
- See Also:
-
STYLE_SRC_ATTR
- See Also:
-
WORKER_SRC
- See Also:
-
BASE_URI
- See Also:
-
BLOCK_ALL_MIXED_CONTENT
Deprecated.by CSP specDeprecated directive.- See Also:
-
FORM_ACTION
- See Also:
-
FRAME_ANCESTORS
- See Also:
-
REPORT_TO
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final String REPORT_TOUnsupported for use in plugins.- See Also:
-
REPORT_URI
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public static final String REPORT_URIDeprecated.by CSP specDeprecated directive. Intended to be replaced byREPORT_TO. Unsupported for use in plugins.- See Also:
-
REQUIRE_TRUSTED_TYPES_FOR
- See Also:
-
SANDBOX
- See Also:
-
TRUSTED_TYPES
- See Also:
-
UPGRADE_INSECURE_REQUESTS
- See Also:
-
SELF
- See Also:
-
NONE
Disallow all. Note that this is not a valid argument forCspBuilder.add(String, String...). To initialize a previously undefined fetch directive, callCspBuilder.initialize(FetchDirective, String...)and pass no values. To remove all other values, callCspBuilder.remove(String, String...).- See Also:
-
UNSAFE_INLINE
- See Also:
-
UNSAFE_EVAL
Deprecated.This should not be used.Probably should not be used.- See Also:
-
DATA
- See Also:
-
BLOB
- See Also:
-
REPORT_SAMPLE
- See Also:
-
-
Constructor Details
-
Directive
Creates an instance of aDirectiverecord class.- Parameters:
name- the value for thenamerecord componentinheriting- the value for theinheritingrecord componentvalues- the value for thevaluesrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
inheriting
Returns the value of theinheritingrecord component.- Returns:
- the value of the
inheritingrecord component
-
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-