Skip to content

Commit 49bff88

Browse files
authored
Merge pull request #197357 from tomkerkhove/tomkerkhove/shgw-ca-certs-root
feat: Support for non-root deployments for self-hosted gateway
2 parents 1efdb8c + e936d7c commit 49bff88

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

articles/api-management/how-to-self-hosted-gateway-on-kubernetes-in-production.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,28 @@ Pods can experience disruption due to [various](https://kubernetes.io/docs/conce
147147

148148
Consider using [Pod Disruption Budgets](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) to enforce a minimum number of pods to be available at any given time.
149149

150+
## Security
151+
The self-hosted gateway is able to run as non-root in Kubernetes allowing customers to run the gateway securely.
152+
153+
Here is an example of the security context for the self-hosted gateway:
154+
```yml
155+
securityContext:
156+
allowPrivilegeEscalation: false
157+
runAsNonRoot: true
158+
runAsUser: 1001 # This is a built-in user, but you can use any user ie 1000 as well
159+
runAsGroup: 2000 # This is just an example
160+
privileged: false
161+
capabilities:
162+
drop:
163+
- all
164+
```
165+
166+
> [!WARNING]
167+
> Running the self-hosted gateway with read-only filesystem (`readOnlyRootFilesystem: true`) is not supported.
168+
169+
> [!WARNING]
170+
> When using local CA certificates, the self-hosted gateway must run with user ID (UID) `1001` in order to manage the CA certificates otherwise the gateway will not start up.
171+
150172
## Next steps
151173

152174
* To learn more about the self-hosted gateway, see [Self-hosted gateway overview](self-hosted-gateway-overview.md).

articles/api-management/self-hosted-gateway-overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Deploying self-hosted gateways into the same environments where the backend API
3939

4040
The self-hosted gateway is a containerized, functionally equivalent version of the managed gateway deployed to Azure as part of every API Management service. The self-hosted gateway is available as a Linux-based Docker [container image](https://aka.ms/apim/sputnik/dhub) from the Microsoft Container Registry. It can be deployed to Docker, Kubernetes, or any other container orchestration solution running on a server cluster on premises, cloud infrastructure, or for evaluation and development purposes, on a personal computer. You can also deploy the self-hosted gateway as a cluster extension to an [Azure Arc-enabled Kubernetes cluster](./how-to-deploy-self-hosted-gateway-azure-arc.md).
4141

42+
### Known limitations
43+
4244
The following functionality found in the managed gateways is **not available** in the self-hosted gateways:
4345

4446
- Sending resource logs (diagnostic logs) to Azure Monitor. However, you can [send metrics](how-to-configure-cloud-metrics-logs.md) to Azure Monitor, or [configure and persist logs locally](how-to-configure-local-metrics-logs.md) where the self-hosted gateway is deployed.

0 commit comments

Comments
 (0)