Skip to content
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

Add optional app ID to builds #73

Merged
merged 7 commits into from
Sep 23, 2022
Merged

Conversation

jameswestman
Copy link
Collaborator

Adds an optional app ID field to builds. Builds with an app ID require that app ID to be present in the token's prefixes field, protecting them from other users.

This change doesn't affect existing build tokens or processes, but once it is merged, build processes should be updated to create their builds with an app ID.

Also adds private builds, which also require a token to download from the build repo.

You must have the necessary prefix to create a build with an app ID. It
doesn't do anything yet, but in the future it will be used to control
access to other APIs.
For builds that have an app ID set, check that the presented build token
has that app prefix. This covers the build management endpoints, but not
yet build repo downloads or the status page.
Allow build repos to be set as public or private. If no app ID is set,
the default is public as before, but if an app ID *is* set, the default
is private (but in either case can be overridden). flat-manager-client gains
`--public_download`/`--no_public_download` flags to control this
behavior.

A private build requires a build token in order to download from it. A new scope
is added, "download", which allows listing and downloading builds.
@barthalion barthalion merged commit bcc96a3 into flatpak:master Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants