Skip to content

Commit 1b126d3

Browse files
committed
Add 4-19-0 APIs
1 parent 17fcb80 commit 1b126d3

File tree

4 files changed

+158
-7
lines changed

4 files changed

+158
-7
lines changed

rest_api/config_apis/infrastructure-config-openshift-io-v1.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Type::
122122

123123
| `name`
124124
| `string`
125-
|
125+
|
126126

127127
|===
128128
=== .spec.platformSpec
@@ -2911,7 +2911,7 @@ Description::
29112911
| Parameter | Type | Description
29122912
| `body`
29132913
| xref:../config_apis/infrastructure-config-openshift-io-v1.adoc#infrastructure-config-openshift-io-v1[`Infrastructure`] schema
2914-
|
2914+
|
29152915
|===
29162916

29172917
.HTTP responses
@@ -3044,7 +3044,7 @@ Description::
30443044
| Parameter | Type | Description
30453045
| `body`
30463046
| xref:../config_apis/infrastructure-config-openshift-io-v1.adoc#infrastructure-config-openshift-io-v1[`Infrastructure`] schema
3047-
|
3047+
|
30483048
|===
30493049

30503050
.HTTP responses
@@ -3146,7 +3146,7 @@ Description::
31463146
| Parameter | Type | Description
31473147
| `body`
31483148
| xref:../config_apis/infrastructure-config-openshift-io-v1.adoc#infrastructure-config-openshift-io-v1[`Infrastructure`] schema
3149-
|
3149+
|
31503150
|===
31513151

31523152
.HTTP responses

rest_api/console_apis/consoleplugin-console-openshift-io-v1.adoc

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,52 @@ Required::
7272
| `object`
7373
| backend holds the configuration of backend which is serving console's plugin .
7474

75+
| `contentSecurityPolicy`
76+
| `array`
77+
| contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin.
78+
Each directive specifies a list of values, appropriate for the given directive type,
79+
for example a list of remote endpoints for fetch directives such as ScriptSrc.
80+
Console web application uses CSP to detect and mitigate certain types of attacks,
81+
such as cross-site scripting (XSS) and data injection attacks.
82+
Dynamic plugins should specify this field if need to load assets from outside
83+
the cluster or if violation reports are observed. Dynamic plugins should always prefer
84+
loading their assets from within the cluster, either by vendoring them, or fetching
85+
from a cluster service.
86+
CSP violation reports can be viewed in the browser's console logs during development and
87+
testing of the plugin in the OpenShift web console.
88+
Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc.
89+
Each of the available directives may be defined only once in the list.
90+
The value 'self' is automatically included in all fetch directives by the OpenShift web
91+
console's backend.
92+
For more information about the CSP directives, see:
93+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
94+
95+
The OpenShift web console server aggregates the CSP directives and values across
96+
its own default values and all enabled ConsolePlugin CRs, merging them into a single
97+
policy string that is sent to the browser via `Content-Security-Policy` HTTP response header.
98+
99+
Example:
100+
ConsolePlugin A directives:
101+
script-src: https://script1.com/, https://script2.com/
102+
font-src: https://font1.com/
103+
104+
ConsolePlugin B directives:
105+
script-src: https://script2.com/, https://script3.com/
106+
font-src: https://font2.com/
107+
img-src: https://img1.com/
108+
109+
Unified set of CSP directives, passed to the OpenShift web console server:
110+
script-src: https://script1.com/, https://script2.com/, https://script3.com/
111+
font-src: https://font1.com/, https://font2.com/
112+
img-src: https://img1.com/
113+
114+
OpenShift web console server CSP response header:
115+
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'
116+
117+
| `contentSecurityPolicy[]`
118+
| `object`
119+
| ConsolePluginCSP holds configuration for a specific CSP directive
120+
75121
| `displayName`
76122
| `string`
77123
| displayName is the display name of the plugin.
@@ -166,6 +212,111 @@ that contains metadata about the plugin and the extensions.
166212
| `integer`
167213
| port on which the Service that is serving the plugin is listening to.
168214

