Skip to content

Commit 406578e

Browse files
authored
[Docs] Fix unknown code block languages (#18998)
1 parent c40c223 commit 406578e

File tree

4 files changed

+62
-60
lines changed

4 files changed

+62
-60
lines changed

Diff for: src/content/docs/learning-paths/mtls/mtls-app-security/index.mdx

+15-11
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ By default, mTLS uses Client Certificates issued by a Cloudflare Managed CA. Clo
1616
## 1. Enable mTLS
1717

1818
1. Go to your Cloudflare dashboard and select your account and domain.
19-
2. Go to **SSL/TLS** > **[Client Certificates](/ssl/client-certificates/)** tab and select **Edit** to add the Hosts (hostnames) you want to [enable mTLS](/ssl/client-certificates/enable-mtls/) for.
19+
2. Go to **SSL/TLS** > **[Client Certificates](/ssl/client-certificates/)** tab and select **Edit** to add the Hosts (hostnames) you want to [enable mTLS](/ssl/client-certificates/enable-mtls/) for.
2020

21-
Example host: `mtls-test.example.com`
21+
Example host: `mtls-test.example.com`
2222

2323
3. Select **Create Certificate** and fill in the required fields. You can choose one of the following options:
2424

@@ -27,7 +27,7 @@ By default, mTLS uses Client Certificates issued by a Cloudflare Managed CA. Clo
2727

2828
To generate and use your own CSR, you can run a command like the following:
2929

30-
```txt
30+
```sh
3131
openssl req -new -newkey rsa:2048 -nodes -keyout client1.key -out client1.csr -subj '/C=GB/ST=London/L=London/O=Organization/CN=CommonName'
3232
```
3333

@@ -41,19 +41,19 @@ In order for a client to utilize the Client Certificate you created, it must be
4141

4242
We generally recommended using one Client Certificate per device. Configuring your system to actually use the Public and Private Certificates is especially important.
4343

44-
An example is to [add both certificates to the Keychain](https://support.apple.com/en-gb/guide/keychain-access/kyca2431/mac) on a MacBook laptop.
44+
An example is to [add both certificates to the Keychain](https://support.apple.com/en-gb/guide/keychain-access/kyca2431/mac) on a MacBook laptop.
4545

4646
Another example is to generate a [PKCS12 (P12) certificate](https://en.wikipedia.org/wiki/PKCS_12) file and then [add it to your browser](https://www.ibm.com/docs/en/engineering-lifecycle-management-suite/lifecycle-management/7.0.2?topic=dashboards-importing-certificates-configuring-browsers):
4747

48-
```txt
48+
```sh
4949
openssl pkcs12 -export -out certificate.p12 -inkey private-cert.pem -in cert.pem
5050
```
5151

5252
Use the values from the previous step.
5353

5454
Example using cURL command:
5555

56-
```cURL
56+
```sh
5757
curl -v --cert cert.pem --key private-cert.pem <HOSTNAME>
5858
```
5959

@@ -77,18 +77,22 @@ Ensure you are not using a VPN that could interfere with certificates or TLS dec
7777

7878
With the Public and Private Certificates in the same directory, with this cURL command, we will gain access:
7979

80-
```curl
80+
```sh
8181
curl -I --cert cert.pem --key private-cert.pem https://mtls-test.example.com/mtls-test
82+
```
8283

83-
HTTP/2 200
84+
```txt output
85+
HTTP/2 200
8486
server: cloudflare
8587
```
8688

8789
Without the certificates, the terminal will display the following:
8890

89-
```curl
90-
$ curl -I https://mtls-test.example.com/mtls-test
91+
```sh
92+
curl -I https://mtls-test.example.com/mtls-test
93+
```
9194

95+
```txt output
9296
HTTP/2 403
9397
server: cloudflare
94-
```
98+
```

Diff for: src/content/docs/learning-paths/mtls/mtls-cloudflare-access/index.mdx

+45-41
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This requires an active Enterprise [Account](/fundamentals/setup/accounts-and-zo
1111

1212
Setting up [mTLS](/cloudflare-one/identity/devices/access-integrations/mutual-tls-authentication/) with [Cloudflare Access](/cloudflare-one/policies/access/) can help in cases where the customer:
1313

14-
- Already has existing Client Certificates on devices.
15-
- Needs to protect Access applications with Bring Your Own CA (BYOCA).
14+
- Already has existing Client Certificates on devices.
15+
- Needs to protect Access applications with Bring Your Own CA (BYOCA).
1616
- Needs to integrate with a Zero Trust solution.
1717

1818
## 1. Create a CA
@@ -25,42 +25,42 @@ In case you want to [create your own CA](/cloudflare-one/identity/devices/access
2525

2626
```json
2727
{
28-
"CN": "Cloudflare Access Testing CA",
29-
"key": {
30-
"algo": "rsa",
31-
"size": 4096
32-
},
33-
"names": [
34-
{
35-
"C": "US",
36-
"L": "LA",
37-
"O": "Access Testing",
38-
"OU": "CA",
39-
"ST": "California"
40-
}
41-
]
42-
}
28+
"CN": "Cloudflare Access Testing CA",
29+
"key": {
30+
"algo": "rsa",
31+
"size": 4096
32+
},
33+
"names": [
34+
{
35+
"C": "US",
36+
"L": "LA",
37+
"O": "Access Testing",
38+
"OU": "CA",
39+
"ST": "California"
40+
}
41+
]
42+
}
4343
```
4444

4545
2. Create a JSON file called `ca-config.json`:
4646

4747
```json
4848
{
49-
"signing": {
50-
"default": {
51-
"expiry": "8760h"
52-
},
53-
"profiles": {
54-
"server": {
55-
"usages": ["signing", "key encipherment", "server auth"],
56-
"expiry": "8760h"
57-
},
58-
"client": {
59-
"usages": ["signing","key encipherment","client auth"],
60-
"expiry": "8760h"
61-
}
62-
}
63-
}
49+
"signing": {
50+
"default": {
51+
"expiry": "8760h"
52+
},
53+
"profiles": {
54+
"server": {
55+
"usages": ["signing", "key encipherment", "server auth"],
56+
"expiry": "8760h"
57+
},
58+
"client": {
59+
"usages": ["signing", "key encipherment", "client auth"],
60+
"expiry": "8760h"
61+
}
62+
}
63+
}
6464
}
6565
```
6666

@@ -92,11 +92,11 @@ cfssl gencert -initca ca-csr.json | cfssljson -bare ca
9292
}
9393
]
9494
}
95-
```
95+
```
9696

