From f6d2bcb44bf270b4cfb3cc24d6a5172e0664f0a8 Mon Sep 17 00:00:00 2001 From: Firstyear Date: Thu, 5 Oct 2023 11:11:27 +1000 Subject: [PATCH] 68 20230929 replication finalisation (#2160) Replication is now ready for test deployments! --- Cargo.lock | 4 +- Cargo.toml | 2 +- book/src/SUMMARY.md | 39 +- book/src/authentication.md | 29 +- book/src/database_maint.md | 12 +- book/src/examples/readme.md | 6 + .../src/{integrations => examples}/traefik.md | 0 book/src/installing_client_tools.md | 36 +- book/src/integrations/ldap.md | 19 +- book/src/integrations/oauth2.md | 27 +- book/src/integrations/pam_and_nsswitch.md | 24 +- book/src/integrations/readme.md | 4 + book/src/{ => integrations}/ssh_key_dist.md | 2 +- book/src/intro.md | 10 - book/src/packaging_debs.md | 11 - book/src/posix_accounts.md | 8 +- book/src/prepare_the_server.md | 25 +- book/src/quickstart.md | 2 +- book/src/repl/administration.md | 30 ++ book/src/repl/deployment.md | 151 ++++++ book/src/repl/planning.md | 64 +++ book/src/repl/readme.md | 90 ++++ book/src/security_hardening.md | 19 +- book/src/server_configuration.md | 2 +- book/src/sync/concepts.md | 4 +- book/src/sync/freeipa.md | 23 +- book/src/sync/ldap.md | 16 +- examples/kanidm-ipa-sync | 1 - examples/server.toml | 24 +- examples/server_container.toml | 24 +- libs/crypto/src/lib.rs | 2 - libs/crypto/src/serialise.rs | 28 +- server/core/src/actors/v1_write.rs | 25 +- server/core/src/admin.rs | 39 +- server/core/src/config.rs | 10 +- server/core/src/repl/codec.rs | 50 +- server/core/src/repl/mod.rs | 435 ++++++++++++------ server/daemon/src/main.rs | 46 +- server/daemon/src/opt.rs | 9 + server/lib/src/be/dbentry.rs | 63 ++- server/lib/src/be/dbrepl.rs | 20 + server/lib/src/be/dbvalue.rs | 30 +- server/lib/src/be/idl_arc_sqlite.rs | 12 + server/lib/src/be/idl_sqlite.rs | 116 ++++- server/lib/src/be/keystorage.rs | 2 +- server/lib/src/be/mod.rs | 99 +++- server/lib/src/constants/entries.rs | 4 +- server/lib/src/entry.rs | 130 +++--- server/lib/src/repl/cid.rs | 15 + server/lib/src/repl/entry.rs | 72 +++ server/lib/src/repl/ruv.rs | 118 ++++- server/lib/src/repl/supplier.rs | 49 +- server/lib/src/repl/tests.rs | 186 ++++++++ 53 files changed, 1801 insertions(+), 467 deletions(-) create mode 100644 book/src/examples/readme.md rename book/src/{integrations => examples}/traefik.md (100%) create mode 100644 book/src/integrations/readme.md rename book/src/{ => integrations}/ssh_key_dist.md (99%) create mode 100644 book/src/repl/administration.md create mode 100644 book/src/repl/deployment.md create mode 100644 book/src/repl/planning.md create mode 100644 book/src/repl/readme.md create mode 100644 server/lib/src/be/dbrepl.rs diff --git a/Cargo.lock b/Cargo.lock index 683b93c8a..3282d00de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -779,9 +779,9 @@ dependencies = [ [[package]] name = "concread" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c43d983bcbf6cbc1b24f9d9a6a6474d762c8744920984d2e0f4e93c2c3e9fa" +checksum = "80f1d231b98d340d3b9a5d2ba3bd86cd25498ee1242d2e3a61916bf6f8f538a6" dependencies = [ "ahash 0.7.6", "crossbeam-epoch", diff --git a/Cargo.toml b/Cargo.toml index 0b5705f35..fecbba5b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -109,7 +109,7 @@ clap_complete = "^4.4.3" # Forced by saffron/cron chrono = "^0.4.31" compact_jwt = { version = "^0.2.10", default-features = false } -concread = "^0.4.1" +concread = "^0.4.3" cron = "0.12.0" crossbeam = "0.8.1" criterion = "^0.5.1" diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index d164b5c50..f3ae56f4a 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -1,18 +1,19 @@ # Kanidm - [Introduction to Kanidm](intro.md) + - [Evaluation Quickstart](quickstart.md) + - [Installing the Server](installing_the_server.md) - [Choosing a Domain Name](choosing_a_domain_name.md) - [Preparing for your Deployment](prepare_the_server.md) - [Server Configuration and Install](server_configuration.md) - [Platform Security Hardening](security_hardening.md) - [Server Updates](server_update.md) + - [Client Tools](client_tools.md) - [Installing client tools](installing_client_tools.md) -# Administration - - [Administration](administrivia.md) - [Accounts and Groups](accounts_and_groups.md) - [Authentication and Credentials](authentication.md) @@ -24,24 +25,25 @@ - [Password Quality and Badlisting](password_quality.md) - [The Recycle Bin](recycle_bin.md) -# Services +- [Replication](repl/readme.md) + - [Planning](repl/planning.md) + - [Deployment](repl/deployment.md) + - [Administration](repl/administration.md) -- [PAM and nsswitch](integrations/pam_and_nsswitch.md) -- [SSH Key Distribution](ssh_key_dist.md) -- [Oauth2](integrations/oauth2.md) -- [LDAP](integrations/ldap.md) -- [RADIUS](integrations/radius.md) +- [Service Integrations](integrations/readme.md) + - [PAM and nsswitch](integrations/pam_and_nsswitch.md) + - [SSH Key Distribution](integrations/ssh_key_dist.md) + - [Oauth2](integrations/oauth2.md) + - [LDAP](integrations/ldap.md) + - [RADIUS](integrations/radius.md) -# Synchronisation +- [Service Integration Examples](examples/readme.md) + - [Kubernetes Ingress](examples/k8s_ingress_example.md) + - [Traefik](examples/traefik.md) -- [Concepts](sync/concepts.md) -- [FreeIPA](sync/freeipa.md) -- [LDAP](sync/ldap.md) - -# Integration Examples - -- [Kubernetes Ingress](examples/k8s_ingress_example.md) -- [Traefik](integrations/traefik.md) +- [Synchronisation](sync/concepts.md) + - [FreeIPA](sync/freeipa.md) + - [LDAP](sync/ldap.md) # Support @@ -64,8 +66,5 @@ - [Replication Coordinator](developers/designs/replication_coord.md) - [Python Module](developers/python.md) - [RADIUS Integration](developers/radius.md) - -## Packaging - - [Packaging](packaging.md) - [Debian/Ubuntu](packaging_debs.md) diff --git a/book/src/authentication.md b/book/src/authentication.md index 8bcaec802..516f6bd33 100644 --- a/book/src/authentication.md +++ b/book/src/authentication.md @@ -44,11 +44,13 @@ These processes are very similar. You can send a credential reset link to a user directly enroll their own credentials. To generate this link or qrcode: ```bash +kanidm person credential create-reset-token [