https://github.com/kernelci/kernelci-storage
https://github.com/kernelci/kernelci-storage
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kernelci/kernelci-storage
- Owner: kernelci
- Created: 2024-12-21T20:27:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-20T13:50:36.000Z (12 months ago)
- Last Synced: 2025-08-07T14:23:06.873Z (11 months ago)
- Language: Rust
- Size: 59.6 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# KernelCI Storage Server
This is a simple storage server that supports file upload and download, with token based authentication.
It supports multiple backends, currently only Azure Blob is supported, to provide user transparent storage.
It caches the files in a local directory and serves them from there.
Range requests are supported, but only for start offset, end limit is not implemented yet.
## Configuration
The server is configured using toml configuration file, the default configuration file is `config.toml`.
```toml
jwt_secret="JWT_SECRET"
[azure]
account=""
key=""
container=""
sastoken=""
```
## Creating user tokens
The server uses JWT token based authentication. The token is passed in the `Authorization` header as a Bearer token.
JWT secret is configured in the `config.toml` file.
```bash
./kernelci-storage -generate_jwt_token user@email.com
```
This will generate a JWT token for the user.
### Testing Token Validity
You can verify if a token is valid using the `/v1/checkauth` endpoint:
```bash
curl -X GET http://localhost:3000/v1/checkauth \
-H "Authorization: Bearer "
```
**Responses:**
- `200 OK` with body `Authorized: user@email.com` - Token is valid
- `401 Unauthorized` with body `Unauthorized` - Token is invalid or missing
## API
See [docs](docs/) for the API documentation.