Commit graph

80 commits

Author SHA1 Message Date
William Brown c626eb60a6 Support zfs page size 2020-08-05 10:05:58 +10:00
William Brown 85ec82832e V large cleanup 2020-08-05 09:58:49 +10:00
William Brown 217e3455a2 Cleanup and improve client error handling 2020-08-02 09:16:34 +10:00
William Brown c4805d2915 Improve server hardening
This adds a number of warnings to the server to help administrators make
better informed decisions about the security of their environment.
2020-07-31 14:55:14 +10:00
William Brown cdd7e0e49a Update deps + add simd support in container 2020-07-24 17:38:59 +10:00
Firstyear c8ac4970d8
Release Prep (#283) 2020-06-30 14:58:35 +10:00
Firstyear 96e6c9107d
refint improve (#274)
Fixes #61 and fixes #234 - this rewrites quite a few internals of refint and memberof to make them much more efficient compared to previously. This takes nearly 70s out of the test execution time - a full 25% of the run time of tests.

A number of other improvements have been made through out with regard to memory pre-alloc for hashset/hashmap, fixing some more types, and reducing some un-needed allocations.
2020-06-26 11:36:37 +10:00
Firstyear 0adec0d437
260 entry ava interfaces (#271)
Fixes #260 fixes #257 fixes #157. This is really a set of cleanups around the code base to minimise clones, choose better datastructures for specific tasks, improve the ability to pass references in certain calls and more. Generally this just makes everything a bit smoother, and really has big gains on the write path (it's about 20% faster now).
2020-06-24 21:17:46 +10:00
Firstyear 9aa03906f8
181 pam nsswitch name spn (#270)
This allows configuration of which attribute is presented during gid/uid resolution, adds home directory prefixing, and home directory name attribute selection.
2020-06-21 21:57:48 +10:00
Firstyear 0b15477ef4
212 262 db idl fixes (#269)
Fixes #212 and Fixes #262. This is largely a performance improvement and security improvement to how the databases are handled. The major cases are create/modify/reindex performance,
2020-06-19 10:00:54 +10:00
Firstyear fec28e03e2
195 rel cleanup (#268)
Fixes #195 pre release cleanup. This does a LOT, clippy, formatting, and much much more. It fixes a lot of parts of the book, improves server config and more.
2020-06-18 10:30:42 +10:00
Firstyear d47d4fed0a
245 ldap compat (#247)
Add's improvements to ldap compatibility. This stabilises DN formats and how they are returned, and adds the name2uuid index to help speed up binds and entry resolves on large queries. Even on the largest queries, this is able to process them rapidly, and the ldap interface now has single operation times of sub 0.001 second even on 100k entry databases with references.
2020-06-14 09:34:23 +10:00
Firstyear 70fa17f3a1
199 ldap gateway (#246)
adds an LDAP gateway to the server. It supports TLS if configured for the webserver, using the same parameters. It is a read only interface, only supporting bind via the configured posix password.
2020-06-10 12:07:43 +10:00
Firstyear ff9238b7ee
184 151 183 name constraint and spn (#244)
This adds support to do on-upgrade migrations of the previous iutf8 type to iname, iname contains a better checker of the content of the name values that will become spn's, this allows auth via spn as well as just name. This really just does a lot of clean up to make spns more viable. #181 is still outstanding, but you can currently already login via spn a posixid_to_uuid supports this, it's only the resolving of unixgroup/accounts that need to have name as Option to cause a fall back to spn when in a trust.
2020-06-07 09:53:10 +10:00
Firstyear 4bed9c87bf
Improve errors, tagging, logging and more across the codebase. (#243) 2020-06-05 14:01:20 +10:00
Firstyear 923cf6c0f8
99 p3 clean up sensitive log data (#239)
Fix logging of potentially sensitive data.

* Disable docker automation
2020-05-29 18:13:54 +10:00
Firstyear 5eb370bc43
Phase 2, logging refactor (#236)
* Phase 2, logging refactor
2020-05-22 17:03:42 +10:00
Firstyear 62d60d1afc
99 logging rewrite (#233)
* Phase 1 - fix audit log nesting
2020-05-20 10:31:34 +10:00
Firstyear 16267e8a29
In progress logging design (#231) 2020-05-15 12:23:36 +10:00
Pando85 2670b6ae83 CI update all kanidm component version and tag
Add make entry to have all cargo versions updated from VERSION file.
Add `tag_version` github action to update all cargo.toml and tag it and
push it.
Remove cargo fmt check from CI because we have problems with different
versions and fails continually. Instead, we use cargo-husky to ensure
that all people run it automatically in its local, but this is not
obligatory.
Update to version 1.0.0-rc10, according to packages published.

In future cargo will support managing all dependencies from main
Cargo.toml. Ref: https://github.com/rust-lang/cargo/issues/3931

Resolve #225
2020-05-13 15:56:44 +10:00
William Brown ff8711592e Add upg to radius 2020-05-13 15:54:47 +10:00
Firstyear 15bc8d4120
101 idlcache (#224)
Fixes #101, concurrent caching of IDL and Entries. This yields a 10% improvement for test case execution, and 35% for tests run under --release mode. A lot of code around the code base was needed to be touched due to the extra need for mut in some operations and some lifetimes, but the majority of the work was in idl_arc_sqlite.rs, which has the cache layer. There are many performance gains yet to see, but most of those will come through improvement of the concread ARC and it's related BTree implementation.
2020-05-11 21:12:32 +10:00
Firstyear e08b5c14f5
Merge pull request #222 from kanidm/20200508-docker-fix
This fixes an incorrect path in the suse image
2020-05-08 10:50:05 +10:00
Pando85 4dcad60374 Extend testing of default entries
Add default entries test to apply behaviours according to
`designs/default_idm_layout.rst`.

Add expected behaviours for:
  - Users
  - Account managers
  - Group managers
  - Admins
  - People Managers
  - Anonymous clients
  - Radius servers

Also, refactor `kanidmd_client` tests to separate into different files
and fix some documentation typos

Resolves: #108
2020-05-08 10:27:39 +10:00
William Brown fa43ac2110 216 - add initial /status endpoint 2020-05-07 20:39:39 +10:00
Pando85 7687791466 Merge docker image github actions into unique
Use matrix and Makefile to build both images in the same workflow.

Kanidmd image remove muslc version and come back to SUSE version because
performance problems.

Also fix a typo bug with kanidmd image build on CI.
2020-05-07 12:37:14 +10:00
Pando85 c2f77a47f3 Create light images with static binaries
- Change base builder image to `ekidd/rust-musl-builder` for create static
binaries.
- Add two flavours: alpine and stand alone binary.
- Add makefile commands for build, test and push kanidmd images and
  refactor previous code.
- Add missing things to `.dockerignore`.
- Refactor CI to use Makefile.
2020-05-06 11:07:01 +10:00
Pando85 d6acffd869 Fix sqlite fails in CI tests and fmt error
Add `libsqlite3-sys` crate to avoid sqlite3 missmatching version.

From [https://lib.rs/crates/libsqlite3-sys](https://lib.rs/crates/libsqlite3-sys)
> If you use the bundled feature, libsqlite3-sys will use the cc crate to compile SQLite from source and link against that. This source is embedded in the libsqlite3-sys crate and is currently SQLite 3.30.1 (as of rusqlite 0.21.0 / libsqlite3-sys 0.17.0). This is probably the simplest solution to any build problems.

Remove sqlite OS packages dependencies for build.

Also, we fix a format error to allow CI tests to pass again.
2020-05-06 10:16:26 +10:00
Pando85 ffa2e416aa Optimized all possible constant values using const
Replace all replaceable static declarations with const values.
Ref: 61e3dc9c1e/text/0246-const-vs-static.md
2020-05-05 10:01:10 +10:00
Pando85 cfdaa702e5 Fix multiple typo in docs 2020-04-27 10:34:33 +10:00
Pando85 daf22462d7 Feature/entry extend apply modlist tests
Add entry test cases for `apply_modlist`:
- present multivalue
- purge single/multi/empty value
- remove exists and doesn't exist value
2020-04-12 12:27:13 +10:00
William Brown 3240d993b9 Clean removed schema struct 2020-04-11 16:25:43 +10:00
William Brown b8f906ed36 Update outdated libraries and add helper make argument. 2020-04-11 10:48:34 +10:00
William Brown 29d99654c3 Update to latest rc 2020-04-10 15:55:25 +10:00
Firstyear 8cfa8f3f95
12 totp (#201)
Implements #12, TOTP. This adds support for TOTP to the api and server, with server side token generation, authentication and the correct URI for encoding into QR codes for client token addition. Some extra measures have been taken such as in the stepped auth to always notify on the success or failure of the TOTP first (regardless of order) to prevent PW bruteforce attacks.
2020-04-10 15:50:45 +10:00
Firstyear ceb6048bf0
122 password import design (#196)
Implements #122 password import. This adds most of the server core framework to allow password imports from other sources, with new types easily able to be added in credential.rs.
2020-03-27 08:27:07 +10:00
William Brown 32dcaa39ac Test perf improvements 2020-03-26 11:56:20 +10:00
Firstyear 6388bcf6fc
20200322 132 recyclebin 2 (#193)
Implements #132, the recycle bin. This completes the feature, with working API's, front end tests and CLI tooling. It also includes a refactor of the CLI tools to make them a bit easier to manage/work with.
2020-03-25 08:21:49 +10:00
Firstyear 61c240e44b
20200307 137/132 cid/recyclebin (#192)
Implements #137 and parts of #132. This adds full support for CID's to the server, and some parts for recyclebin to work such as internal lessthan queries.
2020-03-22 11:31:02 +10:00
Firstyear c5664988e3
Refactor for actix and futures upgrade (#190) 2020-03-07 10:49:39 +10:00
Firstyear 5a9ad39d6b
20200218 pam (#189)
Add support for unix_password handling, and pam authentication for services.
2020-02-29 14:02:14 +10:00
Firstyear b048115698
20200216 document internals (#187)
Add documentation of internal api
2020-02-17 08:09:32 +10:30
Firstyear f8adfc3840
20200216 fix gidnumber validation (#186)
* Fix an issue with gid number validation
2020-02-17 08:09:11 +10:30
Firstyear 9de7d33293
129 nsswitch stage 2 groups (#185)
Implements #129, adding the libnss_kanidm.so/dylib, and the related caching parts for properly handling these types.
2020-02-15 10:57:25 +10:30
Firstyear d063d358ad
129 pam nsswitch stage 1 daemon (#179)
Implements #129, pam and nsswitch daemon capability. This is stage 1, which adds a localhost unix domain socket resolver, a ssh key client, support to the server for generating unix tokens, an async client lib, and client handles for adding posix extensions to accounts and groups.
2020-02-13 10:43:01 +11:00
Firstyear 9360ba78f3
Add feature for re-adding some group memberships on revival (#176)
Implements #49, revive directmemberships if possible on revive. As items that are deleted are able to maintain and preserve their directmembership from MO, this allows a way to back-create group memberships when we revive a user from the recycle bin.

Note that if the group was itself deleted and revived, this breaks the relationship because it causes ref int to remove all the references. This could be a reason to change the refint policy to allow keeping dead-references, but I think I want to think about that more before I change that policy too quickly.

Saying this, most groups are long lived, we are really wanting to handle the case where you delete and revive a user, or delete and revive a group to restore consistency. Deletenig and reviveng groups and users at the same time will lead to some hairy-complex cases.
2020-01-27 20:56:21 +10:00
Firstyear a55f277ac3
Add pragma integrity check to verify (#175) 2020-01-27 13:37:55 +10:00
Firstyear 559222206f
133 limit to human readable characters. (#174)
Implements #133, limit password generators to distict human readable characters. This removes the common confusions such as I,l, 1, 0, O, o, m,rn, etc . This in mind, they may not all have been found, but it should be easier now to improve upon.
2020-01-27 12:56:15 +10:00
Firstyear 1e7ba58fe8
Add concurrent structures, and initial attempt at benchmarking (#173) 2020-01-26 19:55:53 +10:00
Tristram Healy 4470311f84 Replaced Firstyear 2020-01-17 11:57:30 +10:00