Skip to content

passfile not used as standard user for shared servers since 9.15 #10137

Closed as not planned

Description

@lucaspinheiro1

Probably related with #10136

Describe the bug

Since 9.15, standard users can not use the passfile defined in the connectionparameters of the shared server, it will ask for the password instead of connecting automatically. Admin can still use the passfile though.

To Reproduce

Steps to reproduce the behavior:

  1. Define a servers.json in /pgadmin4/ with passfile as connectionparameter, and shared "true"
  2. Start pgadmin
  3. Connect as standard user, a password prompt will appear when selecting the connection
  4. Connect as admin, no password prompt, connection is working

Expected behavior

The user should be able to use the passfile if shared by the admin as before 9.15.

Error message

no error found.

Activity

  1. youribonnaffe commented on Jul 6, 2026

    @youribonnaffe

    Had the same issue moving from 9.13 to 9.16. It is probably related to #9969 too.

  2. deefdragon commented on Oct 13, 2026

    @deefdragon

    @dpage
    I would like to critique the intent for not passing the passfile to a user via shared servers.json

    In #10330 you say

    The owner's passfile is a credential source and is treated the same way as the owner's password, SSH tunnel password and identity file, and SSL client certificate and key paths: a non-owner never inherits it and sets their own in the server dialog if they need one.

    However, I would like to state the reason that I wish to share the passfile. I use the oidc configuration to allow users of a specific group to log into my pgadmin instance. Specifically, a few key users who have "db" or "admin" groups are allowed in. With this, I do not need to be generating and sharing passwords for those users to access pgadmin.

    Unfortunately, the fact that these users are then unable to access the postgress servers without being given a password to the server to enter into said servers defeats this point, and means I am, once again, sharing passwords with users instead of using the built-in single sign on tooling.

    I fully recognize that the passfile is a credential source, its in the name, I WANT To share the passwords via the passfile. Unless you have some other method that would allow me to share a server and its password so a SSO user can get access to a server without needing to know the password, I believe blocking passfiles from being shared is making things less secure, not more.

  3. dpage commented on Oct 13, 2026

    @dpage
    Contributor

    Thanks for the explanation. The use case is a fair one, but the answer is a different feature rather than inheriting the owner's password file, which is a credential source and is deliberately never passed to other users. For SSO users who should connect without ever seeing a password, the next release adds SERVER_PASSEXEC_COMMANDS (#10506): the administrator defines named commands in config.py, they run without a shell and receive the pgAdmin username and auth source in PGADMIN_PASSEXEC_PGADMIN_USER and PGADMIN_PASSEXEC_PGADMIN_AUTH_SOURCE, and users of a shared server inherit the owner's choice by default. That lets a command hand out a password based on who the SSO user is, which is the 'share access, not the password' model you describe. If a shared pgpass file is still preferred, place it in a SHARED_STORAGE directory and each user sets Name:/.pgpass once on their copy. Closing as by design.

  4. deefdragon commented on Oct 13, 2026

    @deefdragon

    @dpage thank you. The alternatives were not clear in pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions