Skip to content

Commit

Permalink
Update feature/roles-simplification with latest main (#287)
Browse files Browse the repository at this point in the history
* Fix typos in "All-in-one" docs section (#219)

* Add OpenSSF Best Practices badge (#221)

Add the OpenSSF Best Practices badge to RSTUF umbrella README.rst (it
adds also to RSTUF documentation)

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* chore: sync git submodules and docs (#214)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build: Update Python dependencies (#220)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build: Update Python dependencies (#225)

* chore: sync git submodules and docs (#224)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#228)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#231)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* Update the ROADMAP (#223)

* Update the ROADMAP

- Added to the MWV the Roles Simplification features
- Removed feature, that doesn't impact the minimum functionalities
  - Add TLS/SSL for Broker and Result Backend communication (Issue #6):
    It can be achivied by not exposing the Broker and Result Backend
    communication.
- Moved features that are not compatibility breaker to MVP
  - Old Metadata retention
  - Support to AWS S3 (Storage) and AWS KMS (Key Vault)
  - Token revocation
- Fixed components milestone/versions
  - MWV: v1.0.0bX
  - MVP: v1.0.X

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* Add Deployment Design Document to MVP

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

---------

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* build: Update Python dependencies (#230)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* Roadmap update: Issue #28 (#233)

- Update Issue #28 in the Roadmap

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* chore: sync git submodules and docs (#235)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#236)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#237)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#238)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#239)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#240)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#241)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#242)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build: Update Python dependencies (#234)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build: Update Python dependencies (#247)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#249)

Co-authored-by: kairoaraujo <kairoaraujo@users.noreply.github.com>

* Add MAINTAINERS.rst file (#248)

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>

* build: Update Python dependencies (#250)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#251)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* Update readthedocs url to a working one (#243)

* Update readthedocs url to a working one

* Update README.rst

Co-authored-by: Kairo Araujo <kairo@kairo.eti.br>

---------

Co-authored-by: Kairo Araujo <kairo@kairo.eti.br>

* chore: sync git submodules and docs (#252)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#255)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#258)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* Add load data information to the Guide (#254)

* Add load data information to the Guide

Add a chapter with more details about using the load data feature from
the CLI

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* Apply suggestions/comments for documentation

Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com>

* Simplify the feature usage text

Simplify the feature usage text removing the details about the process
using the REST API

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* Update docs/source/guide/deployment/importing-targets.rst

Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com>

---------

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com>

* build: Update Python dependencies (#257)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#259)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* Mark "Data load for migrations" as complete (#260)

Mark "Data load for migrations" as complete as #188 is closed.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>

* build: Update Python dependencies (#262)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#263)

Co-authored-by: kairoaraujo <kairoaraujo@users.noreply.github.com>

* RSTUF umbrella repository list all maintainers (#264)

Add all component maintainers in the umbrella repository.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* chore: sync git submodules and docs (#266)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#268)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build: Update Python dependencies (#265)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#271)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build: Update Python dependencies (#270)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#273)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build: Update Python dependencies (#272)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#275)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#277)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* Add the MWV Board (#274)

Add to the Minimum Working Version board to the ROADMAP.

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>

* build(deps): bump peter-evans/create-pull-request from 4.2.3 to 4.2.4 (#278)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@2b011fa...38e0b6e)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build: Update Python dependencies (#276)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#279)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build: Update Python dependencies (#281)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#282)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* chore: sync git submodules and docs (#283)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build(deps): bump actions/checkout from 3.3.0 to 3.4.0 (#280)

* build(deps): bump actions/checkout from 3.3.0 to 3.4.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@ac59398...24cb908)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix linting error

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Vrachev <mvrachev@vmware.com>

* chore: sync git submodules and docs (#285)

Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>

* build(deps): bump actions/checkout from 3.4.0 to 3.5.0 (#286)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@24cb908...8f4b7f8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Konstantinos Papadopoulos <konpap1996@yahoo.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: rdimitrov <rdimitrov@users.noreply.github.com>
Co-authored-by: kairoaraujo <kairoaraujo@users.noreply.github.com>
Co-authored-by: Martin Vrachev <mvrachev@vmware.com>
Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
8 people committed Mar 24, 2023
1 parent f251a8d commit 496d548
Show file tree
Hide file tree
Showing 18 changed files with 549 additions and 311 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ jobs:
SECRETS_RSTUF_ADMIN_PASSWORD: secret
steps:
- name: Checkout release tag
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3

- name: Checkout release tag if not umbrella
if: github.repository != 'vmware/repository-service-tuf'
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
with:
repository: vmware/repository-service-tuf
path: rstuf-umbrella
Expand All @@ -132,7 +132,7 @@ jobs:
pip install -r ${{ env.REQUIREMENTS_PATH }}
- name: Checkout the Repository Service for TUF CLI
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
with:
repository: vmware/repository-service-tuf-cli
path: rstuf-cli
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout release tag
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3

- name: Set up Python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-python-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
matrix:
python-versions: ["3.10"]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435
with:
python-version: ${{ matrix.python-versions }}
Expand All @@ -22,7 +22,7 @@ jobs:
pipenv update -d
make requirements
- name: Create Pull Request
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "build: Update Python dependencies"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-submodules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
needs: functional-tests
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
# Install the dependencies and update plantuml.
# The Ubuntu's plantuml version is old and doesn't support some features
# used by RSTUF.
Expand All @@ -33,7 +33,7 @@ jobs:
run: |
pipenv run make docs
- name: Create Pull Request
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: sync git submodules and docs"
Expand Down
37 changes: 37 additions & 0 deletions MAINTAINERS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Maintainers
===============

Kairo de Araujo
---------------

Email: kdearaujo@vmware.com

GitHub username: @kairoaraujo

Martin Vrachev
--------------

Email: mvrachev@vmware.com

GitHub username: @MVrachev

Radoslav Dimitrov
-----------------

Email: dimitrovr@vmware.com

GitHub username: @rdimitrov

Lukas Pühringer
-------------------------

Email: lukas.puehringer@nyu.edu

GitHub username: @lukpueh

Konstantinos Papadopoulos
-------------------------

Email: konpap1996@yahoo.com

GitHub username: @KAUTH
492 changes: 247 additions & 245 deletions Pipfile.lock

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Repository Service for TUF (RSTUF)
==================================

|OpenSSF Best Practices|

.. |OpenSSF Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/6587/badge
:target: https://bestpractices.coreinfrastructure.org/projects/6587


.. note::

Repository Service for TUF is a *work in progress*.
Expand Down Expand Up @@ -76,6 +82,6 @@ Check our `CONTRIBUTING.rst <CONTRIBUTING.rst>`_ for more details on how to
contribute.

Please, check the `Repository Service for TUF Development Guide
<https://repository-service-tuf.readthedocs.org/devel>`_.
<https://repository-service-tuf.readthedocs.io/en/latest/devel/>`_.

.. _ROADMAP: ROADMAP.rst
38 changes: 22 additions & 16 deletions ROADMAP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Goal: Experimental version
==========================

Status: Work in Progress
Status: Done

Not for a Production Deploy.
This release is for PoV/PoC of the project.
Expand Down Expand Up @@ -33,25 +33,28 @@ Components Milestones:
Goal: Minimum Working Version
=============================

Status: Planning
Status: Work In Progress

Not for a Production Deploy.
This realease is to evaluate the features and functionality.
This release is to evaluate the features and functionality.


- [ ] Token revocation (`Issue #30 <https://github.com/vmware/repository-service-tuf/issues/30>`_)
- [ ] Remove the Targets Key from Ceremony (`Issue #28 <https://github.com/vmware/repository-service-tuf/issues/28>`_)
- [ ] Key(s) Rotation (`Issue #23 <https://github.com/vmware/repository-service-tuf/issues/23>`_)
- [x] Implement HTTPS for the Rest API (`Issue #6 <https://github.com/vmware/repository-service-tuf/issues/6>`_)
- [ ] Add TLS/SSL for Broker and Result Backend communication (`Issue #6 <https://github.com/vmware/repository-service-tuf/issues/6>`_)
- [x] Public online documentation (`Issue #22 <https://github.com/vmware/repository-service-tuf/issues/22>`_)
- [ ] Old Metadata retention (`Issue #29 <https://github.com/vmware/repository-service-tuf/issues/29>`_)
- [ ] Option to Disable the API Authentication/Authorization Feature (`Issue #41 <https://github.com/vmware/repository-service-tuf/issues/41>`_)
- [x] Implement HTTPS for the Rest API (`Issue #6 <https://github.com/vmware/repository-service-tuf/issues/6>`_)
- [x] Data load for migrations (`Issue #188 <https://github.com/vmware/repository-service-tuf/issues/188>`_)
- [x] Remove the BIN Keys from Ceremony/Bootstrap Process [Roles simplification] (`Issue #28 <https://github.com/vmware/repository-service-tuf/issues/28>`_)
- [ ] Remove from the bootstrap the online keys [Roles simplification] (`Issue #207 <https://github.com/vmware/repository-service-tuf/issues/207>`_)
- [ ] Simplify the metadata bootstrap process [Roles simplification] (`Issue #208 <https://github.com/vmware/repository-service-tuf/issues/208>`_)
- [ ] Key(s) Rotation (`Issue #23 <https://github.com/vmware/repository-service-tuf/issues/23>`_)
- [ ] Option to Disable the API Authentication/Authorization (`Issue #41 <https://github.com/vmware/repository-service-tuf/issues/41>`_)

`Minimum Working Version (MWV) Board <https://github.com/orgs/vmware/projects/13/views/1>`_.

Components Milestones:

- `repository-service-tuf-api v0.0.1bX <https://github.com/vmware/repository-service-tuf-api/milestone/3>`_
- `repository-service-tuf-worker v0.0.1bX <https://github.com/vmware/repository-service-tuf-worker/milestone/3>`_
- `repository-service-tuf-cli v0.0.1bX <https://github.com/vmware/repository-service-tuf-cli/milestone/3>`_
- `repository-service-tuf-api v1.0.0bX <https://github.com/vmware/repository-service-tuf-api/milestone/3>`_
- `repository-service-tuf-worker v1.0.0bX <https://github.com/vmware/repository-service-tuf-worker/milestone/3>`_
- `repository-service-tuf-cli v1.0.0bX <https://github.com/vmware/repository-service-tuf-cli/milestone/3>`_


Goal: Minimum Valuable Product
Expand All @@ -62,13 +65,16 @@ Status: TBD
First Production Deploy
This release achive the minimum valuable product for users.

- [ ] Old Metadata retention (`Issue #29 <https://github.com/vmware/repository-service-tuf/issues/29>`_)
- [ ] Deployment Design Document (`Issue #227 <https://github.com/vmware/repository-service-tuf/issues/227>`_)
- [ ] Support to AWS S3 (Storage) and AWS KMS (Key Vault) (`Issue #24 <https://github.com/vmware/repository-service-tuf/issues/24>`_)
- [ ] Token revocation (`Issue #30 <https://github.com/vmware/repository-service-tuf/issues/30>`_)

Components Milestones:

- `repository-service-tuf-api v0.1.X <https://github.com/vmware/repository-service-tuf-api/milestone/4>`_
- `repository-service-tuf-worker v0.1.X <https://github.com/vmware/repository-service-tuf-worker/milestone/4>`_
- `repository-service-tuf-cli v0.1.X <https://github.com/vmware/repository-service-tuf-cli/milestone/4>`_
- `repository-service-tuf-api v1.0.X <https://github.com/vmware/repository-service-tuf-api/milestone/4>`_
- `repository-service-tuf-worker v1.0.X <https://github.com/vmware/repository-service-tuf-worker/milestone/4>`_
- `repository-service-tuf-cli v1.0.X <https://github.com/vmware/repository-service-tuf-cli/milestone/4>`_


Goal: End-to-End Signing
Expand Down
19 changes: 12 additions & 7 deletions docs/source/guide/deployment/all_in_one.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The All-in-one host deployment is the simplest way to Deploy Repository Service
for TUF Server.
There are limitations to scaling this deployment (limited to the host).

This deployment will use Docker Stack with Docker Compose and Docker Swarn for
This deployment will use Docker Stack with Docker Compose and Docker Swarm for
the Token and Admin user password.

Requirements
Expand All @@ -20,11 +20,11 @@ Requirements
Steps
=====

1. Prepare the Docker Swarm credentials Repository Service for TUF API admin user and a random
1. Prepare the Docker Swarm credentials Repository Service for the TUF API admin user and a random
Token Key.

- ``RSTUF_ADMIN_PASSWORD`` is the initial password for `admin`
- ``SECRETS_RSTUF_TOKEN_KEY`` it the TOKEN KEY used to hash the API Tokens
- ``SECRETS_RSTUF_ADMIN_PASSWORD`` is the initial password for `admin`
- ``SECRETS_RSTUF_TOKEN_KEY`` is the Token Key used to hash the API Tokens

.. code:: shell
Expand All @@ -44,11 +44,11 @@ Steps
$ docker secret create API_CRT /path/to/api.crt
2. Create a Docker Compose (functional example above)
2. Create a Docker Compose (functional example below)

- It uses Docker Volume for the persistent data.
- It uses Docker Secrets to store/use the ``RSTUF_TOKEN_KEY`` (Used to
generate API Tokens) and ``RSTUF_ADMIN_PASSWORD``.
- It uses Docker Secrets to store/use the ``SECRETS_RSTUF_TOKEN_KEY`` (used to
generate API Tokens) and ``SECRETS_RSTUF_ADMIN_PASSWORD``.

.. note::
**HTTPS**
Expand Down Expand Up @@ -116,6 +116,11 @@ Steps
</div>


5. Importing existing repository targets

If you want to import a huge existing data,
see :ref:`guide/deployment/importing-targets:Importing existing targets`

Uninstall All-in-one
====================

Expand Down
45 changes: 45 additions & 0 deletions docs/source/guide/deployment/importing-targets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
==========================
Importing existing targets
==========================

If you're adopting Repository Service for TUF (RSTUF), and you already have a
large number of targets (artifacts/packages/files/etc.), we recommend you use
the "import targets" feature.

If you decide, you can send all of the existing targets using the REST API, but it
will be slower than using the "import targets" feature.

The "import targets" feature can be used to add targets directly to the RSTUF
database skipping the standard processing of the API.
Normally, when you add a target through the API there will be an overhead of
multiple additional operations which for a large number of targets can prove
to be significant.

Here are some benchmarks of the "import targets" feature:

* Running in a Macbook Pro (2019) 2,4 GHz 8-Core Intel Core i9/32GB 2667 MHz DDR4:

- Adding 500,000 targets: ~40 minutes
+ Loaded 1 of 1 file with 500,000 targets
- Adding 1,000,000 targets: ~55 minutes
+ Loaded 1 of 2 file with 500,000 targets
+ Loaded 2 of 2 file with 500,000 targets


.. warning::

Use the API flow integration to your release process (CI/CD or Distribution
Platform).

Do not use "import targets" as a replacement for the standard procedure to
add targets throughout the RSTUF API or CLI tool after RSTUF is deployed.
This feature should only be used before going live with RSTUF.


RSTUF-CLI contains the :ref:`guide/repository-service-tuf-cli/index:Import Targets (``import-targets\`\`)` feature.

CLI usage
=========

.. include:: ../repository-service-tuf-cli/index.rst
:start-after: rstuf-cli-admin-import-targets
1 change: 1 addition & 0 deletions docs/source/guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Repository Service for TUF Guide

introduction/introduction
deployment/server
deployment/importing-targets
repository-service-tuf-api/index
repository-service-tuf-worker/index
repository-service-tuf-cli/index
Expand Down
54 changes: 51 additions & 3 deletions docs/source/guide/repository-service-tuf-api/api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,39 @@
]
}
},
"/api/v1/targets/publish/": {
"post": {
"tags": [
"v1",
"v1"
],
"summary": "Submit a task to publish targets.Scope: write:targets",
"description": "Trigger a task to publish targets not yet published from the RSTUF Database",
"operationId": "post_publish_targets_api_v1_targets_publish__post",
"responses": {
"202": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/repository_service_tuf_api__targets__Response"
}
}
}
},
"404": {
"description": "Not found"
}
},
"security": [
{
"OAuth2PasswordBearer": [
"write:targets"
]
}
]
}
},
"/api/v1/task/": {
"get": {
"tags": [
Expand Down Expand Up @@ -454,6 +487,18 @@
"items": {
"$ref": "#/components/schemas/Targets"
}
},
"add_task_id_to_custom": {
"title": "Add Task Id To Custom",
"type": "boolean",
"description": "Whether to add the id of the task in custom",
"default": false
},
"publish_targets": {
"title": "Publish Targets",
"type": "boolean",
"description": "Whether to publish the targets",
"default": true
}
},
"description": "POST method required Payload.",
Expand All @@ -476,9 +521,6 @@
"length": 630,
"hashes": {
"blake2b-256": "69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9"
},
"custom": {
"key": "value"
}
},
"path": "file2.tar.gz"
Expand Down Expand Up @@ -1332,6 +1374,12 @@
"items": {
"type": "string"
}
},
"publish_targets": {
"title": "Publish Targets",
"type": "boolean",
"description": "Whether to publish the targets changes",
"default": true
}
},
"description": "DELETE method required Payload.",
Expand Down

0 comments on commit 496d548

Please sign in to comment.