Skip to content

Commit 149b352

Browse files
authored
Merge pull request #524 from Azure/oryx-cert-build
Oryx build using certificates
2 parents c896493 + 6e6b716 commit 149b352

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: "App Service builds behind proxies: fixing trust with a public certificate"
3+
author_name: "Tulika Chaudharie"
4+
toc: true
5+
toc_sticky: true
6+
---
7+
8+
**TL;DR**: If your organization uses a TLS-inspecting proxy (e.g., Zscaler), some of the traffic originating from App Service build infrastructure may be re-signed by the proxy. App Service doesn’t trust that proxy cert by default, so the build fails.
9+
Set the app setting **`WEBSITE_INSTALL_PUBLIC_CERTS_IN_KUDU=true`** and upload the proxy’s public certificate (.cer). App Service will install the certificate and your builds will succeed.
10+
11+
---
12+
13+
## Why this happens
14+
15+
During build, App Service downloads build assets from the its build CDN over HTTPS. When a corporate proxy intercepts and re-signs TLS, App Service sees a certificate chain it doesn’t recognize and refuses the connection, causing the build to fail.
16+
17+
## What’s new
18+
19+
A new app setting, **`WEBSITE_INSTALL_PUBLIC_CERTS_IN_KUDU`**, tells App Service to install any **public key certificates (.cer)** you upload into its trust store used for the build.
20+
21+
---
22+
23+
## Step-by-step
24+
25+
### 1) Upload the proxy’s public certificate
26+
27+
In the portal, navigate to your Web App ➜ **Certificates****Public key certificates (.cer)****Add certificate**.
28+
Upload the organization’s TLS inspection CA (root or intermediate) **public** certificate.
29+
30+
![Add Certificate]({{site.baseurl}}/media/2025/09/add-cert.jpg)
31+
32+
> Tip: This is a public certificate only—no private key and no password.
33+
34+
### 2) Turn on the app setting
35+
36+
Portal: **Configuration****Application settings** ➜ add (Or **Settings****Environment Variables****App Settings** ➜ Add)
37+
`WEBSITE_INSTALL_PUBLIC_CERTS_IN_KUDU = true`**Save**. This will automatically restart the app.
38+
39+
CLI (equivalent):
40+
41+
```bash
42+
az webapp config appsettings set \
43+
-g <resource-group> -n <app-name> \
44+
--settings WEBSITE_INSTALL_PUBLIC_CERTS_IN_KUDU=true
45+
```
46+
47+
### 3) Verify the certificate is installed
48+
49+
Open **Advanced Tools (Kudu)****Bash** and check:
50+
51+
```bash
52+
ls -l /etc/ssl/certs
53+
# (optional) find the installed cert by name or subject
54+
grep -l "<certificate-name>" /etc/ssl/certs/*.crt
55+
56+
# compare thumbprint
57+
openssl x509 -in /etc/ssl/certs/<your-cert>.crt -noout -fingerprint -sha1
58+
```
59+
60+
Compare the fingerprint with the thumbprint shown for your uploaded cert in the **Certificates** blade.
61+
62+
### 4) Trigger a build
63+
64+
Deploy again (Deployment Center, GitHub Actions, az webapp deployment, etc.).
65+
When the proxy presents its certificate, App Service now trusts it and the application build completes.
66+
67+
---
68+
69+
## Troubleshooting
70+
71+
* **Still seeing x509/certificate unknown errors?**
72+
Ensure you uploaded the exact CA that signs your proxy’s certs (often an org-specific intermediate), in **.cer** (DER/BASE64) form.
73+
74+
* **Multiple proxies / chains**
75+
If your environment uses a chain, upload all relevant public CA certs.
76+
77+
* **Scope**
78+
This affects App Service build infrastructure's outbound trust for the app. It does not grant trust to private keys or change TLS for your site’s inbound traffic.
79+
80+
---
81+
82+
## Summary
83+
84+
By uploading your organization’s proxy CA **public** certificate and enabling **`WEBSITE_INSTALL_PUBLIC_CERTS_IN_KUDU`**, App Service for Linux installs the certificate into its trust store. App Service can then fetch dependencies through Zscaler (or similar proxies) and your builds proceed normally—no more failed builds due to untrusted certificates.

media/2025/09/add-cert.jpg

273 KB
Loading

0 commit comments

Comments
 (0)