Commit Graph
542 Commits
Author SHA1 Message Date
Daniel Zabel 06300e76a0 Make init container security context configurable in the Helm chart (#9646)
The two init containers in the Helm deployment template had hardcoded
securityContext blocks, unlike the main container which already renders
its context from .Values.containerSecurityContext via the
renderSecurityContext helper. Switch the init containers to the same
pattern so operators can customise (or disable) their security context.

Default behaviour is unchanged: containerSecurityContext defaults to
enabled with values identical to the previous hardcoded block, and the
helper continues to gate appArmorProfile on
global.compatibility.appArmor.enabled. Verified with helm template that
the rendered init-container securityContext is unchanged for the default
values, honours the appArmor toggle, and is omitted entirely when
containerSecurityContext.enabled=false.

Adds a 9.16 release note.
2026-06-09 15:17:01 +01:00
Ashesh Vashi c88c8f612e docker: read PGADMIN_CONFIG_CONFIG_DATABASE_URI safely via os.environ (#9984)
The container entrypoint substituted ${PGADMIN_CONFIG_CONFIG_DATABASE_URI}
into a double-quoted Python string for `python3 -c`. Combined with the
config_distro.py convention (where the env var's value must itself be a
Python literal, i.e. users set it to 'postgresql+psycopg://...'), the
entrypoint re-wrapped the already-quoted value, producing a string with
literal quotes inside that SQLAlchemy could not parse -- and the Python
crash made the first-launch check capture an empty string, silently
skipping PGADMIN_DEFAULT_EMAIL / PGADMIN_DEFAULT_PASSWORD setup.

Read the env var inside Python via os.environ so the shell no longer
participates in Python-literal quoting (also removing a shell-injection
surface), and use ast.literal_eval to unwrap the legacy quoted form while
letting raw values pass through. external_config_db_exists now stays
"False" on any Python failure so first-launch setup still runs.

Adds a 9.16 release note.
2026-06-09 14:44:26 +01:00
Ashesh Vashi 5b17cad8a4 fix(pkg/linux): pin psycopg-c build to x86-64 v1 baseline (#10017) 2026-06-09 13:42:30 +01:00
Ashesh Vashi ed9dcf6ebf chore(deps): bump electron 41.5.0 -> 42.1.0 and pin packaged version (#9959)
Bumps the desktop runtime to electron 42 (dependabot PR #9945) and
closes a supply-chain gap in the Linux/Mac packaging scripts that
predated this bump.

Why the bump is safe:

  - macOS UNNotification API change — pgAdmin's runtime does not use
    Electron's Notification API (only a UI toast comment in
    src/js/pgadmin.js:211; no `new Notification(...)` anywhere).
  - postinstall no longer downloads electron — production packaging
    fetches the binary directly via wget from GitHub releases, never
    via electron's postinstall script.
  - Offscreen rendering scale-factor change — no OSR usage anywhere
    in runtime/src/js/.

While verifying, found that pkg/linux/build-functions.sh and
pkg/mac/build-functions.sh resolve the packaged electron version
via:

    ELECTRON_VERSION="$(npm info electron version)"

This pulls whatever currently carries the `latest` dist-tag on the
npm registry. Any newly published electron release — including a
hypothetical malicious one — would land in shipped binaries without
review, regardless of what runtime/package.json pins.

Replace with sed-based extraction from runtime/package.json and
fail loudly if extraction returns empty. The Windows installer
(pkg/win32/installer.iss.in) does not have this issue (it bundles a
pre-built tree, no electron download step).

Net change in runtime/yarn.lock is mostly deletions — electron 42
ships with @electron/get 5.x, which dropped a large transitive
dependency tree associated with the old postinstall download path.

Verified:

  - eslint (runtime): clean (silent)
  - yarn install (runtime): resolved to electron 42.2.0 within
    ^42.1.0 range
  - sed extraction smoke-tested: returns 42.1.0 from current
    runtime/package.json
2026-06-07 12:08:56 +05:30
Ashesh Vashi 0d11dbc173 fix(docker): make CAP_NET_BIND_SERVICE optional for restricted runtimes (#9985)
The container previously applied CAP_NET_BIND_SERVICE to the python
interpreter so the non-root pgadmin user could bind to ports 80/443.
Some platforms refuse to honor file capabilities:

  - --cap-drop=ALL / OpenShift restricted-v2 SCC zero the bounding set,
    so the kernel returns EPERM on exec of any capability-tagged binary.
    This makes the image fail to start (issue #9657).
  - --security-opt=no-new-privileges / allowPrivilegeEscalation: false
    causes the kernel to silently strip file capabilities on exec, so
    the binary runs but a subsequent bind() to <1024 still fails.

Split the interpreter so neither default behavior nor restricted-runtime
support has to give up the other:

  - Dockerfile copies python3.X to /usr/local/bin/python3-cap and applies
    setcap to the copy. /usr/local/bin/python3.X stays un-capped, so
    /venv/bin/python3 (which symlinks to it) execs cleanly under
    restricted SCCs. A parallel /venv/bin/python3-cap symlink keeps the
    venv activation working when the capped interpreter is used.
  - entrypoint.sh reads /proc/self/status at startup. If NoNewPrivs is
    set, or CAP_NET_BIND_SERVICE is missing from the bounding set,
    gunicorn is invoked through the un-capped python and (when
    PGADMIN_LISTEN_PORT is unset) the default port falls back to 8080
    for plain HTTP or 8443 for TLS. A startup message records the
    choice.
  - Existing deployments with the default 80/443 mapping are unaffected:
    on every unrestricted runtime the bounding set still contains
    NET_BIND_SERVICE and gunicorn runs through the capped interpreter
    exactly as before.
  - PGADMIN_LISTEN_PORT, if set, is honored in both paths.

Docs gain a "Restricted Security Contexts" subsection covering the new
auto-detected fallback and the OpenShift / --cap-drop=ALL invocation.

Fixes #9657
2026-05-28 19:31:55 +05:30
Ashesh Vashi 533aed122f build(mac): drop webpack heap from 6 GB to 4 GB on the macOS build (#9968)
The 6 GB ceiling set by #9967 was too aggressive for the macOS x64
VM's total RAM. Build #1295 on `pgabf-macos-x64` failed in
`_build_runtime` at `unzip electron-vX.X.X-darwin-x64.zip` with exit
code 2 — never even reached webpack. That points at OS-level memory
pressure spilling out of the Node process and starving the rest of
the build: at 6 GB reserved, the box runs out of RAM long before
Terser actually needs the full ceiling.

Drop back to 4 GB, which still gives Terser a full extra gigabyte
beyond the original 3 GB setting that OOM-killed webpack in #1294,
but leaves enough headroom for the other steps in the appbundle
build to coexist.

Only the macOS appbundle path changes (see pkg/mac/build-functions.sh);
linux/pip/Makefile and dev-machine builds keep the 3 GB the `bundle`
npm script ships with.
2026-05-22 15:00:09 +05:30
Ashesh Vashi 3e1921dcd9 build(mac): bump webpack heap to 6 GB on the macOS appbundle build (#9967)
macOS x64 appbundle builds keep dying inside webpack's TerserPlugin at
92% (asset processing). Build #1294 on `pgabf-macos-x64` reached
`<s> [webpack.Progress] 92% [0] sealing asset processing TerserPlugin`
and was killed without producing a V8 fatal-error preamble, which
points at the OS reaping the Node process under memory pressure rather
than V8 hitting its own heap ceiling.

TerserPlugin is already running single-threaded (see
web/webpack.config.js, `parallel: false`), so we can't claw memory back
by reducing parallelism. Bump the V8 old-space ceiling from 3072 MB to
6144 MB inside the macOS appbundle build only — the helper in
pkg/mac/build-functions.sh bypasses `yarn run bundle` and calls
`yarn run webpacker` directly (see commit d96e8634), so this knob is
independent of the npm script and does not affect linux/pip/Makefile
or dev-machine builds. They keep the 3 GB the `bundle` script has been
shipping with for years.

If this still doesn't get the x64 box past Terser we'll switch the
minimiser to esbuild via terser-webpack-plugin's `minify` option; that
is a larger and more invasive change so we are trying the cheap fix
first.
2026-05-22 14:43:58 +05:30
Ashesh Vashi d96e86345e build(mac): split bundle step and capture stderr for diagnostics (#9965)
The macOS x64 appbundle build can fail inside `yarn run bundle` while
producing zero console output -- the Jenkins log goes straight from
"yarn install ... Done with warnings" to the EXIT trap's failure
message, leaving no signal as to whether linter, webpack, or a native
module load was the culprit (build #1293 on pgabf-macos-x64 is the
prompting example).

Split the bundled script into its constituent steps and merge stderr
into stdout so any error text reaches the console even if Jenkins'
shell step drops a tail buffer:

  yarn install
  yarn run git:hash    # cheap source-hash capture, moved up front
  yarn run linter
  yarn run webpacker

`git:hash` is a pure `git log` redirect (see web/package.json) with no
node-module dependency, but `yarn run` needs node_modules so it stays
after install. Pulling it before the heavy steps means the commit_hash
file lands on disk even if webpack later bails out.

Env vars NODE_ENV=production and NODE_OPTIONS=--max-old-space-size=3072
are set explicitly to mirror the cross-env wrapper inside the top-level
"bundle" npm script, so build output stays byte-identical to before.

No-op for successful builds; pure diagnostics win on failure.
2026-05-22 13:58:06 +05:30
Ashesh Vashi c6a6d46283 Updated version for release v9.15 2026-05-05 19:07:40 +05:30
Ashesh Vashi 4ddb16f47a fix: customize container user permissions using PUID and PGID. #9657 (#9833)
Add support for custom container user permissions via PUID and PGID
environment variables. When the container is started as root
(--user root), the pgadmin user is reassigned to the requested UID/GID
and all initialization runs under that user via su-exec, ensuring
files are created with correct ownership from the start.

Key changes:
- Dockerfile: add su-exec package, add chmod g=u for /run/pgadmin
  (fixes OpenShift random UID access)
- entrypoint.sh: add PUID/PGID validation and privilege dropping
  before initialization (not after), preserving OpenShift compatibility

Three modes supported:
- Default (USER 5050): unchanged behavior
- Custom UID (--user root -e PUID=N -e PGID=N): drops to target user
  before any init
- OpenShift (random UID, GID 0): passwd fixup + group permissions
2026-04-13 14:34:18 +05:30
rztrainlocalandrztrainlocal d59fcf3459 fix(9656): Use absolute paths for a2enmod, a2enconf for debain setup script (#9815)
Reason: On debian, it does not have `/usr/sbin` in the path environment variable anymore.

Co-authored-by: rztrainlocal <ke@KE-U758.HOME>
2026-04-06 21:48:19 +05:30
Akshay Joshi d8a078af53 Updated version for release v9.14 2026-03-30 17:44:32 +05:30
Muhammad Aqeel c8bd75c9a8 Fix apparmor_parser not found error in desktop postinst script (#9728)
Add a runtime guard in the postinst so apparmor_parser is only called
  when available. Previously, packages built on Ubuntu 24+ would fail to
  install on headless servers or systems without AppArmor tools. A warning
  is printed when the profile load is skipped to aid debugging.
2026-03-10 15:29:40 +00:00
Khushboo Vashi 5b231ddd3f Revert "Customize container user permissions using PUID and PGID. #9657"
This reverts commit 97c90f1e69.
2026-03-02 18:05:26 +05:30
Akshay Joshi 4cc74c13f7 Updated version for release v9.13 2026-03-02 14:11:36 +05:30
kon-foo 97c90f1e69 Customize container user permissions using PUID and PGID. #9657 2026-02-24 16:49:43 +05:30
kon-foo b15f15960f Fix misleading error when _FILE secret is not readable. 2026-02-18 12:10:23 +05:30
Simon Randby fbbc12a0a3 Fix an issue where deployment of helm chart crashing with operation not permitted. #9572 2026-02-09 17:13:43 +05:30
Aditya Toshniwal 9464e44887 Update windows installer side image as the current one gets flipped. 2026-02-04 14:46:48 +05:30
Aditya Toshniwal 18c73d00ce Update version in Helm for release v9.12 2026-02-02 15:17:06 +05:30
Anil Sahoo 6000cc0fb4 Fixed an issue where pgAdmin4 app on macOS cannot auto-update while running on a read-only volume even if present in the Applications folder. #9402 2026-02-02 15:11:58 +05:30
Yogesh Mahajan 596b14a0f4 Ensure the container deployment supports boolean values in yaml format. #9522 2026-01-30 12:10:36 +05:30
David Aparicio c47c79c3dc Enables deployment strategy configuration within the Helm chart. 2026-01-29 14:03:02 +05:30
Akshay Joshi 8f39f8a6bc Update JavaScript Dependencies. 2026-01-27 12:25:34 +05:30
Akshay Joshi d26aa0a8de 1) Added --no-cache-dir for OSX while installing requirements.txt
2) Updated release note.
2026-01-06 12:25:35 +05:30
Akshay Joshi 52daa56a04 Copyright updated for 2026 2026-01-05 13:33:45 +05:30
Khushboo Vashi dc801e362e Update version for release v9.11 2025-12-08 15:15:10 +05:30
Tobi 2ef67a5fa2 Ensure the proper handling of extra volume mount configurations in the Helm deployment template by correcting the configuration value references. #9408 2025-12-03 12:06:13 +05:30
Akshay Joshi 71719db3ab sphinx==9.0.0 required Python version >= 3.11. Back to version 7.4.7 2025-12-02 11:55:26 +05:30
Akshay Joshi dc7873c2b2 Update Python and JavaScript dependecies. 2025-12-01 19:13:04 +05:30
Koren Peretz 56040aa116 Use -i instead of -I in the helm deployment YAML for best minimal practice. 2025-12-01 16:27:46 +05:30
Koren Peretz d1b25c99cc Fix the Helm chart server definition and change the app version. #9393 2025-11-27 10:59:28 +05:30
Akshay Joshi fc04e2eb1a Remove __gpg_sign_cmd as it is failing on Fedora 43 due to some obsolete options. 2025-11-24 13:58:18 +05:30
Nicolas Boulard 27779370d8 Add conditional TLS support for the Ingress in the Helm chart. #9345 2025-11-21 12:08:22 +05:30
Akshay Joshi c03b55042c Updated Python and Javascript dependencies. 2025-11-18 16:33:36 +05:30
Khushboo Vashi 7b85a09603 Fix Debian builds by executing sudo apt update. 2025-11-18 12:48:13 +05:30
Khushboo Vashi 57f88cf5af Improved Debian build process by ensuring package lists are refreshed during the build workflow. 2025-11-18 12:18:14 +05:30
Khushboo Vashi 63ee81202b Updated version for v9.10. 2025-11-13 12:28:13 +05:30
Muhammad Aqeel 06fb5a45c1 pgAdmin4 debian packages were not having release build number and platform distribution name. 2025-11-07 17:33:14 +05:30
Aditya Toshniwal 39b6f40482 Fix following issues:
1. Debian builds are failing after commiting changes for #9240.
2. Object explorer context menu shows "No objects selected" on preferences change.
2025-11-04 16:49:12 +05:30
Koren Peretz d9b3f950ad Fixed indentation issue in the extraEnvVars field, preserved the serverDefinitions template, corrected a typo in README.md, and increased resource allocations in the Helm chart. 2025-10-31 12:40:47 +05:30
LiZixin 061450c8d7 Fixed an issue where the Debian build process failed with a "Sphinx module not found" error when using a Python virtual environment. #9240 2025-10-31 10:38:04 +05:30
Aditya Toshniwal 91ad54d17b Fixed an issue where query tool shortcut would trigger the callback twice. #9157 2025-10-14 14:33:17 +05:30
Akshay Joshi ea5ee74205 Update version for release v9.9 2025-10-13 20:51:55 +05:30
Anil Sahoo 5f22b4e2d2 Fixed following issues related to auto-update:
1. Fixed the issue where auto-update was not working for macOS x64 arch machines as pgadmin4 zip file name has x86_64 in it.
2. Improved error handling in the /upgrade_check API by replacing the static “Failed to check for update” message for Windows users with a dynamic error message.
3. Fixed the CSS issue affecting the close icon in the warning notifier.
4. Removed trailing periods from helper texts and notifier messages in the app’s auto-update workflow. #9133
2025-10-13 17:25:14 +05:30
Koren Peretz d03a0cdce6 Add support for initializing the pgAdmin4 Kubernetes Helm chart. #9225 2025-10-08 14:41:00 +05:30
Akshay Joshi 5c9acc1c3d 1) Added PG 18 in the github runner.
2) Added PG 18 in the docker container file.
2025-09-29 13:40:03 +05:30
Akshay Joshi e09af0a0e9 Updated release note. 2025-08-28 16:18:38 +05:30
Yogesh Mahajan 68627ab44e Allow user to configure security related gunicorn parameters. #8891 2025-08-25 11:52:07 +05:30
Pravesh Sharma 800fdce316 Unpin Electron version 35.x as the GTK crash issue has been resolved upstream. 2025-08-22 11:32:58 +05:30