JCC hardened mode (file system isolation)
Restrict the JCC process on a containerized Groundplex node to only the files and directories it needs, so that Script Snaps and other pipeline code cannot read sensitive host files such as system configuration and on-disk credentials.
Overview
JCC hardened mode applies OS-level isolation to a Groundplex JCC node that runs in Docker or
Kubernetes. When enabled, the jcc.sh startup script hides sensitive host
configuration from the JCC process and drops the Linux capabilities and privileges the
process could otherwise inherit. This limits the blast radius of a Script Snap or a
third-party Snap Pack that attempts to read sensitive host files such as
/etc/shadow or on-disk cloud-provider credentials. Hardened mode isolates
the file system; it does not restrict network access to endpoints such as the instance
metadata service (see Limitations).
Hardened mode provides two independent protections, each controlled by its own environment variable:
- Hide system files (
JCC_HIDE_SYSTEM_FILES) — Replaces/etc,/var, and/rootwith minimal, sparse versions inside a private mount namespace, hiding host secrets from the JCC process. Requires theCAP_SYS_ADMINLinux capability. - Block admin rights (
JCC_BLOCK_ADMIN_RIGHTS) — Starts the JCC with no ability to gain new privileges and with all inheritable capabilities cleared. Requires no special capability.
You can enable both protections at once with the umbrella variable
JCC_HARDENED_MODE=true, or enable either protection individually. All
three variables are disabled by default.
SecurityManager
(removed in JDK 17 and later) with OS-level isolation. It is an environment-level setting on
the container, not a Snaplex version setting, and does not require a Snaplex configuration
change in Manager.Prerequisites
- A containerized Groundplex node (Docker or Kubernetes) based on the SnapLogic JCC image.
- The
setprivutility must be present in the container image. The default SnapLogic JCC image (based on AlmaLinux 9) includes it. - For
JCC_HIDE_SYSTEM_FILES(and therefore forJCC_HARDENED_MODE), the container must be granted theCAP_SYS_ADMINLinux capability, which the script uses to create a mount namespace and bind-mount the sparse directories. JCC_BLOCK_ADMIN_RIGHTSon its own requires no additional capability.
Enable hardened mode
- Confirm your container image includes
setpriv(the default SnapLogic JCC image does). - Set
JCC_HARDENED_MODE=trueas an environment variable on the container. To enable only one protection, setJCC_HIDE_SYSTEM_FILES=trueorJCC_BLOCK_ADMIN_RIGHTS=trueinstead. A variable enables its protection only when set to the exact stringtrue. - If you enable file-system hiding, grant the container the
SYS_ADMINcapability. - Start the container and verify that isolation is active (see Verify that isolation is active).
Docker
docker run -itd \
-e JCC_HARDENED_MODE=true \
--cap-add=SYS_ADMIN \
--name <container_name> \
<jcc_image>:<tag>
Kubernetes
spec:
containers:
- name: jcc
image: <jcc_image>:<tag>
securityContext:
capabilities:
add:
- SYS_ADMIN
env:
- name: JCC_HARDENED_MODE
value: "true"
What is isolated and what remains writable
When JCC_HIDE_SYSTEM_FILES is active, the script builds sparse copies of
/etc, /var, and /root and bind-mounts
them over the real directories inside a private mount namespace. The sparse
/etc contains only the entries the JCC needs to run — for example, name
resolution and TLS files (resolv.conf, hosts,
nsswitch.conf, localtime, release files,
crypto-policies, pki, ssl, and the
loader cache) along with passwd and group entries filtered
to the root and SnapLogic users. Host secrets outside this set, such as
/etc/shadow and cloud credential files, are no longer visible to the JCC
process.
The following directories remain writable by the JCC:
/opt/snaplogic/run//opt/snaplogic/data//opt/snap_v4/(the SnapLogic home directory)
/opt/snaplogic/etc/ directory is owned by root and
is not writable by the SnapLogic user. Pipelines, Script Snaps, or customer scripts that
read or write files outside the writable directories above fail when hardened mode is
enabled. Review your pipelines for host-path dependencies before you enable it.Verify that isolation is active
On startup, the JCC logs its hardening actions. When file-system hiding succeeds, the log includes messages such as:
Applying JCC hardening: hide system files (sparse /etc, /var, /root)...
Sparse /etc mounted successfully
Sparse /var mounted successfully
Sparse /root mounted successfully
Filesystem isolation applied successfully
You can also run JCC diagnostic mode, which reports the requested hardening and the verified
runtime status. The report shows, per protection, whether it is active — for example, the
mount status for /etc, /var, and /root,
whether a read of /etc/shadow is denied, and the process
NoNewPrivs and inheritable-capability values.
Limitations
- Hardened mode is opt-in and disabled by default.
JCC_HIDE_SYSTEM_FILES(and thereforeJCC_HARDENED_MODE) requires theCAP_SYS_ADMINcapability. If the capability is not available, the JCC fails to start rather than starting without isolation. To run without a capability, useJCC_BLOCK_ADMIN_RIGHTSalone, which does not requireCAP_SYS_ADMIN.- Snaps, pipelines, or scripts that read or write files outside the writable directories fail when file-system hiding is enabled.
- The
setprivutility must be present in the container image. - Network isolation (for example, restricting access to the cloud metadata endpoint) is a separate, customer-managed configuration and is not enabled by hardened mode.
Troubleshooting
The JCC fails to start with a capability error
Symptom: The startup log shows ERROR: JCC_HIDE_SYSTEM_FILES requires the CAP_SYS_ADMIN capability for mount operations.
Fix: Grant the container SYS_ADMIN (for example,
docker run --cap-add=SYS_ADMIN, or add it to the Kubernetes
securityContext), or enable only
JCC_BLOCK_ADMIN_RIGHTS.
A pipeline or Script Snap fails to read or write a file
Symptom: A pipeline that worked before hardened mode was enabled fails to access a host file.
Fix: Point the pipeline at one of the writable directories, or map the required volume to one of those paths.
Roll back hardened mode
Remove the JCC_HARDENED_MODE environment variable (and
JCC_HIDE_SYSTEM_FILES or JCC_BLOCK_ADMIN_RIGHTS if set
individually), or set it to false, and restart the container.