+ system design mock
This commit is contained in:
parent
8f358517e5
commit
e1cef70830
5 changed files with 76 additions and 5 deletions
21
assets/Design.svg
Normal file
21
assets/Design.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 88 KiB |
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
= Architecture
|
= Architecture
|
||||||
|
|
||||||
|
#include "./architecture/System-Design.typ"
|
||||||
#include "./architecture/Dynamic-Routing.typ"
|
#include "./architecture/Dynamic-Routing.typ"
|
||||||
|
|
|
||||||
49
chapters/architecture/System-Design.typ
Normal file
49
chapters/architecture/System-Design.typ
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
== System Design
|
||||||
|
|
||||||
|
|
||||||
|
Engines:
|
||||||
|
|
||||||
|
Der Engines Ordner enthält Subfolder
|
||||||
|
für die jeweilige Engine unterteilt
|
||||||
|
in Logik, Structs unt Tests
|
||||||
|
|
||||||
|
|
||||||
|
Storage:
|
||||||
|
|
||||||
|
Momentan beschränken wir uns auf SQLite
|
||||||
|
über SQLX ohne ORM
|
||||||
|
|
||||||
|
#figure(
|
||||||
|
image("../../assets/Design.svg", width: 80%),
|
||||||
|
caption: [
|
||||||
|
The acting components of rvault.
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=== Problem Description
|
||||||
|
|
||||||
|
// + The API to implement e.g. has the concept of mount points (similar to how filesystems can be mounted on UNIX-like systems).
|
||||||
|
// Mount points can contain multiple slashes.
|
||||||
|
// For example `/v1/some/mount/point/data/some/path/secret` may consist of a mount point `some/mount/point` and further, following routes of the mapped secret engine. //TODO
|
||||||
|
// In this example, `/data` is related to the Key-Value engine and `/some/path/secret` specifies a path within the secret engine instance mounted at the mount point.
|
||||||
|
// This implies a significant problem:
|
||||||
|
// How to determinate what part of the URL displays a mount point, where it is not certan, what the postfix of the URL will be (this problem follows).
|
||||||
|
|
||||||
|
// + Another problem is that based on the mount point, the request must be processed by the applicable secret engine.
|
||||||
|
// Based on context, stored on the DBMS, the request must be passed to the secret engine along with the determinated mount point.
|
||||||
|
|
||||||
|
=== Solution
|
||||||
|
|
||||||
|
// Secret Engines have their dedicated router.
|
||||||
|
// The main router has an instance of these routers along with the database pool wrapped within a struct in its state.
|
||||||
|
// The router instances have a reference to the database pool, which is internally wrapped by an Atomic Reference Counter (`Arc`).
|
||||||
|
|
||||||
|
// Upon a requst, the remaining path is obtained (via `/+mount_path`).
|
||||||
|
// Then, the path is looked up at the database, also requsting the engine type.
|
||||||
|
// If not found, the last last slash character and the following string is removed and looked up again. This is repeated, until the path either is found or has a length of zero, rejecting the request as "404 Not Found".
|
||||||
|
|
||||||
|
// If found, the router is called with the request and mount path is given to the router as an "Extension".
|
||||||
|
// The `call` #link("https://docs.rs/tower/0.4.13/tower/trait.Service.html#tymethod.call")[(link)]
|
||||||
|
// function which Axum routers inherit from the Tower crate, allows to hand the request over to engine's router.
|
||||||
|
|
@ -3,15 +3,15 @@
|
||||||
#show: arkheion.with(
|
#show: arkheion.with(
|
||||||
title: [Secret Management with rvault],
|
title: [Secret Management with rvault],
|
||||||
authors: (
|
authors: (
|
||||||
(name: "Samuel", email: "user@domain.com", affiliation: "HPE", orcid: "0000-0000-0000-0000"),
|
(name: "Samuel", email: "inf22036@lehre.dhbw-stuttgart.de", affiliation: "HPE"),
|
||||||
(name: "Philip Herz", email: "inf22175@lehre.dhbw-stuttgart.de", affiliation: "HPE"),
|
(name: "Philip Herz", email: "inf22175@lehre.dhbw-stuttgart.de", affiliation: "HPE"),
|
||||||
(name: "Laurenz Noffke", email: "laurenz.noffke+but-id-replace-it-with-matrikel@hpe.com", affiliation: [HPE]),
|
(name: "(Laurenz Noffke)", email: "", affiliation: "HPE"),
|
||||||
),
|
),
|
||||||
// Insert your abstract after the colon, wrapped in brackets.
|
// Insert your abstract after the colon, wrapped in brackets.
|
||||||
// Example: `abstract: [This is my abstract...]`
|
// Example: `abstract: [This is my abstract...]`
|
||||||
// abstract: [lorem(55)],
|
// abstract: [lorem(55)],
|
||||||
// keywords: ("First keyword", "Second keyword", "etc."),
|
// keywords: ("First keyword", "Second keyword", "etc."),
|
||||||
date: "2024-04-10",
|
date: "2024-06-02",
|
||||||
)
|
)
|
||||||
|
|
||||||
#include "./chapters/01-Project-Requirements.typ"
|
#include "./chapters/01-Project-Requirements.typ"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
Secret Management with rvault
|
Secret Management with rvault
|
||||||
|
|
||||||
Groupmembers:
|
Groupmembers:
|
||||||
Samuel Possemeyer
|
Samuel Possemeyer - inf22036@lehre.dhbw-stuttgart.de - 2950593
|
||||||
Philip Herz - inf22715@lehre.dhbw-stuttgart.de
|
Philip Herz - inf22715@lehre.dhbw-stuttgart.de
|
||||||
Laurenz Noffke
|
(Laurenz Noffke)
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
The goal is to rewrite a part of the Hashicorp vault in Rust.
|
The goal is to rewrite a part of the Hashicorp vault in Rust.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue