osc-trino-acl-dsl
A declarative format for configuring Trino access control
To operationalize this code you need Trino adminstrator privileges
examples:
Converting Trino ACL DSL to a rules.json
# install package using pipenv, pip or similar tools
$ pipenv install osc-trino-acl-dsl
# the package command `trino-dsl-to-rules` will load the given yaml or json file
# and write the resulting 'rules.json' file to standard output
# dsl-example-1.yaml is in the 'examples' directory of this repository
$ pipenv run trino-dsl-to-rules dsl-example-1.yaml > rules.json
# rules.json is trino file-based access control rules file
$ head rules.json
{
"catalogs": [
{
"group": "admins",
"allow": "all"
},
{
"group": ".*",
"catalog": "dev",
"allow": "all"
Using pre-commit checks
For more information on pre-commit checks, see here
Here is an example entry for .pre-commit-config.yaml
For more info see here
repos:
- repo: https://github.com/os-climate/osc-trino-acl-dsl
rev: v0.3.1
hooks:
# a pre-commit check to verify that an ACL DSL yaml file is in sync with rules.json file
- id: trino-acl-dsl-check
building and testing
iterative dev/test for pre-commit checks
- check out this repository
- make some change to precommit checks you want to test
- in a test repository, make an edit you expect your precommit check to operate on, then
git addthis edit (i.e. stage it for commit) but do NOT commit it, so the precommit check sees it and properly provides staged files to the argument list. - run
pre-commit try-repo /path/to/osc-trino-acl-dsl --verbose(see here) - examine the output of your precommit check to see if it did what you want
publish new version to pypi
- update all occurrences of
__version__(trygit grep version) python3 setup.py cleanorgit clean -fdxpython3 setup.py sdisttwine check dist/*twine upload dist/*- push latest to repo
- create new release tag on github
upload test or release candidate:
- twine upload --repository-url https://test.pypi.org/legacy/ dist/*
python packaging resources
Metadata
Release files for osc-trino-acl-dsl 0.3.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 |
|---|---|---|---|---|
| osc-trino-acl-dsl-0.3.1.tar.gz | 14.6 kB | Without provenance | Details for osc-trino-acl-dsl-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| osc_trino_acl_dsl-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for osc_trino_acl_dsl-0.3.1-py3-none-any.whl |
Total release size: 29.1 kB
Release files / osc-trino-acl-dsl-0.3.1.tar.gz
| Download URL | osc-trino-acl-dsl-0.3.1.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d28528143a3e0120356bc9a7cd1937dda61392e32cd416ac17a59ebab5ce818c
|
|
BLAKE2b-256 checksum How to use checksums |
05d21110588a138743fb9cde8cdd80935e556fa9d4bbc922afddf8464730b07e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.12
|
Release files / osc_trino_acl_dsl-0.3.1-py3-none-any.whl
| Download URL | osc_trino_acl_dsl-0.3.1-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77d399bdd640295fa398a65422e55494dddedd1cc1f8aeab6c1e6a4b9d5ca636
|
|
BLAKE2b-256 checksum How to use checksums |
fa234edcd9fadc327a62418afed47838a94e12d6ca5ab9566090c7243ef94f06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.12
|
Security for osc-trino-acl-dsl 0.3.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.