datasette-sqlite-debug-authorizer
Debug SQLite authorizer calls
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-sqlite-debug-authorizer
Usage
Once installed, every SQLite permission check using the conn.set_authorizer() API will be logged to standard error.
This is useful for if you want to use that authorizer API to implement your own custom permissions, and need to see what calls are being made to the authorizer.
Example output (it's generally a lot noisier than this) for select * from sqlite_master:
SQLITE_SELECT:
SQLITE_READ: table="sqlite_master" column="type" db_name=main
SQLITE_READ: table="sqlite_master" column="name" db_name=main
SQLITE_READ: table="sqlite_master" column="tbl_name" db_name=main
SQLITE_READ: table="sqlite_master" column="rootpage" db_name=main
SQLITE_READ: table="sqlite_master" column="sql" db_name=main
See sqlite-authorizer-examples for more detailed documentation on what to expect from these calls.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-sqlite-debug-authorizer
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Metadata
Release files for datasette-sqlite-debug-authorizer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datasette-sqlite-debug-authorizer-0.1.1.tar.gz | 7.2 kB | Without provenance | Details for datasette-sqlite-debug-authorizer-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datasette_sqlite_debug_authorizer-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for datasette_sqlite_debug_authorizer-0.1.1-py3-none-any.whl |
Total release size: 14.7 kB
Security for datasette-sqlite-debug-authorizer 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.