-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] warehouse: TUF initialization #7488
Conversation
TOPLEVEL_ROLES = ["root", "snapshot", "targets", "timestamp"] | ||
|
||
|
||
@task(bind=True, ignore_result=True, acks_late=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we ever be invoking this as a Celery task, or is this just being implemented to match other CLI commands that call tasks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter -- we shouldn't ever need to run this either manually or periodically after initial setup. I did it as a Celery task to get access to a request
object; is there another way to do that just in the context of the CLI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, then I think you can use the warehouse.cli.warehouse.command
decorator to receive a config
object on your CLI entry point function instead. See the shell cli command for example.
f617964
to
0b08b0c
Compare
Adds CLI and task support for initializing a TUF repository. Adds a service interface (IKeyService) with a filesystem-based implementation (LocalKeyService). Deployment will (potentially cloud-based) KMS implementation.
Instead, treat metadata.staged as our live copy. This shouldn't cause problems with consistent snapshot clients, which are the intended clients per PEP 458.
Begin work on a task for adding targets to delegated bins.
0b08b0c
to
f8e7d67
Compare
This will need to change soon, but is fine for testing.
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
This work refactors the [Draft PR](pypi#7488) by @ woodruffw, to build a new repository tool on top of the Python-TUF Metadata API, and use it instead of the Python-TUF repository tool that was deprecated in v1.0.0. Part of pypi#10672 Signed-off-by: Kairo de Araujo <[email protected]>
The vault container was a previous TUF implementation (TUF initialization pypi#7488) The new integration with RSTUF does not require this container. Signed-off-by: Kairo de Araujo <[email protected]>
* remove vault container The vault container was a previous TUF implementation (TUF initialization #7488) The new integration with RSTUF does not require this container. Signed-off-by: Kairo de Araujo <[email protected]> * PEP 458: Add RSTUF services in the Warehouse Infra This commit adds the RSTUF services to the Warehouse infrastructure for development and sets the minimum required to start RSTUF services. It adds the RSTUF API, which is used later to integrate into Warehouse and RSTUF Worker, which is responsible for computing the TUF metadata. The RSTUF requires the Postgres and Redis. Postgres stores the rstuf database used for TUF metadata computing. Redis stores the task message queue between RSTUF API and Worker, task backend result, and live settings between RSTUF services. RSTUF shares the same Postgres and Redis in development environment but has a specific setup to use its own Postgres database and Redis database ID. Postgresql URI `RSTUF_SQL_SERVER=postgresql://postgres@db:5432/rstuf` Redis DB Broker and Result is id 1 `RSTUF_BROKER_SERVER=redis://redis/1` `RSTUF_REDIS_SERVER_DB_RESULT=1` Redis DB for TUF repository settings is 2 `RSTUF_REDIS_SERVER_DB_REPO_SETTINGS=2` This commit also includes TUF database creation in the Makefile during the `make initdb`. Signed-off-by: Kairo de Araujo <[email protected]> * remove rstuf-worker unnecessary settings Remove settings from rstuf-worker in docker-compose.yml Signed-off-by: Kairo de Araujo <[email protected]> * remove vault volume from docker-compose --------- Signed-off-by: Kairo de Araujo <[email protected]> Co-authored-by: Ee Durbin <[email protected]>
Now that RSTUF is part of the dev setup from #15241, is this PR still useful, or should it be closed? |
This can be closed. |
Adds CLI and task support for initializing a TUF repository.
Adds a service interface (IKeyService) with a filesystem-based
implementation (LocalKeyService). Deployment will require a (potentially cloud-based)
KMS implementation.