9797
2. Now you can run the following command to generate the Client Certificates, which will output the files `client.pem`, `client-key.pem` and `client.csr`:
9898

99-
```txt
99+
```sh
100100
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=client client-csr.json | cfssljson -bare client
101101
```
102102

@@ -114,7 +114,7 @@ Additionally, authenticated requests also send the `Cf-Access-Jwt-Assertion\` JW
114114

115115
## 4. Create the self-hosted applications
116116

117-
Finally, the hostname you want to protect with mTLS needs to be added as a [self-hosted app](/cloudflare-one/applications/configure-apps/self-hosted-apps/) in Cloudflare Access, defining an [Access Policy](/cloudflare-one/policies/access/) which uses the action [Service Auth](/cloudflare-one/policies/access/#service-auth) and the Selector *Valid Certificate*, or simply requiring an [IdP](/cloudflare-one/identity/idp-integration/) authentication. You can also take advantage of extra requirements, such as the Common Name (CN), which expects the indicated hostname, and more [Selectors](/cloudflare-one/policies/access/#selectors). Alternatively, one can also [extend ZTNA with external authorization and serverless computing](/reference-architecture/diagrams/sase/augment-access-with-serverless/).
117+
Finally, the hostname you want to protect with mTLS needs to be added as a [self-hosted app](/cloudflare-one/applications/configure-apps/self-hosted-apps/) in Cloudflare Access, defining an [Access Policy](/cloudflare-one/policies/access/) which uses the action [Service Auth](/cloudflare-one/policies/access/#service-auth) and the Selector _"Valid Certificate"_, or simply requiring an [IdP](/cloudflare-one/identity/idp-integration/) authentication. You can also take advantage of extra requirements, such as the "Common Name" (CN), which expects the indicated hostname, and more [Selectors](/cloudflare-one/policies/access/#selectors). Alternatively, one can also [extend ZTNA with external authorization and serverless computing](/reference-architecture/diagrams/sase/augment-access-with-serverless/).
118118

119119
## Demo
120120

@@ -124,18 +124,22 @@ Make sure that you are not using any VPN that could interfere with the certifica
124124

125125
With the Public and Private Client Certificates in the same directory, with this cURL command, we will gain access:
126126

127-
```curl
127+
```sh
128128
curl -IXGET --cert client.pem --key client-key.pem https://mtls-access.example.com/
129+
```
129130

130-
HTTP/2 200
131+
```txt output
132+
HTTP/2 200
131133
server: cloudflare
132134
```
133135

134-
Without the certificates, we'd see the following:
136+
Without the certificates, we would see the following:
135137

136-
```curl
138+
```sh
137139
curl -I https://mtls-access.example.com/mtls-test
140+
```
138141

139-
HTTP/2 401
142+
```txt output
143+
HTTP/2 401
140144
server: cloudflare
141-
```
145+
```

Diff for: src/content/docs/r2/tutorials/summarize-pdf.mdx

+1-7
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ To view the front-end of your application, run the following command and navigat
218218
npm run dev
219219
```
220220

221-
```output
221+
```txt output
222222
⛅️ wrangler 3.80.2
223223
-------------------
224224
@@ -239,8 +239,6 @@ When you open the URL in your browser, you will see that there is a file upload
239239

240240
To handle the file upload, you will first need to add the R2 binding. In the `wrangler.toml` file, add the following code:
241241

242-
243-
244242
<WranglerConfig>
245243

246244
```toml
@@ -309,8 +307,6 @@ npx wrangler queues create pdf-summarizer
309307

310308
Add the binding to the `wrangler.toml` file:
311309

312-
313-
314310
<WranglerConfig>
315311

316312
```toml title="wrangler.toml"
@@ -393,8 +389,6 @@ The above code does the following:
393389

394390
To use Workers AI, you will need to add the Workers AI binding to the `wrangler.toml` file. The `wrangler.toml` file should contain the following code:
395391

396-
397-
398392
<WranglerConfig>
399393

400394
```toml title="wrangler.toml"

Diff for: src/content/docs/workers/static-assets/binding.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ You are migrating from a Pages project where the assets directory is `dist`.
5252
You do not want to upload the server-side Worker code nor Pages configuration files as public client-side assets.
5353
Add the following `.assetsignore` file:
5454

55-
```gitignore
55+
```txt
5656
_worker.js
5757
_redirects
5858
_headers

0 commit comments

Comments
 (0)