Skip to content

Exclude/Hide Databases via Environment Variable or Bookmark #828

Description

@helldrum

Hello pgweb team !

I would like to propose a new feature for pgweb: the ability to exclude or hide specific databases from being displayed, either via an environment variable or through a bookmark
configuration.

Currently, there is no straightforward mechanism to control database visibility directly from pgweb's configuration (or I don't find it in the documentation).
This feature would be highly beneficial in environments where pgweb is deployed centrally and where there is a need to:

  • Enhance security: Restrict the visibility of sensitive databases for certain users or environments.
  • Simplify the user interface: Hide internal or temporary databases that are not relevant to the end-user.
  • Improve deployment management: Allow dynamic and simplified configuration of database visibility without modifying the application itself.
    Proposed Implementation:
  1. Via an Environment Variable:
  • Add an environment variable such as PGWEB_EXCLUDE_DATABASES (or PGWEB_IGNORE_DATABASES) that would accept a list of database names (separated by commas or another delimiter)
    to be hidden.
  • Example: PGWEB_EXCLUDE_DATABASES=template0,template1,postgres_internal
  1. Via Bookmark Configuration (.toml):
  • Add a new key to the bookmark.toml file, for example, exclude_databases = ["postgres", "cloudsqladmin"].
    This feature would offer valuable flexibility for pgweb administration and usage in various contexts.
    Thank you for considering this suggestion.

Regards,
Helldrum

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions