Skip to content

Security

Douglas Blank edited this page Nov 11, 2022 · 1 revision

Kangas DataGrid opens two ports for requests:

  • 4000 (by default) for the UI (i.e., the "frontend")
  • 4001 (by default, the above + 1) for the REST endpoints (i.e., the "backend")

You can control the ports used from the command line, or in Python.

kangas server --frontend-port 4000 --backend-port 4001

The backend port does allow a narrow place where Python expressions are evaluated (inside a list comprehension in a filter query, or in a computed column). This is fairly well guarded by default, executing only expressions, and in a reduced Python environment.

In addition, you can further restrict this evaluation environment by simply importing RestrictedPython:

pip install RestrictedPython

Simply having it installed will enable it.

Be aware if you share your computer with others that these two ports are open and others can access the DataGrids through them.

Table of Contents

Clone this wiki locally