Skip to content

Commit e9a1617

Browse files
authored
Merge pull request #47635 from abrennan89/securityabstracts
[SRVCOM-1832]: Update abstracts for Jupiter requirements
2 parents 6aef0d7 + 794b785 commit e9a1617

16 files changed

+112
-103
lines changed

_topic_maps/_topic_map.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,8 +3508,6 @@ Topics:
35083508
File: serverless-ossm-with-kourier-jwt
35093509
- Name: Configuring a custom domain for a Knative service
35103510
File: serverless-custom-domains
3511-
- Name: Using a custom TLS certificate for domain mapping
3512-
File: serverless-custom-tls-cert-domain-mapping
35133511
# Functions
35143512
- Name: Functions
35153513
Dir: functions

_topic_maps/_topic_map_osd.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ Topics:
311311
File: serverless-ossm-with-kourier-jwt
312312
- Name: Configuring a custom domain for a Knative service
313313
File: serverless-custom-domains
314-
- Name: Using a custom TLS certificate for domain mapping
315-
File: serverless-custom-tls-cert-domain-mapping
316314
- Name: Functions
317315
Dir: functions
318316
Topics:

_topic_maps/_topic_map_rosa.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,6 @@ Topics:
422422
File: serverless-ossm-with-kourier-jwt
423423
- Name: Configuring a custom domain for a Knative service
424424
File: serverless-custom-domains
425-
- Name: Using a custom TLS certificate for domain mapping
426-
File: serverless-custom-tls-cert-domain-mapping
427425
- Name: Functions
428426
Dir: functions
429427
Topics:

modules/serverless-create-domain-mapping-kn.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
[id="serverless-create-domain-mapping-kn_{context}"]
88
= Creating a custom domain mapping by using the Knative CLI
99

10-
You can use the `kn` CLI to create a `DomainMapping` custom resource (CR) that maps to an Addressable target CR, such as a Knative service or a Knative route.
11-
12-
The `--ref` flag specifies an Addressable target CR for domain mapping.
13-
14-
If a prefix is not provided when using the `--ref` flag, it is assumed that the target is a Knative service in the current namespace. The examples in the following procedure show the prefixes for mapping to a Knative service or a Knative route.
10+
You can customize the domain for your Knative service by mapping a custom domain name that you own to a Knative service. You can use the Knative (`kn`) CLI to create a `DomainMapping` custom resource (CR) that maps to an Addressable target CR, such as a Knative service or a Knative route.
1511

1612
.Prerequisites
1713

@@ -39,6 +35,10 @@ $ kn domain create <domain_mapping_name> --ref <target_name>
3935
----
4036
$ kn domain create example.com --ref example-service
4137
----
38+
+
39+
The `--ref` flag specifies an Addressable target CR for domain mapping.
40+
+
41+
If a prefix is not provided when using the `--ref` flag, it is assumed that the target is a Knative service in the current namespace.
4242
4343
* Map a domain to a Knative service in a specified namespace:
4444
+

modules/serverless-create-domain-mapping.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="serverless-create-domain-mapping_{context}"]
77
= Creating a custom domain mapping
88

9-
To map a custom domain name to a custom resource (CR), you must create a `DomainMapping` CR that maps to an Addressable target CR, such as a Knative service or a Knative route.
9+
You can customize the domain for your Knative service by mapping a custom domain name that you own to a Knative service. To map a custom domain name to a custom resource (CR), you must create a `DomainMapping` CR that maps to an Addressable target CR, such as a Knative service or a Knative route.
1010

1111
.Prerequisites
1212

modules/serverless-domain-mapping-custom-tls-cert.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Module included in the following assemblies:
22
//
3-
// * serverless/security/serverless-custom-tls-cert-domain-mapping.adoc
3+
// * serverless/security/serverless-custom-domains.adoc
44

55
:_content-type: PROCEDURE
66
[id="serverless-domain-mapping-custom-tls-cert_{context}"]
7-
= Adding a custom TLS certificate to a DomainMapping CR
7+
= Securing a service with a custom domain by using a TLS certificate
88

9-
You can add an existing TLS certificate with a `DomainMapping` custom resource (CR) to secure the mapped service.
9+
After you have configured a custom domain for a Knative service, you can use a TLS certificate to secure the mapped service. To do this, you must create a Kubernetes TLS secret, and then update the `DomainMapping` CR to use the TLS secret that you have created.
1010

1111
.Prerequisites
1212

@@ -27,7 +27,7 @@ You can add an existing TLS certificate with a `DomainMapping` custom resource (
2727
$ oc create secret tls <tls_secret_name> --cert=<path_to_certificate_file> --key=<path_to_key_file>
2828
----
2929

30-
. Update the `DomainMapping` CR to use the TLS secret you have created:
30+
. Update the `DomainMapping` CR to use the TLS secret that you have created:
3131
+
3232
[source,yaml]
3333
----

modules/serverless-domain-mapping-odc-admin.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
[id="serverless-domain-mapping-odc-admin_{context}"]
77
= Mapping a custom domain to a service by using the Administrator perspective
88

9+
include::snippets/serverless-domain-mapping.adoc[]
10+
911
ifdef::openshift-enterprise[]
1012
If you have cluster administrator permissions, you can create a `DomainMapping` custom resource (CR) by using the *Administrator* perspective in the {product-title} web console.
1113
endif::[]

modules/serverless-domain-mapping-odc-developer.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="serverless-domain-mapping-odc-developer_{context}"]
77
= Mapping a custom domain to a service by using the Developer perspective
88

9-
You can use the *Developer* perspective of the {product-title} web console to map a `DomainMapping` custom resource (CR) to a Knative service.
9+
You can customize the domain for your Knative service by mapping a custom domain name that you own to a Knative service. You can use the *Developer* perspective of the {product-title} web console to map a `DomainMapping` custom resource (CR) to a Knative service.
1010

1111
.Prerequisites
1212

modules/serverless-ossm-enable-sidecar-injection-with-kourier.adoc

Lines changed: 0 additions & 53 deletions
This file was deleted.

modules/serverless-ossm-v1x-jwt.adoc

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,52 @@
66
[id="serverless-ossm-v1x-jwt_{context}"]
77
= Using JSON Web Token authentication with {SMProductShortName} 1.x and {ServerlessProductName}
88

9-
You can use the following procedure to enable using JSON Web Token authentication with {SMProductShortName} 1.x and {ServerlessProductName}.
9+
You can use JSON Web Token (JWT) authentication with Knative services by using {SMProductShortName} 1.x and {ServerlessProductName}. To do this, you must create a policy in the application namespace that is a member of the `ServiceMeshMemberRoll` object. You must also enable sidecar injection for the service.
10+
11+
[IMPORTANT]
12+
====
13+
Adding sidecar injection to pods in system namespaces, such as `knative-serving` and `knative-serving-ingress`, is not supported when Kourier is enabled.
14+
15+
ifdef::openshift-enterprise[]
16+
If you require sidecar injection for pods in these namespaces, see the {ServerlessProductName} documentation on _Integrating {SMProductShortName} with {ServerlessProductName} natively_.
17+
endif::[]
18+
====
1019

1120
.Prerequisites
1221

13-
* You have installed the {ServerlessOperatorName} and Knative Serving.
22+
* You have installed the {ServerlessOperatorName}, Knative Serving, and {SMProductName} on your cluster.
1423
* Install the OpenShift CLI (`oc`).
1524
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
1625
1726
.Procedure
1827

28+
. Add the `sidecar.istio.io/inject="true"` annotation to your service:
29+
+
30+
.Example service
31+
[source,yaml]
32+
----
33+
apiVersion: serving.knative.dev/v1
34+
kind: Service
35+
metadata:
36+
name: <service_name>
37+
spec:
38+
template:
39+
metadata:
40+
annotations:
41+
sidecar.istio.io/inject: "true" <1>
42+
sidecar.istio.io/rewriteAppHTTPProbers: "true" <2>
43+
...
44+
----
45+
<1> Add the `sidecar.istio.io/inject="true"` annotation.
46+
<2> You must set the annotation `sidecar.istio.io/rewriteAppHTTPProbers: "true"` in your Knative service, because {ServerlessProductName} versions 1.14.0 and higher use an HTTP probe as the readiness probe for Knative services by default.
47+
48+
. Apply the `Service` resource:
49+
+
50+
[source,terminal]
51+
----
52+
$ oc apply -f <filename>
53+
----
54+
1955
. Create a policy in a serverless application namespace which is a member in the `ServiceMeshMemberRoll` object, that only allows requests with valid JSON Web Tokens (JWT):
2056
+
2157
[IMPORTANT]
@@ -43,6 +79,7 @@ spec:
4379
----
4480
<1> The path on your application to collect metrics by system pod.
4581
<2> The path on your application to probe by system pod.
82+
4683
. Apply the `Policy` resource:
4784
+
4885
[source,terminal]
@@ -64,6 +101,7 @@ $ curl http://hello-example-default.apps.mycluster.example.com/
64101
----
65102
Origin authentication failed.
66103
----
104+
67105
. Verify the request with a valid JWT.
68106
.. Get the valid JWT token:
69107
+

0 commit comments

Comments
 (0)