Commit Graph

392 Commits

Author SHA1 Message Date
Aumetra Weisman dd949ab51c
Lower dependency count (#533)
* remove some dependencies

* replace criterion with divan

* get rid of a rustls version

* remove buildscript

* replace anyhow dep

* Use patched versions of OpenTelemetry crates

* mount allocprofiler in benches

* use bench groups and args

* remove own util stuff
2024-05-12 17:34:10 +00:00
Aumetra Weisman 5b24f15880
Upgrade `retry-policies` (#532) 2024-05-10 20:04:21 +00:00
Aumetra Weisman 9911cc0658
Replace `std::sync::Arc` with `triomphe::Arc` (#530)
* Replace `std::sync::Arc` with `triomphe::Arc`

* Fix typo
2024-05-09 22:17:25 +02:00
Aumetra Weisman 03e8ca3cf9
Add `kitsune-derive` and use it throughout the project (#528)
* implement kitsune-derive

* Use on every service

* remove startup figlet
2024-05-09 17:24:26 +02:00
Aumetra Weisman 8586d06b1f
Update Meilisearch SDK (#527)
* upgrade meilisearch sdk

* restructure
2024-05-08 19:48:53 +02:00
Aumetra Weisman 5f79096014
Cache compiled WASM modules (#526)
* implement basic component cache

* wire up cache, add docs

* Add roundtrip test
2024-05-05 11:58:39 +02:00
Aumetra Weisman c9c36c40f8
MRF tool test coverage (#525)
* restructure tool

* add dummyfs

* remove polonius-the-crab

* add validate test

* add a few tests

* finish all tests

* stuff

* add missing manifest cases

* up

* aaaaa
2024-05-02 22:15:19 +00:00
Aumetra Weisman f42d425463
Decompose the job scheduler (#520)
* make job scheduler more modular

* up

* Move to traits

* up

* add redis feature

* add basic scheduling test

* use minio run by github actions

* update cargo-dist

* update openidconnect

* changes

* remove slow test

* up

* im cryign

* new snapshot
2024-04-29 20:35:47 +02:00
dependabot[bot] a247eb01ad
Bump rustls from 0.23.4 to 0.23.5 (#522)
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.4 to 0.23.5.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.4...v/0.23.5)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 20:07:28 +00:00
Aumetra Weisman 225e81b80a Rework error representation (#517)
* start error repr rework

* add kitsune-error crate

* progress

* rm unused dependencies

* progress

* progress

* progress

* progress

* finish

* fix checks

* fix tests

* enable serde for garde

* Add codecov token

* remove some more error enums

* remove another enum

* remove httperror

* improve somewhat

* make it possible to return responses as the 'body'

* use try-block polyfills everywhere
2024-04-08 01:32:31 +02:00
Aumetra Weisman dc2101927d
NGINX-looking fallback fallback, small improvements (#519)
* small improvements

* make fallback work

* remove potential boxing, move html into own file

* move into separate closure
2024-04-06 16:41:29 +00:00
dependabot[bot] 06a731d1c8
Bump h2 from 0.3.25 to 0.3.26 (#518)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.25...v0.3.26)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 18:31:16 +02:00
dependabot[bot] f205c5359b
Bump vite from 5.2.3 to 5.2.6 in /kitsune-fe (#516)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.3 to 5.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 19:20:57 +02:00
dependabot[bot] 8020d7d210
Bump wasmtime from 19.0.0 to 19.0.1 (#515)
Bumps [wasmtime](https://github.com/bytecodealliance/wasmtime) from 19.0.0 to 19.0.1.
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-some-possible-changes.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/compare/v19.0.0...v19.0.1)

---
updated-dependencies:
- dependency-name: wasmtime
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 02:03:35 +02:00
Aumetra Weisman 0a92aebfd1
Rust beta fixes (#514)
* rust beta that breaks stuff

* flake up

* replace with macros, replace miette

* progress

* progress

* finish

* up

* Update typos config

* format toml

* revert back to stable
2024-04-01 19:47:16 +00:00
perillamint 5b814bf674
Add CI sponsorship attribution (#513)
* Add CI sponsorship attribution

* Update README.md

---------

Co-authored-by: Aumetra Weisman <aumetra@cryptolab.net>
2024-03-29 13:29:43 +00:00
Harald Hoyer d68c5e3b17
Fix and improve the nix flake (#512)
* fix(flake): `public` assets were moved to `kitsune/assets`

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* feat(flake): use mold linker

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* fix(flake): fix build dependency for openssl

Native deps need the tools which run on the build host (when cross
compiling). Normal build deps are the libs linked to the binary.

OPENSSL_NO_VENDOR ensures that openssl-sys uses the system lib.

Remove the rest of the workarounds for openssl.

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* fix(flake): proper `mkYarnPackage`

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* feat(flake): add overlay test

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* fix(flake): skip more tests

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* feat(flake): use the crane nix lib

https://crane.dev/

enables caching of artifacts and potentially reducing build time.

Even End to End(E2E) testing could be added:
https://crane.dev/examples/end-to-end-testing.html

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* ci(flake): add nix github action

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* ci(flake): disable `cargo check` in nix flake

Left as a separate commit, so it is easy to revert.

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* ci(flake): run nixci in debug build by default

normal flake produces release code still.

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* ci(flake): build heavy stuff sequentially

and skip running nixci.

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* feat(flake): add `mrf-tool` and `kitsune-job-runner`

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

---------

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
2024-03-29 13:49:25 +01:00
Aumetra Weisman d45e8f656f
Update cargo deps (#511) 2024-03-27 17:57:56 +00:00
Aumetra Weisman 5f6144d8e3
Fix frontend build (#509)
* Fix frontend build

* Add frontend CI

* Rename step

* Cache v4

* Fix lints
2024-03-26 14:17:47 +00:00
Aumetra Weisman 9f4e606a66 Bump version 2024-03-24 01:01:24 +01:00
Aumetra Weisman 96de9876c3 Add TOML formatter and checks (#507)
* introduce toml formatter

* add formatting check

* Remove SCSS subcommand
2024-03-22 20:56:58 +01:00
Aumetra Weisman 2b0da5d039
Update everything (#506)
* cargo-related updates

* flake.lock: Update

Flake lock file updates:

• Updated input 'devenv':
    'github:cachix/devenv/6c0bad0045f1e1802f769f7890f6a59504825f4d' (2024-03-11)
  → 'github:cachix/devenv/63c7109f20b5ded0bc07f95ece9518bbb7fdea5b' (2024-03-22)
• Added input 'devenv/cachix':
    'github:cachix/cachix/661bbb7f8b55722a0406456b15267b5426a3bda6' (2024-03-15)
• Added input 'devenv/cachix/devenv':
    'github:cachix/devenv/2ee4450b0f4b95a1b90f2eb5ffea98b90e48c196' (2024-02-23)
• Added input 'devenv/cachix/devenv/flake-compat':
    follows 'devenv/cachix/flake-compat'
• Added input 'devenv/cachix/devenv/nix':
    'github:domenkozar/nix/ecd0af0c1f56de32cbad14daa1d82a132bf298f8' (2024-02-22)
• Added input 'devenv/cachix/devenv/nix/flake-compat':
    'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9' (2023-01-17)
• Added input 'devenv/cachix/devenv/nix/nixpkgs':
    follows 'devenv/cachix/devenv/nixpkgs'
• Added input 'devenv/cachix/devenv/nix/nixpkgs-regression':
    'github:NixOS/nixpkgs/215d4d0fd80ca5163643b03a33fde804a29cc1e2' (2022-01-24)
• Added input 'devenv/cachix/devenv/nixpkgs':
    'github:NixOS/nixpkgs/9201b5ff357e781bf014d0330d18555695df7ba8' (2023-08-23)
• Added input 'devenv/cachix/devenv/poetry2nix':
    'github:nix-community/poetry2nix/d5006be9c2c2417dafb2e2e5034d83fabd207ee3' (2023-08-24)
• Added input 'devenv/cachix/devenv/poetry2nix/flake-utils':
    'github:numtide/flake-utils/919d646de7be200f3bf08cb76ae1f09402b6f9b4' (2023-07-11)
• Added input 'devenv/cachix/devenv/poetry2nix/flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
• Added input 'devenv/cachix/devenv/poetry2nix/nix-github-actions':
    'github:nix-community/nix-github-actions/165b1650b753316aa7f1787f3005a8d2da0f5301' (2023-07-09)
• Added input 'devenv/cachix/devenv/poetry2nix/nix-github-actions/nixpkgs':
    follows 'devenv/cachix/devenv/poetry2nix/nixpkgs'
• Added input 'devenv/cachix/devenv/poetry2nix/nixpkgs':
    follows 'devenv/cachix/devenv/nixpkgs'
• Added input 'devenv/cachix/devenv/pre-commit-hooks':
    follows 'devenv/cachix/pre-commit-hooks'
• Added input 'devenv/cachix/flake-compat':
    'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04)
• Added input 'devenv/cachix/nixpkgs':
    follows 'devenv/nixpkgs'
• Added input 'devenv/cachix/pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/5df5a70ad7575f6601d91f0efec95dd9bc619431' (2024-02-15)
• Added input 'devenv/cachix/pre-commit-hooks/flake-compat':
    'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04)
• Added input 'devenv/cachix/pre-commit-hooks/flake-utils':
    'github:numtide/flake-utils/4022d587cbbfd70fe950c1e2083a02621806a725' (2023-12-04)
• Added input 'devenv/cachix/pre-commit-hooks/flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
• Added input 'devenv/cachix/pre-commit-hooks/gitignore':
    'github:hercules-ci/gitignore.nix/43e1aa1308018f37118e34d3a9cb4f5e75dc11d5' (2023-12-29)
• Added input 'devenv/cachix/pre-commit-hooks/gitignore/nixpkgs':
    follows 'devenv/cachix/pre-commit-hooks/nixpkgs'
• Added input 'devenv/cachix/pre-commit-hooks/nixpkgs':
    follows 'devenv/cachix/nixpkgs'
• Added input 'devenv/cachix/pre-commit-hooks/nixpkgs-stable':
    'github:NixOS/nixpkgs/3dc440faeee9e889fe2d1b4d25ad0f430d449356' (2024-01-10)
• Updated input 'devenv/flake-compat':
    'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9' (2023-01-17)
  → 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04)
• Updated input 'devenv/nix':
    'github:domenkozar/nix/7c91803598ffbcfe4a55c44ac6d49b2cf07a527f' (2023-02-16)
  → 'github:domenkozar/nix/c5bbf14ecbd692eeabf4184cc8d50f79c2446549' (2024-03-15)
• Added input 'devenv/nix/flake-compat':
    'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9' (2023-01-17)
• Removed input 'devenv/nix/lowdown-src'
• Updated input 'devenv/pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/ea96f0c05924341c551a797aaba8126334c505d2' (2024-01-08)
  → 'github:cachix/pre-commit-hooks.nix/5df5a70ad7575f6601d91f0efec95dd9bc619431' (2024-02-15)
• Updated input 'devenv/pre-commit-hooks/flake-utils':
    'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31)
  → 'github:numtide/flake-utils/4022d587cbbfd70fe950c1e2083a02621806a725' (2023-12-04)
• Updated input 'devenv/pre-commit-hooks/gitignore':
    'github:hercules-ci/gitignore.nix/a20de23b925fd8264fd7fad6454652e142fd7f73' (2022-08-14)
  → 'github:hercules-ci/gitignore.nix/43e1aa1308018f37118e34d3a9cb4f5e75dc11d5' (2023-12-29)
• Updated input 'devenv/pre-commit-hooks/nixpkgs-stable':
    'github:NixOS/nixpkgs/c37ca420157f4abc31e26f436c1145f8951ff373' (2023-06-03)
  → 'github:NixOS/nixpkgs/3dc440faeee9e889fe2d1b4d25ad0f430d449356' (2024-01-10)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/d691274a972b3165335d261cc4671335f5c67de9' (2024-03-14)
  → 'github:nixos/nixpkgs/20f77aa09916374aa3141cbc605c955626762c9a' (2024-03-21)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/7ff8e9a04ac7777a3446788cb4018b452157ab8a' (2024-03-15)
  → 'github:oxalica/rust-overlay/eec55ba9fcde6be4c63942827247e42afef7fafe' (2024-03-22)

* yarn up

* Remove snapshot from test

* toml fmt
2024-03-22 18:37:14 +00:00
Aumetra Weisman de7a7fd684
Extend test coverage (#505)
* increase test coverage

* add error for compact sequence, add serialize test

* change imports

* add dns verifier tests

* disable codecov comments

* add tests to id conversion

* use actual fqdn

* rm unused line

* use checkout v4

* add support for multiple digests, extend testing

* add test for missing header, use oneshot where possible

* move tests

* add redis test

* add graphql tests

* order tests

* up

* add decode test

* add encode and serialise tests, use btreeset for determinism

* test to_owned impl

* rename test
2024-03-21 23:18:23 +00:00
Aumetra Weisman b023a12b68
Install Codecov (#504)
* add codecov workflow

* use stable tarpaulin

* shorten machete workflow

* install without nix nor rust cache

* use llvm cov

* use shared instances

* rename
2024-03-17 18:36:09 +00:00
Aumetra Weisman 7c9e7acdde
Better parallel testing (#503)
* remove serial tests, connect to random databases and buckets

* fix redis

* remove unused deps

* share postgres and redis

* sleep between lock attempts

* rename examples
2024-03-17 17:05:48 +00:00
Aumetra Weisman b837e3b9f5
Add crate for DNS verification (#502)
* add dns verification library

* rename library, add test

* schema test

* add builder

* add tests

* remove unused enum case

* use builder internally

* add all the logic to the builder, remove new function

* fix position in cargo.toml
2024-03-17 14:17:55 +00:00
Aumetra Weisman 43cfc1747c
Easier testability via `testcontainers` (#499)
* factor out s3 client into own crate

* add alternate testability by using testcontainers

* comment out services in ci to test

* use ip

* unused deps

* debug

* update

* logtracer

* Enable API in actions

* remove tracing for tests

* fix local runs

* rm host auth

* remove empty execstart

* unset variables

* use nextest

* alphabetically sort

* up

* yarn up

* flake.lock: Update

Flake lock file updates:

• Updated input 'devenv':
    'github:cachix/devenv/4eccee9a19ad9be42a7859211b456b281d704313' (2024-03-05)
  → 'github:cachix/devenv/6c0bad0045f1e1802f769f7890f6a59504825f4d' (2024-03-11)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28)
  → 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/b8697e57f10292a6165a20f03d2f42920dfaf973' (2024-03-03)
  → 'github:nixos/nixpkgs/d691274a972b3165335d261cc4671335f5c67de9' (2024-03-14)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/e86c0fb5d3a22a5f30d7f64ecad88643fe26449d' (2024-03-05)
  → 'github:oxalica/rust-overlay/7ff8e9a04ac7777a3446788cb4018b452157ab8a' (2024-03-15)

* remove commented out lines

* add minio test harness

* add s3 test

* add serial_test annotation

* error out on no success

* better error message

* add body

* change bucket name

* abstract into shared function

* use quick-xml to encode

* multipart?

* fix typo

* set content-length

* simplify line

* set content length

* aggregate etags

* use stream utils instead of external counter

* send abort request on error

* rename future

* add from impl
2024-03-16 20:16:39 +00:00
Aumetra Weisman 9121549240
Add `clean` subcommand to `xtask` (#497) 2024-03-09 22:27:48 +00:00
Aumetra Weisman d24354f69e
WASM-based MRF (#490)
* add skeleton

* use wasmtime

* disable unused features

* add wit and codegen

* add initial component compilation

* update authors name

* rebuild if wit changed

* add config options and docs

* split into files

* add metadata functions

* stuff

* add test binary, add explainer

* progress

* enable async support

* fmt

* fix

* remove unwrap

* embed mrf into kitsune for incoming activities

* rename dir

* updates

* fmt

* disallow any network access

* up

* add manifest for mrf

* add manifest parser/serializer

* AAAAAAAAAAAAAAAAAAAA

* fix test, better diagnostics

* restrict version field to semver

* make schemars optional

* derive default

* convert `activityTypes` to set

* add `configSchema` field

* move mrf-manifest crate

* add license

* add mrf-tool to tree

* fix comment

* remove cfg flags

* add encode function

* add docs

* use simdutf8 where possible

* add description

* restructure commands

* restructure cli layout

* split up functions

* to_owned for manifest

* up

* rename to mrf, version in source

* load mrf module config and pass to the module

* log that config has been found

* add span instead of log level fields

* ensure span is used properly

* filter by activity types

* fix url encoding for international actors

* stuff

* fix

* add submodules

* add wit deps

* add wit readme

* exclude wit deps

* add logging to example

* add logging facade to wasm modules

* add tracing subscriber to wasm mrf test

* remove wasi-keyvalue

* create own keyvalue def

* add kv example

* add bucket example

* add storage backend support

* finish kv storage impl for fs

* up

* up yarn

* flake.lock: Update

Flake lock file updates:

• Updated input 'devenv':
    'github:cachix/devenv/5a30b9e5ac7c6167e61b1f4193d5130bb9f8defa' (2024-02-13)
  → 'github:cachix/devenv/4eccee9a19ad9be42a7859211b456b281d704313' (2024-03-05)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15)
  → 'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/a4d4fe8c5002202493e87ec8dbc91335ff55552c' (2024-02-15)
  → 'github:nixos/nixpkgs/b8697e57f10292a6165a20f03d2f42920dfaf973' (2024-03-03)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/4ee92bf124fbc4e157cbce1bc2a35499866989fc' (2024-02-16)
  → 'github:oxalica/rust-overlay/e86c0fb5d3a22a5f30d7f64ecad88643fe26449d' (2024-03-05)

* up fuzz

* add licenses

* get rid of futures-retry-policies

* up

* up

* fix warning

* update ci

* add redis skeleton

* impl redis backend

* introduce module name to backend

* add configurable redis backend

* rename

* progress

* remove from fetcher
2024-03-09 12:21:15 +00:00
Aumetra Weisman cfd8a7636b
Simplify `masto_id_convert` (#496) 2024-03-07 16:55:26 +01:00
Daiki Mizukami 3879c49f8b
Add helpers to deserialise JSON-LD in a more robust way (#492)
* Add helpers to deserialise JSON-LD in a more robust way

* Add brief introduction to JSON-LD data model

* Fix deserialisation of `Option<_>` fields

Workaround for <https://github.com/serde-rs/serde/issues/723>.

* Remove `AttributedToListEntry` type

* Minor cleanup

* Replace `&x[..]` with `x.as_str()`

Per review comment at:

<https://github.com/kitsune-soc/kitsune/pull/492#discussion_r1502774399>.

Co-Authored-By: Aumetra Weisman <aumetra@cryptolab.net>

---------

Co-authored-by: Aumetra Weisman <aumetra@cryptolab.net>
2024-03-07 15:45:15 +00:00
Aumetra Weisman a919bdf7d1
Clock mocking for `http-signatures` (#495)
* add clock mock lib

* remove arc-swap

* use refcell

* move section

* use mock library in http-signatures

* change imports

* add expiration test

* only store a weak reference in mock handle
2024-03-06 23:13:30 +00:00
dependabot[bot] 2416c25559
Bump mio from 0.8.10 to 0.8.11 (#494)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 22:17:01 +00:00
Aumetra Weisman 1324fcb09a
Custom Redis pool (#485)
* add own pool, start migration

* add own pool, start migration

* add proper licensing

* add get_ref func

* upgrade

* add new fn

* port athena example

* port job runner

* progress

* finish

* fix features

* enable tokio-rustls-comp feature in kitsune (not only in kitsune-job-runner)

* fix features

* up
2024-02-23 20:17:46 +00:00
Aumetra Weisman f368c29a44
HTTP signatures rewrite (#488)
* begin impl

* up and pin metrics to avoid their ahash locking

* switch around (alphabetical order :D )

* move to lib dir

* move blocking library to lib, rename to blowocking

* full parsing into struct

* add span tracking and small example

* add feature

* up

* up yarn

* flake.lock: Update

Flake lock file updates:

• Updated input 'devenv':
    'github:cachix/devenv/0e68853bb27981a4ffd7a7225b59ed84f7180fc7' (2024-02-03)
  → 'github:cachix/devenv/5a30b9e5ac7c6167e61b1f4193d5130bb9f8defa' (2024-02-13)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/e92b6015881907e698782c77641aa49298330223' (2024-02-02)
  → 'github:nixos/nixpkgs/a4d4fe8c5002202493e87ec8dbc91335ff55552c' (2024-02-15)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/61dfa5a8129f7edbe9150253c68f673f87b16fb1' (2024-02-05)
  → 'github:oxalica/rust-overlay/4ee92bf124fbc4e157cbce1bc2a35499866989fc' (2024-02-16)

* change iteration method

* use derive-builder for http-signatures

* use indexing to get rid of quotation marks

* fix for numeral values

* very important

* add subset fn over slices, add proptest to verify

* add basic checks

* define error

* logic to construct the signing string

* remove shrink to fit

* add basic test

* add tests

* up

* add construction bench

* import fmt

* add signing logic

* add verify logic

* add serialization logic

* add crypto module

* add skeleton for the easy api

* add safety checks

* move check

* add tracing

* add easy verify function

* add easy signing

* move to something like type-state

* rm outdated comment

* fix warning

* generalize param

* respect expires duration

* add clock skew adjustment

* add note about supported methods

* add documentation

* simplify

* add docs

* clock skew

* banish the booleans

* add parser for private keys

* update easy api

* up

* delete old impl

* progress

* finish port

* up hyper

* rm unused dependency

* up

* use std hint

* add tests

* typos exclude

* stuff
2024-02-23 18:25:12 +00:00
aumetra 241eca91ad Update fuzzing harnesses 2024-02-10 16:58:43 +01:00
aumetra 00773b5358
Migrate away from Deadpool to BB8 for database connections (#486)
* port db connections to bb8

* up

* change generics
2024-02-10 15:00:46 +00:00
aumetra 4116b4436e
Relicense Kitsune (#479)
* Add licenses, adjust README

* Add license clarification

* add MIT copyright header back

* add spdx identifiers to cargo.toml, add symlinks

* add agpl spdx id, add symlinks

* Prepare license change without all okays

* remove relicense notice

* Revert last commit

* Re-add spacing
2024-02-09 14:10:59 +00:00
aumetra c205e856ab Use background thread to load certificates 2024-02-05 22:21:57 +01:00
aumetra 4b332cddbc
Update dependencies (#483)
* cargo up

* yarn up

* flake.lock: Update

Flake lock file updates:

• Updated input 'devenv':
    'github:cachix/devenv/ad0ae333b210e31237e1fc4a7ddab71a01785add' (2024-01-23)
  → 'github:cachix/devenv/0e68853bb27981a4ffd7a7225b59ed84f7180fc7' (2024-02-03)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/c002c6aa977ad22c60398daaa9be52f2203d0006' (2024-01-27)
  → 'github:nixos/nixpkgs/e92b6015881907e698782c77641aa49298330223' (2024-02-02)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/246ba7102553851af60e0382f558f6bc5f63fa13' (2024-01-29)
  → 'github:oxalica/rust-overlay/61dfa5a8129f7edbe9150253c68f673f87b16fb1' (2024-02-05)
2024-02-05 20:09:33 +00:00
aumetra b1d0bb81e5 Add new `dist-smol` profile 2024-02-02 16:59:59 +01:00
aumetra 0b19a484c8
Make language detection more configurable (#481)
* remove feature flags, up

* add config

* fix panics with whichlang backend

* up

* flake.lock: Update

Flake lock file updates:

• Updated input 'devenv':
    'github:cachix/devenv/ff37923d4ba9e220b9826594e83fc29e1a4f4338' (2024-01-16)
  → 'github:cachix/devenv/ad0ae333b210e31237e1fc4a7ddab71a01785add' (2024-01-23)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/842d9d80cfd4560648c785f8a4e6f3b096790e19' (2024-01-17)
  → 'github:nixos/nixpkgs/c002c6aa977ad22c60398daaa9be52f2203d0006' (2024-01-27)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/ff3e4b3ee418009886848d48e4ba236a2f9de789' (2024-01-18)
  → 'github:oxalica/rust-overlay/246ba7102553851af60e0382f558f6bc5f63fa13' (2024-01-29)

* document feature

* fix example config

* remove docker config
2024-01-29 18:26:52 +00:00
aumetra f2d804054f
Move `kitsune-retry-policies` into `lib/` directory (#478) 2024-01-27 12:31:44 +00:00
aumetra 0541ddf7e8
restructure readme, add spellcheck, fix typos (#476) 2024-01-21 10:54:29 +00:00
aumetra 4ea10e930f
Add ability to connect to database with TLS (#475)
* Add TLS capability

* Add default annotation

* add tls config docs
2024-01-20 17:56:23 +00:00
aumetra 995286730a
Revert back to Rust stable (#473) 2024-01-20 16:02:56 +00:00
dependabot[bot] be0e89b99b
Bump vite from 5.0.11 to 5.0.12 in /kitsune-fe (#472)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.11 to 5.0.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 07:53:15 +00:00
aumetra 91f377a987
Update dependencies (#471)
* cargo up

* flake.lock: Update

Flake lock file updates:

• Updated input 'devenv':
    'github:cachix/devenv/e681a99ffe2d2882f413a5d771129223c838ddce' (2023-12-14)
  → 'github:cachix/devenv/ff37923d4ba9e220b9826594e83fc29e1a4f4338' (2024-01-16)
• Updated input 'devenv/pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/5843cf069272d92b60c3ed9e55b7a8989c01d4c7' (2023-06-29)
  → 'github:cachix/pre-commit-hooks.nix/ea96f0c05924341c551a797aaba8126334c505d2' (2024-01-08)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/4022d587cbbfd70fe950c1e2083a02621806a725' (2023-12-04)
  → 'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/a9bf124c46ef298113270b1f84a164865987a91c' (2023-12-11)
  → 'github:nixos/nixpkgs/842d9d80cfd4560648c785f8a4e6f3b096790e19' (2024-01-17)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/d7aaf97c7c5ea7b4198ef85d3d66b3dfe5c6ce57' (2023-12-15)
  → 'github:oxalica/rust-overlay/ff3e4b3ee418009886848d48e4ba236a2f9de789' (2024-01-18)

* yarn up

* up cargo-dist

* use non-git dep
2024-01-18 19:40:45 +00:00
aumetra dbcfa9bd1a
Verify HTTP digest for inbox in a streaming fashion (#466)
* empty crate

* layer and service skeleton

* whatever

* finish or smth

* basic tests

* apply digest layer to inbox

* migrate to axum body to limit body size configurably

* Update lib/tower-http-digest/tests/no_digest.rs

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>

* Update lib/tower-http-digest/tests/no_digest.rs

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>

* Move header parsing to own state step

* replace unwrap with expect for better diagnostics

* start body impl

* finish digest

* restructure

* Update lib/tower-http-digest/src/lib.rs

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>

* Update lib/tower-http-digest/tests/digest.rs

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>

* Update lib/tower-http-digest/tests/digest.rs

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>

* Update lib/tower-http-digest/src/lib.rs

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>

* fix lints

* avoid allocation

* return http responses and emit tracing logs instead of returning service errors

* misc

---------

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>
2024-01-15 13:48:51 +00:00
aumetra 448192fdf1 Bump version 2024-01-14 21:46:03 +01:00