mirror of
https://github.com/bitwarden/server
synced 2026-01-28 15:23:38 +00:00
Get back to workspace building
This commit is contained in:
@@ -2,41 +2,23 @@
|
||||
//! Requires both read and write permissions to the underlying data stores.
|
||||
//! There should only be one instance of this running at a time for a given AKD.
|
||||
|
||||
use akd_storage::db_config::DbConfig;
|
||||
use common::VrfStorageType;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
#[tokio::main]
|
||||
#[allow(unreachable_code)]
|
||||
async fn main() {
|
||||
tracing_subscriber::fmt()
|
||||
.with_max_level(tracing::Level::TRACE)
|
||||
.init();
|
||||
let env_filter = EnvFilter::builder()
|
||||
.with_default_directive(tracing::level_filters::LevelFilter::INFO.into())
|
||||
.from_env_lossy();
|
||||
|
||||
let connection_string = std::env::var("AKD_MSSQL_CONNECTION_STRING")
|
||||
.expect("AKD_MSSQL_CONNECTION_STRING must be set.");
|
||||
let db_config = DbConfig::MsSql {
|
||||
connection_string,
|
||||
pool_size: 10,
|
||||
};
|
||||
tracing_subscriber::fmt().with_env_filter(env_filter).init();
|
||||
|
||||
let db = db_config
|
||||
.connect()
|
||||
.await
|
||||
.expect("Failed to connect to database");
|
||||
let vrf = VrfStorageType::HardCodedAkdVRF;
|
||||
|
||||
// Start the publisher write job
|
||||
let _write_job_handle = {
|
||||
let db = db.clone();
|
||||
let vrf = vrf.clone();
|
||||
tokio::spawn(async move {
|
||||
publisher::start_write_job(db, vrf).await;
|
||||
})
|
||||
};
|
||||
|
||||
// Create a router with both publisher and reader routes
|
||||
// Load config and convert to publisher and reader configs
|
||||
todo!();
|
||||
|
||||
// Start the web server
|
||||
// Start publisher task
|
||||
todo!();
|
||||
|
||||
// Start reader task
|
||||
todo!();
|
||||
}
|
||||
|
||||
@@ -237,12 +237,6 @@ impl VrfKeyTableData {
|
||||
VrfKeyConfig::B64EncodedSymmetricKey { key: _ } => {
|
||||
let root_key_hash = config.root_key_hash().map_err(|_| VrfKeyCreationError)?;
|
||||
|
||||
error!(
|
||||
rkh = root_key_hash.len(),
|
||||
sevk = sym_enc_vrf_key.len(),
|
||||
sevkn = nonce.len(),
|
||||
"lengths of stuff!!!!!\n\n\n\n"
|
||||
);
|
||||
Ok((
|
||||
VrfKeyTableData {
|
||||
root_key_hash,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use akd::Directory;
|
||||
use akd_storage::akd_storage_config::AkdStorageConfig;
|
||||
use akd_storage::db_config::{DatabaseType, DbConfig};
|
||||
use akd_storage::AkdDatabase;
|
||||
|
||||
Reference in New Issue
Block a user