215+
|===
216+
=== .spec.contentSecurityPolicy
217+
Description::
218+
+
219+
--
220+
contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin.
221+
Each directive specifies a list of values, appropriate for the given directive type,
222+
for example a list of remote endpoints for fetch directives such as ScriptSrc.
223+
Console web application uses CSP to detect and mitigate certain types of attacks,
224+
such as cross-site scripting (XSS) and data injection attacks.
225+
Dynamic plugins should specify this field if need to load assets from outside
226+
the cluster or if violation reports are observed. Dynamic plugins should always prefer
227+
loading their assets from within the cluster, either by vendoring them, or fetching
228+
from a cluster service.
229+
CSP violation reports can be viewed in the browser's console logs during development and
230+
testing of the plugin in the OpenShift web console.
231+
Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc.
232+
Each of the available directives may be defined only once in the list.
233+
The value 'self' is automatically included in all fetch directives by the OpenShift web
234+
console's backend.
235+
For more information about the CSP directives, see:
236+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
237+
238+
The OpenShift web console server aggregates the CSP directives and values across
239+
its own default values and all enabled ConsolePlugin CRs, merging them into a single
240+
policy string that is sent to the browser via `Content-Security-Policy` HTTP response header.
241+
242+
Example:
243+
ConsolePlugin A directives:
244+
script-src: https://script1.com/, https://script2.com/
245+
font-src: https://font1.com/
246+
247+
ConsolePlugin B directives:
248+
script-src: https://script2.com/, https://script3.com/
249+
font-src: https://font2.com/
250+
img-src: https://img1.com/
251+
252+
Unified set of CSP directives, passed to the OpenShift web console server:
253+
script-src: https://script1.com/, https://script2.com/, https://script3.com/
254+
font-src: https://font1.com/, https://font2.com/
255+
img-src: https://img1.com/
256+
257+
OpenShift web console server CSP response header:
258+
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'
259+
--
260+
261+
Type::
262+
`array`
263+
264+
265+
266+
267+
=== .spec.contentSecurityPolicy[]
268+
Description::
269+
+
270+
--
271+
ConsolePluginCSP holds configuration for a specific CSP directive
272+
--
273+
274+
Type::
275+
`object`
276+
277+
Required::
278+
- `directive`
279+
- `values`
280+
281+
282+
283+
[cols="1,1,1",options="header"]
284+
|===
285+
| Property | Type | Description
286+
287+
| `directive`
288+
| `string`
289+
| directive specifies which Content-Security-Policy directive to configure.
290+
Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc.
291+
DefaultSrc directive serves as a fallback for the other CSP fetch directives.
292+
For more information about the DefaultSrc directive, see:
293+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src
294+
ScriptSrc directive specifies valid sources for JavaScript.
295+
For more information about the ScriptSrc directive, see:
296+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src
297+
StyleSrc directive specifies valid sources for stylesheets.
298+
For more information about the StyleSrc directive, see:
299+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src
300+
ImgSrc directive specifies a valid sources of images and favicons.
301+
For more information about the ImgSrc directive, see:
302+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src
303+
FontSrc directive specifies valid sources for fonts loaded using @font-face.
304+
For more information about the FontSrc directive, see:
305+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/font-src
306+
ConnectSrc directive restricts the URLs which can be loaded using script interfaces.
307+
For more information about the ConnectSrc directive, see:
308+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src
309+
310+
| `values`
311+
| `array (string)`
312+
| values defines an array of values to append to the console defaults for this directive.
313+
Each ConsolePlugin may define their own directives with their values. These will be set
314+
by the OpenShift web console's backend, as part of its Content-Security-Policy header.
315+
The array can contain at most 16 values. Each directive value must have a maximum length
316+
of 1024 characters and must not contain whitespace, commas (,), semicolons (;) or single
317+
quotes ('). The value '*' is not permitted.
318+
Each value in the array must be unique.
319+
169320
|===
170321
=== .spec.i18n
171322
Description::

rest_api/machine_apis/machineosbuild-machineconfiguration-openshift-io-v1.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ and should start and end with an alphanumeric character.
272272
| `string`
273273
| resource of the referent.
274274
This value should consist of at most 63 characters, and of only lowercase alphanumeric characters and hyphens,
275-
and should start and end with an alphanumeric character.
275+
and should start with an alphabetic character and end with an alphanumeric character.
276276
Example: "deployments", "deploymentconfigs", "pods", etc.
277277

278278
|===
@@ -404,7 +404,7 @@ and should start and end with an alphanumeric character.
404404
| `string`
405405
| resource of the referent.
406406
This value should consist of at most 63 characters, and of only lowercase alphanumeric characters and hyphens,
407-
and should start and end with an alphanumeric character.
407+
and should start with an alphabetic character and end with an alphanumeric character.
408408
Example: "deployments", "deploymentconfigs", "pods", etc.
409409

410410
|===

rest_api/machine_apis/machineosconfig-machineconfiguration-openshift-io-v1.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ and should start and end with an alphanumeric character.
433433
| `string`
434434
| resource of the referent.
435435
This value should consist of at most 63 characters, and of only lowercase alphanumeric characters and hyphens,
436-
and should start and end with an alphanumeric character.
436+
and should start with an alphabetic character and end with an alphanumeric character.
437437
Example: "deployments", "deploymentconfigs", "pods", etc.
438438

439439
|===

0 commit comments

Comments
 (0)