How is your experience with the OutSystems Community?
12
Views
1
Comments
ODC Private Gateway container non-root execution support
Question

Hi,

We are currently testing the ODC Cloud Connector (Private Gateway) on AKS and would like to run the container as non-root.

The OutSystems documentation states that outsystemscc doesn't require root permissions, but we couldn't find a recommended Kubernetes securityContext.

Has anyone successfully tested or deployed the Cloud Connector with:

securityContext:  runAsNonRoot: true  allowPrivilegeEscalation: false

If so, which runAsUser / runAsGroup settings are you using, and are there any other requirements we should consider?

Thanks!

2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

You can run the OutSystems Cloud Connector container in AKS as non‑root, but you need to align your securityContext with how the image is built and with the permissions of the host/network it’s running on.

From the product docs, the key points are:

Because the image itself doesn’t require root, the usual non‑root Kubernetes hardening applies well:

1. runAsNonRoot and privilege escalation

These flags are safe and recommended:

securityContext:
  runAsNonRoot: true
  allowPrivilegeEscalation: false

The connector doesn’t need to start privileged processes, load kernel modules, or manipulate low‑level networking, so allowPrivilegeEscalation: false won’t block it.

2. runAsUser / runAsGroup

The exact UID/GID will depend on how OutSystems built the image, but in practice you have two options:

  1. Let the image define the user
    If the connector image sets a non‑root USER in its Dockerfile, you can rely on that and simply do:

    securityContext:
      runAsNonRoot: true
      allowPrivilegeEscalation: false
    

    This is the simplest and usually works if the container logs don’t show any permission errors.

  2. Force a specific non‑root UID/GID
    If your cluster has a policy that forces explicit UIDs, pick an arbitrary non‑root user that matches your compliance rules (for example 1000), and only mount volumes that are writable by that UID:

    securityContext:
      runAsNonRoot: true
      runAsUser: 1000
      runAsGroup: 1000
      allowPrivilegeEscalation: false
    

    This works as long as:

    • The image doesn’t rely on a hard‑coded UID/GID.
    • There’s no need to write to root‑owned filesystem paths in the container.
    • Mounted volumes (if any) are owned or writable by UID 1000.

If your first attempt fails with permission errors, you’ll see them in the connector logs (e.g. unable to create temp files, config files, or SSH sockets). In that case, either adjust runAsUser or fix volume ownership.

3. Other securityContext considerations

To keep it locked down but functional:

securityContext:
  runAsNonRoot: true
  runAsUser: 1000            # or whatever is compliant in your AKS
  runAsGroup: 1000
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: false  # usually needed, the connector may write logs/temp
  capabilities:
    drop: ["ALL"]

You can try readOnlyRootFilesystem: true, but expect to potentially need writable space (/tmp or an attached volume) for logs and SSH sockets.

4. Network and firewall requirements

Running non‑root doesn’t change the core network requirements:

5. Practical validation steps

  1. Deploy a test pod with:

    securityContext:
      runAsNonRoot: true
      runAsUser: 1000
      runAsGroup: 1000
      allowPrivilegeEscalation: false
    
  2. Start the connector using the documented parameters (token, gateway URL, remote connections).Securely tunnel your way into your private network with ODC

  3. Monitor:

If logs are clean and the ODC connection test succeeds, your chosen runAsUser/runAsGroup and non‑root setup are valid.

Since OutSystems doesn’t mandate a specific UID/GID for the Cloud Connector in the public docs, you’re free to pick any non‑root ID that fits your AKS security policies, provided volumes and filesystem permissions are aligned.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.