Class ConsolePluginSpec
- java.lang.Object
-
- io.fabric8.openshift.api.model.console.v1.ConsolePluginSpec
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<ConsolePluginSpecBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class ConsolePluginSpec extends Object implements io.fabric8.kubernetes.api.builder.Editable<ConsolePluginSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
ConsolePluginSpec is the desired plugin configuration.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConsolePluginSpec()No args constructor for use in serializationConsolePluginSpec(ConsolePluginBackend backend, List<ConsolePluginCSP> contentSecurityPolicy, String displayName, ConsolePluginI18n i18n, List<ConsolePluginProxy> proxy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConsolePluginSpecBuilderedit()Map<String,Object>getAdditionalProperties()ConsolePluginBackendgetBackend()ConsolePluginSpec is the desired plugin configuration.List<ConsolePluginCSP>getContentSecurityPolicy()contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin.StringgetDisplayName()displayName is the display name of the plugin.ConsolePluginI18ngetI18n()ConsolePluginSpec is the desired plugin configuration.List<ConsolePluginProxy>getProxy()proxy is a list of proxies that describe various service type to which the plugin needs to connect to.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetBackend(ConsolePluginBackend backend)ConsolePluginSpec is the desired plugin configuration.voidsetContentSecurityPolicy(List<ConsolePluginCSP> contentSecurityPolicy)contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin.voidsetDisplayName(String displayName)displayName is the display name of the plugin.voidsetI18n(ConsolePluginI18n i18n)ConsolePluginSpec is the desired plugin configuration.voidsetProxy(List<ConsolePluginProxy> proxy)proxy is a list of proxies that describe various service type to which the plugin needs to connect to.ConsolePluginSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
ConsolePluginSpec
public ConsolePluginSpec()
No args constructor for use in serialization
-
ConsolePluginSpec
public ConsolePluginSpec(ConsolePluginBackend backend, List<ConsolePluginCSP> contentSecurityPolicy, String displayName, ConsolePluginI18n i18n, List<ConsolePluginProxy> proxy)
-
-
Method Detail
-
getBackend
public ConsolePluginBackend getBackend()
ConsolePluginSpec is the desired plugin configuration.
-
setBackend
public void setBackend(ConsolePluginBackend backend)
ConsolePluginSpec is the desired plugin configuration.
-
getContentSecurityPolicy
public List<ConsolePluginCSP> getContentSecurityPolicy()
contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin. Each directive specifies a list of values, appropriate for the given directive type, for example a list of remote endpoints for fetch directives such as ScriptSrc. Console web application uses CSP to detect and mitigate certain types of attacks, such as cross-site scripting (XSS) and data injection attacks. Dynamic plugins should specify this field if need to load assets from outside the cluster or if violation reports are observed. Dynamic plugins should always prefer loading their assets from within the cluster, either by vendoring them, or fetching from a cluster service. CSP violation reports can be viewed in the browser's console logs during development and testing of the plugin in the OpenShift web console. Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc. Each of the available directives may be defined only once in the list. The value 'self' is automatically included in all fetch directives by the OpenShift web console's backend. For more information about the CSP directives, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-PolicyThe OpenShift web console server aggregates the CSP directives and values across its own default values and all enabled ConsolePlugin CRs, merging them into a single policy string that is sent to the browser via `Content-Security-Policy` HTTP response header.
Example:
ConsolePlugin A directives:
script-src: https://script1.com/, https://script2.com/
font-src: https://font1.com/
ConsolePlugin B directives:
script-src: https://script2.com/, https://script3.com/
font-src: https://font2.com/
img-src: https://img1.com/
Unified set of CSP directives, passed to the OpenShift web console server:
script-src: https://script1.com/, https://script2.com/, https://script3.com/
font-src: https://font1.com/, https://font2.com/
img-src: https://img1.com/
OpenShift web console server CSP response header:
Content-Security-Policy: default-src 'self'; base-uri 'self'; script-src 'self' https://script1.com/ https://script2.com/ https://script3.com/; font-src 'self' https://font1.com/ https://font2.com/; img-src 'self' https://img1.com/; style-src 'self'; frame-src 'none'; object-src 'none'
-
setContentSecurityPolicy
public void setContentSecurityPolicy(List<ConsolePluginCSP> contentSecurityPolicy)
contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin. Each directive specifies a list of values, appropriate for the given directive type, for example a list of remote endpoints for fetch directives such as ScriptSrc. Console web application uses CSP to detect and mitigate certain types of attacks, such as cross-site scripting (XSS) and data injection attacks. Dynamic plugins should specify this field if need to load assets from outside the cluster or if violation reports are observed. Dynamic plugins should always prefer loading their assets from within the cluster, either by vendoring them, or fetching from a cluster service. CSP violation reports can be viewed in the browser's console logs during development and testing of the plugin in the OpenShift web console. Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc. Each of the available directives may be defined only once in the list. The value 'self' is automatically included in all fetch directives by the OpenShift web console's backend. For more information about the CSP directives, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-PolicyThe OpenShift web console server aggregates the CSP directives and values across its own default values and all enabled ConsolePlugin CRs, merging them into a single policy string that is sent to the browser via `Content-Security-Policy` HTTP response header.
Example:
ConsolePlugin A directives:
script-src: https://script1.com/, https://script2.com/
font-src: https://font1.com/
ConsolePlugin B directives:
script-src: https://script2.com/, https://script3.com/
font-src: https://font2.com/
img-src: https://img1.com/
Unified set of CSP directives, passed to the OpenShift web console server:
script-src: https://script1.com/, https://script2.com/, https://script3.com/
font-src: https://font1.com/, https://font2.com/
img-src: https://img1.com/
OpenShift web console server CSP response header:
Content-Security-Policy: default-src 'self'; base-uri 'self'; script-src 'self' https://script1.com/ https://script2.com/ https://script3.com/; font-src 'self' https://font1.com/ https://font2.com/; img-src 'self' https://img1.com/; style-src 'self'; frame-src 'none'; object-src 'none'
-
getDisplayName
public String getDisplayName()
displayName is the display name of the plugin. The dispalyName should be between 1 and 128 characters.
-
setDisplayName
public void setDisplayName(String displayName)
displayName is the display name of the plugin. The dispalyName should be between 1 and 128 characters.
-
getI18n
public ConsolePluginI18n getI18n()
ConsolePluginSpec is the desired plugin configuration.
-
setI18n
public void setI18n(ConsolePluginI18n i18n)
ConsolePluginSpec is the desired plugin configuration.
-
getProxy
public List<ConsolePluginProxy> getProxy()
proxy is a list of proxies that describe various service type to which the plugin needs to connect to.
-
setProxy
public void setProxy(List<ConsolePluginProxy> proxy)
proxy is a list of proxies that describe various service type to which the plugin needs to connect to.
-
edit
public ConsolePluginSpecBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<ConsolePluginSpecBuilder>
-
toBuilder
public ConsolePluginSpecBuilder toBuilder()
-
-