Skip to content
Snippets Groups Projects
Commit 7620afae authored by Adrian Alves's avatar Adrian Alves
Browse files

Update README.md

parent 056c0eb7
No related branches found
No related tags found
No related merge requests found
Pipeline #76981 canceled
......@@ -17,24 +17,38 @@ server set it in front of the compose.
all the configurations neet to be placed at config.json file
there you can place the repo name set'ed in the DNS and in the webserver.
Repositories
#Repositories
flat-manager maintains a set of repositories specified in the configuration, as well as a set of dynamically generated repositories beneath the configured build-repo-base path. For testing with the example configuration, these can be initialized by doing:
```
ostree --repo=repo init --mode=archive-z2
ostree --repo=beta-repo init --mode=archive-z2
mkdir build-repo
```
On a deployed system, these should be stored elsewhere, but make sure they are on the same filesystem so that hardlinks work between them as otherwise performance will be degraded.
Tokens
#Tokens
All requests to the API require a token. Token are signed with a secret that has to be stored on the server. The default configuration contains:
```
"secret": "c2VjcmV0"
```
This is base64 of "secret", so don't use this in production, but it works for local testing. Otherwise, you can generate one based on some random data:
```
dd bs=256 count=1 if=/dev/random of=/dev/stdout | base64 -w 0
Each token can have various levels of privileges. For example one could let you do everything, while another would only allow you to upload builds to a particular build. There is an API to subset your token for sharing with others (for example sending the above upload-only token to a builder), but you can also generate a token with the gentoken command:
```
Each token can have various levels of privileges. For example one could let you do everything, while another would only allow you to upload builds to a particular build. There is an API to subset your token for sharing with others (for example sending the above upload-only token to a builder), but you can also generate a token with the gentoken command:
```
echo -n "secret" | base64 | cargo run --bin gentoken -- --base64 --secret-file - --name testtoken
```
The above matches the default secret, so can be used for testing.
The client takes tokens via either the --token argument or in the REPO_TOKEN environment variable.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment