Complete the rename of the project from rsidm to kanidm

This commit is contained in:
William Brown 2019-09-14 15:44:08 +02:00
parent 75ad3ced51
commit 0433a0a1d4
58 changed files with 100 additions and 99 deletions

View file

@ -1,9 +1,9 @@
[workspace] [workspace]
members = [ members = [
"rsidm_proto", "kanidm_proto",
"rsidmd", "kanidmd",
"rsidm_client", "kanidm_client",
"rsidm_tools", "kanidm_tools",
] ]

View file

@ -3,9 +3,9 @@ MAINTAINER william@blackhats.net.au
EXPOSE 8080 EXPOSE 8080
COPY . /home/rsidm/ COPY . /home/kanidm/
WORKDIR /home/rsidm/ WORKDIR /home/kanidm/
RUN zypper install -y timezone cargo rust gcc sqlite3-devel libopenssl-devel && \ RUN zypper install -y timezone cargo rust gcc sqlite3-devel libopenssl-devel && \
RUSTC_BOOTSTRAP=1 cargo build --release && \ RUSTC_BOOTSTRAP=1 cargo build --release && \
@ -18,5 +18,5 @@ RUN cd /etc && \
VOLUME /data VOLUME /data
ENV RUST_BACKTRACE 1 ENV RUST_BACKTRACE 1
CMD ["/home/rsidm/target/release/rsidmd", "server", "-D", "/data/kanidm.db"] CMD ["/home/kanidm/target/release/kanidmd", "server", "-D", "/data/kanidm.db"]

View file

@ -54,12 +54,12 @@ let's encrypt, but if this is not possible, please use our insecure cert tool:
You can now build and run the server with: You can now build and run the server with:
cd rsidmd cd kanidm
cargo run -- server -D /tmp/kanidm.db -C ../insecure/ca.pem -c ../insecure/cert.pem -k ../insecure/key.pem --domain localhost --bindaddr 127.0.0.1:8080 cargo run -- server -D /tmp/kanidm.db -C ../insecure/ca.pem -c ../insecure/cert.pem -k ../insecure/key.pem --domain localhost --bindaddr 127.0.0.1:8080
In a new terminal, you can now build and run the client tools with: In a new terminal, you can now build and run the client tools with:
cd rsidm_tools cd kanidm_tools
cargo run -- --help cargo run -- --help
cargo run -- whoami -H https://localhost:8080 -D anonymous -C ../insecure/ca.pem cargo run -- whoami -H https://localhost:8080 -D anonymous -C ../insecure/ca.pem
@ -165,8 +165,9 @@ git rebase --abort
## Why do I see rsidm references? ## Why do I see rsidm references?
The original project name was rsidm while it was a thought experiment. Now that it's growing The original project name was rsidm while it was a thought experiment. Now that it's growing
and developing, we gave it a better project name. Kani is Japanese for "crab". Rust's mascot and developing, we gave it a better project name. Kani is Japanese for "crab". Rust's mascot is a crab.
is a crab. It all works out in the end. Idm is the common industry term for identity management services.
It all works out in the end.

View file

@ -1,5 +1,5 @@
[package] [package]
name = "rsidm_client" name = "kanidm_client"
version = "0.1.0" version = "0.1.0"
authors = ["William Brown <william@blackhats.net.au>"] authors = ["William Brown <william@blackhats.net.au>"]
edition = "2018" edition = "2018"
@ -8,11 +8,11 @@ edition = "2018"
log = "0.4" log = "0.4"
env_logger = "0.6" env_logger = "0.6"
reqwest = "0.9" reqwest = "0.9"
rsidm_proto = { path = "../rsidm_proto" } kanidm_proto = { path = "../kanidm_proto" }
serde_json = "1.0" serde_json = "1.0"
[dev-dependencies] [dev-dependencies]
tokio = "0.1" tokio = "0.1"
actix = "0.7" actix = "0.7"
rsidm = { path = "../rsidmd" } kanidm = { path = "../kanidmd" }
futures = "0.1" futures = "0.1"

View file

@ -10,7 +10,7 @@ use reqwest;
use std::fs::File; use std::fs::File;
use std::io::Read; use std::io::Read;
use rsidm_proto::v1::{ use kanidm_proto::v1::{
AuthCredential, AuthRequest, AuthResponse, AuthState, AuthStep, CreateRequest, Entry, AuthCredential, AuthRequest, AuthResponse, AuthState, AuthStep, CreateRequest, Entry,
OperationResponse, UserAuthToken, WhoamiResponse, OperationResponse, UserAuthToken, WhoamiResponse,
}; };
@ -24,12 +24,12 @@ pub enum ClientError {
} }
#[derive(Debug)] #[derive(Debug)]
pub struct RsidmClient { pub struct KanidmClient {
client: reqwest::Client, client: reqwest::Client,
addr: String, addr: String,
} }
impl RsidmClient { impl KanidmClient {
pub fn new(addr: &str, ca: Option<&str>) -> Self { pub fn new(addr: &str, ca: Option<&str>) -> Self {
let ca = ca.map(|ca_path| { let ca = ca.map(|ca_path| {
//Okay we have a ca to add. Let's read it in and setup. //Okay we have a ca to add. Let's read it in and setup.
@ -50,7 +50,7 @@ impl RsidmClient {
let client = client_builder let client = client_builder
.build() .build()
.expect("Unexpected reqwest builder failure!"); .expect("Unexpected reqwest builder failure!");
RsidmClient { KanidmClient {
client: client, client: client,
addr: addr.to_string(), addr: addr.to_string(),
} }

View file

@ -6,16 +6,16 @@ extern crate log;
extern crate actix; extern crate actix;
use actix::prelude::*; use actix::prelude::*;
extern crate rsidm; extern crate kanidm;
extern crate rsidm_client; extern crate kanidm_client;
extern crate rsidm_proto; extern crate kanidm_proto;
extern crate serde_json; extern crate serde_json;
use rsidm_client::RsidmClient; use kanidm_client::KanidmClient;
use rsidm::config::{Configuration, IntegrationTestConfig}; use kanidm::config::{Configuration, IntegrationTestConfig};
use rsidm::core::create_server_core; use kanidm::core::create_server_core;
use rsidm_proto::v1::Entry; use kanidm_proto::v1::Entry;
extern crate reqwest; extern crate reqwest;
@ -35,8 +35,8 @@ static ADMIN_TEST_PASSWORD: &'static str = "integration test admin password";
// Test external behaviorus of the service. // Test external behaviorus of the service.
fn run_test(test_fn: fn(RsidmClient) -> ()) { fn run_test(test_fn: fn(KanidmClient) -> ()) {
// ::std::env::set_var("RUST_LOG", "actix_web=debug,rsidm=debug"); // ::std::env::set_var("RUST_LOG", "actix_web=debug,kanidm=debug");
let _ = env_logger::builder().is_test(true).try_init(); let _ = env_logger::builder().is_test(true).try_init();
let (tx, rx) = mpsc::channel(); let (tx, rx) = mpsc::channel();
let port = PORT_ALLOC.fetch_add(1, Ordering::SeqCst); let port = PORT_ALLOC.fetch_add(1, Ordering::SeqCst);
@ -71,7 +71,7 @@ fn run_test(test_fn: fn(RsidmClient) -> ()) {
// Setup the client, and the address we selected. // Setup the client, and the address we selected.
let addr = format!("http://127.0.0.1:{}", port); let addr = format!("http://127.0.0.1:{}", port);
let rsclient = RsidmClient::new(addr.as_str(), None); let rsclient = KanidmClient::new(addr.as_str(), None);
test_fn(rsclient); test_fn(rsclient);
@ -82,7 +82,7 @@ fn run_test(test_fn: fn(RsidmClient) -> ()) {
#[test] #[test]
fn test_server_create() { fn test_server_create() {
run_test(|rsclient: RsidmClient| { run_test(|rsclient: KanidmClient| {
let e: Entry = serde_json::from_str( let e: Entry = serde_json::from_str(
r#"{ r#"{
"attrs": { "attrs": {
@ -109,7 +109,7 @@ fn test_server_create() {
#[test] #[test]
fn test_server_whoami_anonymous() { fn test_server_whoami_anonymous() {
run_test(|rsclient: RsidmClient| { run_test(|rsclient: KanidmClient| {
// First show we are un-authenticated. // First show we are un-authenticated.
let pre_res = rsclient.whoami(); let pre_res = rsclient.whoami();
// This means it was okay whoami, but no uat attached. // This means it was okay whoami, but no uat attached.
@ -131,7 +131,7 @@ fn test_server_whoami_anonymous() {
#[test] #[test]
fn test_server_whoami_admin_simple_password() { fn test_server_whoami_admin_simple_password() {
run_test(|rsclient: RsidmClient| { run_test(|rsclient: KanidmClient| {
// First show we are un-authenticated. // First show we are un-authenticated.
let pre_res = rsclient.whoami(); let pre_res = rsclient.whoami();
// This means it was okay whoami, but no uat attached. // This means it was okay whoami, but no uat attached.

View file

@ -1,5 +1,5 @@
[package] [package]
name = "rsidm_proto" name = "kanidm_proto"
version = "0.1.0" version = "0.1.0"
authors = ["William Brown <william@blackhats.net.au>"] authors = ["William Brown <william@blackhats.net.au>"]
edition = "2018" edition = "2018"

View file

@ -1,5 +1,5 @@
[package] [package]
name = "rsidm_tools" name = "kanidm_tools"
version = "0.1.0" version = "0.1.0"
authors = ["William Brown <william@blackhats.net.au>"] authors = ["William Brown <william@blackhats.net.au>"]
edition = "2018" edition = "2018"
@ -9,7 +9,7 @@ name = "kanidm"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
rsidm_client = { path = "../rsidm_client" } kanidm_client = { path = "../kanidm_client" }
rpassword = "0.4" rpassword = "0.4"
structopt = { version = "0.2", default-features = false } structopt = { version = "0.2", default-features = false }
log = "0.4" log = "0.4"

View file

@ -1,5 +1,5 @@
extern crate structopt; extern crate structopt;
use rsidm_client::RsidmClient; use kanidm_client::KanidmClient;
use std::path::PathBuf; use std::path::PathBuf;
use structopt::StructOpt; use structopt::StructOpt;
extern crate env_logger; extern crate env_logger;
@ -19,9 +19,9 @@ struct CommonOpt {
} }
impl CommonOpt { impl CommonOpt {
fn to_client(&self) -> RsidmClient { fn to_client(&self) -> KanidmClient {
let ca_path: Option<&str> = self.ca_path.as_ref().map(|p| p.to_str().unwrap()); let ca_path: Option<&str> = self.ca_path.as_ref().map(|p| p.to_str().unwrap());
RsidmClient::new(self.addr.as_str(), ca_path) KanidmClient::new(self.addr.as_str(), ca_path)
} }
} }
@ -43,9 +43,9 @@ fn main() {
let opt = ClientOpt::from_args(); let opt = ClientOpt::from_args();
if opt.debug() { if opt.debug() {
::std::env::set_var("RUST_LOG", "kanidm=debug,rsidm_client=debug"); ::std::env::set_var("RUST_LOG", "kanidm=debug,kanidm_client=debug");
} else { } else {
::std::env::set_var("RUST_LOG", "kanidm=info,rsidm_client=info"); ::std::env::set_var("RUST_LOG", "kanidm=info,kanidm_client=info");
} }
env_logger::init(); env_logger::init();

View file

@ -1,23 +1,23 @@
# cargo-features = ["default-run"] # cargo-features = ["default-run"]
[package] [package]
name = "rsidm" name = "kanidm"
version = "0.1.0" version = "0.1.0"
authors = ["William Brown <william@blackhats.net.au>"] authors = ["William Brown <william@blackhats.net.au>"]
# default-run = "rsidm_core" # default-run = "kanidm_core"
edition = "2018" edition = "2018"
[lib] [lib]
name = "rsidm" name = "kanidm"
path = "src/lib/lib.rs" path = "src/lib/lib.rs"
[[bin]] [[bin]]
name = "rsidmd" name = "kanidmd"
path = "src/server/main.rs" path = "src/server/main.rs"
[dependencies] [dependencies]
rsidm_proto = { path = "../rsidm_proto" } kanidm_proto = { path = "../kanidm_proto" }
actix = "0.7" actix = "0.7"
actix-web = { version = "0.7", features = ["ssl"] } actix-web = { version = "0.7", features = ["ssl"] }

View file

@ -16,8 +16,8 @@
// //
use concread::cowcell::{CowCell, CowCellReadTxn, CowCellWriteTxn}; use concread::cowcell::{CowCell, CowCellReadTxn, CowCellWriteTxn};
use rsidm_proto::v1::Filter as ProtoFilter; use kanidm_proto::v1::Filter as ProtoFilter;
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use uuid::Uuid; use uuid::Uuid;

View file

@ -7,12 +7,12 @@ use crate::event::{
AuthEvent, CreateEvent, DeleteEvent, ModifyEvent, PurgeRecycledEvent, PurgeTombstoneEvent, AuthEvent, CreateEvent, DeleteEvent, ModifyEvent, PurgeRecycledEvent, PurgeTombstoneEvent,
SearchEvent, SearchResult, WhoamiResult, SearchEvent, SearchResult, WhoamiResult,
}; };
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use crate::idm::server::IdmServer; use crate::idm::server::IdmServer;
use crate::server::{QueryServer, QueryServerTransaction}; use crate::server::{QueryServer, QueryServerTransaction};
use rsidm_proto::v1::{ use kanidm_proto::v1::{
AuthRequest, AuthResponse, CreateRequest, DeleteRequest, ModifyRequest, OperationResponse, AuthRequest, AuthResponse, CreateRequest, DeleteRequest, ModifyRequest, OperationResponse,
SearchRequest, SearchResponse, UserAuthToken, WhoamiResponse, SearchRequest, SearchResponse, UserAuthToken, WhoamiResponse,
}; };

View file

@ -15,7 +15,7 @@ use crate::be::dbentry::DbEntry;
use crate::entry::{Entry, EntryCommitted, EntryNew, EntryValid}; use crate::entry::{Entry, EntryCommitted, EntryNew, EntryValid};
use crate::filter::{Filter, FilterValidResolved}; use crate::filter::{Filter, FilterValidResolved};
use crate::utils::SID; use crate::utils::SID;
use rsidm_proto::v1::{ConsistencyError, OperationError}; use kanidm_proto::v1::{ConsistencyError, OperationError};
pub mod dbentry; pub mod dbentry;
pub mod dbvalue; pub mod dbvalue;

View file

@ -25,8 +25,8 @@ use crate::interval::IntervalActor;
use crate::schema::Schema; use crate::schema::Schema;
use crate::server::QueryServer; use crate::server::QueryServer;
use crate::utils::SID; use crate::utils::SID;
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use rsidm_proto::v1::{ use kanidm_proto::v1::{
AuthRequest, AuthState, CreateRequest, DeleteRequest, ModifyRequest, SearchRequest, AuthRequest, AuthState, CreateRequest, DeleteRequest, ModifyRequest, SearchRequest,
UserAuthToken, UserAuthToken,
}; };
@ -458,7 +458,7 @@ pub fn create_server_core(config: Configuration) {
warn!("IF YOU SEE THIS IN PRODUCTION YOU MUST CONTACT SUPPORT IMMEDIATELY."); warn!("IF YOU SEE THIS IN PRODUCTION YOU MUST CONTACT SUPPORT IMMEDIATELY.");
} }
info!("Starting rsidm with configuration: {}", config); info!("Starting kanidm with configuration: {}", config);
// The log server is started on it's own thread, and is contacted // The log server is started on it's own thread, and is contacted
// asynchronously. // asynchronously.
let log_addr = async_log::start(); let log_addr = async_log::start();
@ -567,7 +567,7 @@ pub fn create_server_core(config: Configuration) {
// .same_site(cookie::SameSite::Strict) // constrain to the domain // .same_site(cookie::SameSite::Strict) // constrain to the domain
// Disallow from js and ...? // Disallow from js and ...?
.http_only(false) .http_only(false)
.name("rsidm-session") .name("kanidm-session")
// This forces https only if true // This forces https only if true
.secure(secure_cookies), .secure(secure_cookies),
)) ))

View file

@ -9,9 +9,9 @@ use crate::server::{
}; };
use crate::value::{IndexType, SyntaxType}; use crate::value::{IndexType, SyntaxType};
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::Entry as ProtoEntry; use kanidm_proto::v1::Entry as ProtoEntry;
use rsidm_proto::v1::Filter as ProtoFilter; use kanidm_proto::v1::Filter as ProtoFilter;
use rsidm_proto::v1::{OperationError, SchemaError}; use kanidm_proto::v1::{OperationError, SchemaError};
use crate::be::dbentry::{DbEntry, DbEntryV1, DbEntryVers}; use crate::be::dbentry::{DbEntry, DbEntryV1, DbEntryVers};

View file

@ -1,8 +1,8 @@
use crate::audit::AuditScope; use crate::audit::AuditScope;
use crate::entry::{Entry, EntryCommitted, EntryInvalid, EntryNew, EntryReduced, EntryValid}; use crate::entry::{Entry, EntryCommitted, EntryInvalid, EntryNew, EntryReduced, EntryValid};
use crate::filter::{Filter, FilterValid}; use crate::filter::{Filter, FilterValid};
use rsidm_proto::v1::Entry as ProtoEntry; use kanidm_proto::v1::Entry as ProtoEntry;
use rsidm_proto::v1::{ use kanidm_proto::v1::{
AuthCredential, AuthResponse, AuthState, AuthStep, SearchResponse, UserAuthToken, AuthCredential, AuthResponse, AuthState, AuthStep, SearchResponse, UserAuthToken,
WhoamiResponse, WhoamiResponse,
}; };
@ -11,7 +11,7 @@ use crate::modify::{ModifyList, ModifyValid};
use crate::server::{ use crate::server::{
QueryServerReadTransaction, QueryServerTransaction, QueryServerWriteTransaction, QueryServerReadTransaction, QueryServerTransaction, QueryServerWriteTransaction,
}; };
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use crate::actors::v1::{AuthMessage, CreateMessage, DeleteMessage, ModifyMessage, SearchMessage}; use crate::actors::v1::{AuthMessage, CreateMessage, DeleteMessage, ModifyMessage, SearchMessage};
// Bring in schematransaction trait for validate // Bring in schematransaction trait for validate

View file

@ -9,8 +9,8 @@ use crate::server::{
QueryServerReadTransaction, QueryServerTransaction, QueryServerWriteTransaction, QueryServerReadTransaction, QueryServerTransaction, QueryServerWriteTransaction,
}; };
use crate::value::PartialValue; use crate::value::PartialValue;
use rsidm_proto::v1::Filter as ProtoFilter; use kanidm_proto::v1::Filter as ProtoFilter;
use rsidm_proto::v1::{OperationError, SchemaError}; use kanidm_proto::v1::{OperationError, SchemaError};
use std::cmp::{Ordering, PartialOrd}; use std::cmp::{Ordering, PartialOrd};
use std::collections::BTreeSet; use std::collections::BTreeSet;

View file

@ -1,7 +1,7 @@
use crate::entry::{Entry, EntryCommitted, EntryValid}; use crate::entry::{Entry, EntryCommitted, EntryValid};
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use rsidm_proto::v1::UserAuthToken; use kanidm_proto::v1::UserAuthToken;
use crate::credential::Credential; use crate::credential::Credential;
use crate::idm::claim::Claim; use crate::idm::claim::Claim;

View file

@ -2,8 +2,8 @@ use crate::audit::AuditScope;
use crate::constants::UUID_ANONYMOUS; use crate::constants::UUID_ANONYMOUS;
use crate::idm::account::Account; use crate::idm::account::Account;
use crate::idm::claim::Claim; use crate::idm::claim::Claim;
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use rsidm_proto::v1::{AuthAllowed, AuthCredential, AuthState}; use kanidm_proto::v1::{AuthAllowed, AuthCredential, AuthState};
use crate::credential::{Credential, Password}; use crate::credential::{Credential, Password};
@ -251,7 +251,7 @@ mod tests {
use crate::constants::{JSON_ADMIN_V1, JSON_ANONYMOUS_V1}; use crate::constants::{JSON_ADMIN_V1, JSON_ANONYMOUS_V1};
use crate::credential::Credential; use crate::credential::Credential;
use crate::idm::authsession::AuthSession; use crate::idm::authsession::AuthSession;
use rsidm_proto::v1::AuthAllowed; use kanidm_proto::v1::AuthAllowed;
#[test] #[test]
fn test_idm_authsession_anonymous_auth_mech() { fn test_idm_authsession_anonymous_auth_mech() {

View file

@ -1,4 +1,4 @@
use rsidm_proto::v1::Claim as ProtoClaim; use kanidm_proto::v1::Claim as ProtoClaim;
#[derive(Debug)] #[derive(Debug)]
pub struct Claim { pub struct Claim {

View file

@ -1,4 +1,4 @@
use rsidm_proto::v1::Group as ProtoGroup; use kanidm_proto::v1::Group as ProtoGroup;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Group { pub struct Group {

View file

@ -22,7 +22,7 @@ macro_rules! run_idm_test {
use crate::server::QueryServer; use crate::server::QueryServer;
use env_logger; use env_logger;
::std::env::set_var("RUST_LOG", "actix_web=debug,rsidm=debug"); ::std::env::set_var("RUST_LOG", "actix_web=debug,kanidm=debug");
let _ = env_logger::builder().is_test(true).try_init(); let _ = env_logger::builder().is_test(true).try_init();
let mut audit = AuditScope::new("run_test"); let mut audit = AuditScope::new("run_test");

View file

@ -8,8 +8,8 @@ use crate::server::{QueryServer, QueryServerTransaction, QueryServerWriteTransac
use crate::utils::{uuid_from_duration, SID}; use crate::utils::{uuid_from_duration, SID};
use crate::value::PartialValue; use crate::value::PartialValue;
use rsidm_proto::v1::AuthState; use kanidm_proto::v1::AuthState;
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use concread::cowcell::{CowCell, CowCellWriteTxn}; use concread::cowcell::{CowCell, CowCellWriteTxn};
use std::collections::BTreeMap; use std::collections::BTreeMap;
@ -287,8 +287,8 @@ mod tests {
use crate::idm::event::PasswordChangeEvent; use crate::idm::event::PasswordChangeEvent;
use crate::modify::{Modify, ModifyList}; use crate::modify::{Modify, ModifyList};
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use rsidm_proto::v1::{AuthAllowed, AuthState}; use kanidm_proto::v1::{AuthAllowed, AuthState};
use crate::audit::AuditScope; use crate::audit::AuditScope;
use crate::idm::server::IdmServer; use crate::idm::server::IdmServer;

View file

@ -7,7 +7,7 @@ macro_rules! run_test {
use crate::server::QueryServer; use crate::server::QueryServer;
use env_logger; use env_logger;
::std::env::set_var("RUST_LOG", "actix_web=debug,rsidm=debug"); ::std::env::set_var("RUST_LOG", "actix_web=debug,kanidm=debug");
let _ = env_logger::builder().is_test(true).try_init(); let _ = env_logger::builder().is_test(true).try_init();
let mut audit = AuditScope::new("run_test"); let mut audit = AuditScope::new("run_test");

View file

@ -1,11 +1,11 @@
use crate::audit::AuditScope; use crate::audit::AuditScope;
use rsidm_proto::v1::Modify as ProtoModify; use kanidm_proto::v1::Modify as ProtoModify;
use rsidm_proto::v1::ModifyList as ProtoModifyList; use kanidm_proto::v1::ModifyList as ProtoModifyList;
use crate::schema::SchemaTransaction; use crate::schema::SchemaTransaction;
use crate::server::{QueryServerTransaction, QueryServerWriteTransaction}; use crate::server::{QueryServerTransaction, QueryServerWriteTransaction};
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::{OperationError, SchemaError}; use kanidm_proto::v1::{OperationError, SchemaError};
// Should this be std? // Should this be std?
use std::slice; use std::slice;

View file

@ -13,7 +13,7 @@ use crate::server::{
QueryServerReadTransaction, QueryServerTransaction, QueryServerWriteTransaction, QueryServerReadTransaction, QueryServerTransaction, QueryServerWriteTransaction,
}; };
use crate::value::PartialValue; use crate::value::PartialValue;
use rsidm_proto::v1::{ConsistencyError, OperationError}; use kanidm_proto::v1::{ConsistencyError, OperationError};
use std::collections::BTreeMap; use std::collections::BTreeMap;
@ -200,7 +200,7 @@ mod tests {
use crate::entry::{Entry, EntryInvalid, EntryNew}; use crate::entry::{Entry, EntryInvalid, EntryNew};
use crate::modify::{Modify, ModifyList}; use crate::modify::{Modify, ModifyList};
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
// Test entry in db, and same name, reject. // Test entry in db, and same name, reject.
#[test] #[test]
fn test_pre_create_name_unique() { fn test_pre_create_name_unique() {

View file

@ -13,7 +13,7 @@ use crate::server::{
QueryServerReadTransaction, QueryServerTransaction, QueryServerWriteTransaction, QueryServerReadTransaction, QueryServerTransaction, QueryServerWriteTransaction,
}; };
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::{ConsistencyError, OperationError}; use kanidm_proto::v1::{ConsistencyError, OperationError};
lazy_static! { lazy_static! {
static ref CLASS_OBJECT: Value = Value::new_class("object"); static ref CLASS_OBJECT: Value = Value::new_class("object");
@ -277,7 +277,7 @@ mod tests {
use crate::server::QueryServerTransaction; use crate::server::QueryServerTransaction;
use crate::server::QueryServerWriteTransaction; use crate::server::QueryServerWriteTransaction;
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
static JSON_ADMIN_ALLOW_ALL: &'static str = r#"{ static JSON_ADMIN_ALLOW_ALL: &'static str = r#"{
"valid": null, "valid": null,

View file

@ -5,7 +5,7 @@ macro_rules! setup_test {
$preload_entries:ident $preload_entries:ident
) => {{ ) => {{
use env_logger; use env_logger;
::std::env::set_var("RUST_LOG", "actix_web=debug,rsidm=debug"); ::std::env::set_var("RUST_LOG", "actix_web=debug,kanidm=debug");
let _ = env_logger::builder().is_test(true).try_init(); let _ = env_logger::builder().is_test(true).try_init();
// Create an in memory BE // Create an in memory BE

View file

@ -18,7 +18,7 @@ use crate::plugins::Plugin;
use crate::server::QueryServerTransaction; use crate::server::QueryServerTransaction;
use crate::server::{QueryServerReadTransaction, QueryServerWriteTransaction}; use crate::server::{QueryServerReadTransaction, QueryServerWriteTransaction};
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::{ConsistencyError, OperationError}; use kanidm_proto::v1::{ConsistencyError, OperationError};
use std::collections::BTreeSet; use std::collections::BTreeSet;
use uuid::Uuid; use uuid::Uuid;

View file

@ -2,7 +2,7 @@ use crate::audit::AuditScope;
use crate::entry::{Entry, EntryCommitted, EntryInvalid, EntryNew, EntryValid}; use crate::entry::{Entry, EntryCommitted, EntryInvalid, EntryNew, EntryValid};
use crate::event::{CreateEvent, DeleteEvent, ModifyEvent}; use crate::event::{CreateEvent, DeleteEvent, ModifyEvent};
use crate::server::{QueryServerReadTransaction, QueryServerWriteTransaction}; use crate::server::{QueryServerReadTransaction, QueryServerWriteTransaction};
use rsidm_proto::v1::{ConsistencyError, OperationError}; use kanidm_proto::v1::{ConsistencyError, OperationError};
#[macro_use] #[macro_use]
mod macros; mod macros;

View file

@ -8,7 +8,7 @@ use crate::event::{CreateEvent, DeleteEvent, ModifyEvent};
use crate::modify::Modify; use crate::modify::Modify;
use crate::server::QueryServerWriteTransaction; use crate::server::QueryServerWriteTransaction;
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
use std::collections::HashSet; use std::collections::HashSet;
pub struct Protected {} pub struct Protected {}
@ -188,7 +188,7 @@ mod tests {
use crate::constants::JSON_ADMIN_V1; use crate::constants::JSON_ADMIN_V1;
use crate::entry::{Entry, EntryInvalid, EntryNew}; use crate::entry::{Entry, EntryInvalid, EntryNew};
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
static JSON_ADMIN_ALLOW_ALL: &'static str = r#"{ static JSON_ADMIN_ALLOW_ALL: &'static str = r#"{
"valid": null, "valid": null,

View file

@ -20,7 +20,7 @@ use crate::schema::SchemaTransaction;
use crate::server::QueryServerTransaction; use crate::server::QueryServerTransaction;
use crate::server::{QueryServerReadTransaction, QueryServerWriteTransaction}; use crate::server::{QueryServerReadTransaction, QueryServerWriteTransaction};
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::{ConsistencyError, OperationError}; use kanidm_proto::v1::{ConsistencyError, OperationError};
use uuid::Uuid; use uuid::Uuid;
// NOTE: This *must* be after base.rs!!! // NOTE: This *must* be after base.rs!!!
@ -247,7 +247,7 @@ mod tests {
use crate::modify::{Modify, ModifyList}; use crate::modify::{Modify, ModifyList};
use crate::server::{QueryServerTransaction, QueryServerWriteTransaction}; use crate::server::{QueryServerTransaction, QueryServerWriteTransaction};
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::OperationError; use kanidm_proto::v1::OperationError;
// The create references a uuid that doesn't exist - reject // The create references a uuid that doesn't exist - reject
#[test] #[test]

View file

@ -2,7 +2,7 @@ use crate::audit::AuditScope;
use crate::constants::*; use crate::constants::*;
use crate::entry::{Entry, EntryCommitted, EntryNew, EntryValid}; use crate::entry::{Entry, EntryCommitted, EntryNew, EntryValid};
use crate::value::{IndexType, PartialValue, SyntaxType, Value}; use crate::value::{IndexType, PartialValue, SyntaxType, Value};
use rsidm_proto::v1::{ConsistencyError, OperationError, SchemaError}; use kanidm_proto::v1::{ConsistencyError, OperationError, SchemaError};
use std::borrow::Borrow; use std::borrow::Borrow;
use std::collections::BTreeSet; use std::collections::BTreeSet;
@ -1273,7 +1273,7 @@ mod tests {
use crate::audit::AuditScope; use crate::audit::AuditScope;
// use crate::constants::*; // use crate::constants::*;
use crate::entry::{Entry, EntryInvalid, EntryNew, EntryValid}; use crate::entry::{Entry, EntryInvalid, EntryNew, EntryValid};
use rsidm_proto::v1::{ConsistencyError, SchemaError}; use kanidm_proto::v1::{ConsistencyError, SchemaError};
// use crate::filter::{Filter, FilterValid}; // use crate::filter::{Filter, FilterValid};
use crate::schema::SchemaTransaction; use crate::schema::SchemaTransaction;
use crate::schema::{IndexType, Schema, SchemaAttribute, SchemaClass, SyntaxType}; use crate::schema::{IndexType, Schema, SchemaAttribute, SchemaClass, SyntaxType};

View file

@ -32,7 +32,7 @@ use crate::schema::{
SchemaWriteTransaction, SchemaWriteTransaction,
}; };
use crate::value::{PartialValue, SyntaxType, Value}; use crate::value::{PartialValue, SyntaxType, Value};
use rsidm_proto::v1::{ConsistencyError, OperationError, SchemaError}; use kanidm_proto::v1::{ConsistencyError, OperationError, SchemaError};
lazy_static! { lazy_static! {
static ref PVCLASS_ATTRIBUTETYPE: PartialValue = PartialValue::new_class("attributetype"); static ref PVCLASS_ATTRIBUTETYPE: PartialValue = PartialValue::new_class("attributetype");
@ -1736,7 +1736,7 @@ mod tests {
use crate::modify::{Modify, ModifyList}; use crate::modify::{Modify, ModifyList};
use crate::server::QueryServerTransaction; use crate::server::QueryServerTransaction;
use crate::value::{PartialValue, Value}; use crate::value::{PartialValue, Value};
use rsidm_proto::v1::{OperationError, SchemaError}; use kanidm_proto::v1::{OperationError, SchemaError};
use uuid::Uuid; use uuid::Uuid;
#[test] #[test]

View file

@ -1,6 +1,6 @@
use crate::be::dbvalue::{DbValueCredV1, DbValueV1}; use crate::be::dbvalue::{DbValueCredV1, DbValueV1};
use crate::credential::Credential; use crate::credential::Credential;
use rsidm_proto::v1::Filter as ProtoFilter; use kanidm_proto::v1::Filter as ProtoFilter;
use std::borrow::Borrow; use std::borrow::Borrow;
use std::convert::TryFrom; use std::convert::TryFrom;

View file

@ -4,13 +4,13 @@ extern crate actix;
extern crate env_logger; extern crate env_logger;
extern crate rpassword; extern crate rpassword;
extern crate rsidm; extern crate kanidm;
extern crate structopt; extern crate structopt;
#[macro_use] #[macro_use]
extern crate log; extern crate log;
use rsidm::config::Configuration; use kanidm::config::Configuration;
use rsidm::core::{ use kanidm::core::{
backup_server_core, create_server_core, recover_account_core, reset_sid_core, backup_server_core, create_server_core, recover_account_core, reset_sid_core,
restore_server_core, verify_server_core, restore_server_core, verify_server_core,
}; };
@ -105,9 +105,9 @@ fn main() {
// Configure the server logger. This could be adjusted based on what config // Configure the server logger. This could be adjusted based on what config
// says. // says.
if opt.debug() { if opt.debug() {
::std::env::set_var("RUST_LOG", "actix_web=info,rsidm=debug"); ::std::env::set_var("RUST_LOG", "actix_web=info,kanidm=debug");
} else { } else {
::std::env::set_var("RUST_LOG", "actix_web=info,rsidm=info"); ::std::env::set_var("RUST_LOG", "actix_web=info,kanidm=info");
} }
env_logger::init(); env_logger::init();
@ -120,7 +120,7 @@ fn main() {
config.update_bind(&sopt.bind); config.update_bind(&sopt.bind);
config.domain = sopt.domain.clone(); config.domain = sopt.domain.clone();
let sys = actix::System::new("rsidm-server"); let sys = actix::System::new("kanidm-server");
create_server_core(config); create_server_core(config);
let _ = sys.run(); let _ = sys.run();
} }