kanidm/Cargo.toml
Firstyear e51d0dee44 [SECURITY: LOW] Administrator triggered thread crash in oauth2 claim maps #2686 (#2686)
When an admin configured oauth2 custom claims during the creation it
was not enforced that at least one value must be present. This led to
an incorrect logic flaw in str_concat! which didn't handle the 0 case.

This hardens str_concat! to prevent the thread crash by using itertools
for the join instead, and it enforces stricter validation on the valueset
to deny creation of empty claims.

This fix has a low security impact as only an administrator or high
level user can trigger this as a possible denial of service.

Fixes #2680 Fixes #2681
2024-03-26 11:54:47 +10:00

263 lines
7.7 KiB
TOML

[profile.release]
debug = true
lto = "thin"
[workspace]
resolver = "2"
members = [
"proto",
"tools/cli",
"tools/iam_migrations/freeipa",
"tools/iam_migrations/ldap",
"tools/orca",
"unix_integration",
"unix_integration/nss_kanidm",
"unix_integration/pam_kanidm",
"server/web_ui/admin",
"server/web_ui/login_flows",
"server/web_ui/user",
"server/web_ui/shared",
"server/daemon",
"server/lib",
"server/lib-macros",
"server/core",
"server/testkit",
"server/testkit-macros",
"libs/client",
"libs/crypto",
"libs/file_permissions",
"libs/profiles",
"libs/sketching",
"libs/users",
]
[workspace.package]
version = "1.1.0-rc.16"
authors = [
"William Brown <william@blackhats.net.au>",
"James Hodgkinson <james@terminaloutcomes.com>",
]
rust-version = "1.66"
edition = "2021"
license = "MPL-2.0"
homepage = "https://github.com/kanidm/kanidm/"
repository = "https://github.com/kanidm/kanidm/"
[patch.crates-io]
## As Kanidm maintains a number of libraries, sometimes during development we need to override them
## with local or git versions. This patch table allows quick uncommenting to achieve that.
# compact_jwt = { path = "../compact_jwt" }
# concread = { path = "../concread" }
# idlset = { path = "../idlset" }
# ldap3_client = { path = "../ldap3/client" }
# ldap3_proto = { path = "../ldap3/proto" }
# ldap3_client = { git = "https://github.com/kanidm/ldap3.git" }
# ldap3_proto = { git = "https://github.com/kanidm/ldap3.git" }
# scim_proto = { path = "../scim/proto" }
# scim_proto = { git = "https://github.com/kanidm/scim.git" }
base64urlsafedata = { git = "https://github.com/kanidm/webauthn-rs.git", rev = "5f4db4172f8e22aedc68c282d177e98db2b1892f" }
webauthn-authenticator-rs = { git = "https://github.com/kanidm/webauthn-rs.git", rev = "5f4db4172f8e22aedc68c282d177e98db2b1892f" }
webauthn-rs = { git = "https://github.com/kanidm/webauthn-rs.git", rev = "5f4db4172f8e22aedc68c282d177e98db2b1892f" }
webauthn-rs-core = { git = "https://github.com/kanidm/webauthn-rs.git", rev = "5f4db4172f8e22aedc68c282d177e98db2b1892f" }
webauthn-rs-proto = { git = "https://github.com/kanidm/webauthn-rs.git", rev = "5f4db4172f8e22aedc68c282d177e98db2b1892f" }
sshkey-attest = { git = "https://github.com/kanidm/webauthn-rs.git", rev = "5f4db4172f8e22aedc68c282d177e98db2b1892f" }
# base64urlsafedata = { path = "../webauthn-rs/base64urlsafedata" }
# webauthn-authenticator-rs = { path = "../webauthn-rs/webauthn-authenticator-rs" }
# webauthn-rs = { path = "../webauthn-rs/webauthn-rs" }
# webauthn-rs-core = { path = "../webauthn-rs/webauthn-rs-core" }
# webauthn-rs-proto = { path = "../webauthn-rs/webauthn-rs-proto" }
# sshkey-attest = { path = "../webauthn-rs/sshkey-attest" }
# kanidm-hsm-crypto = { path = "../hsm-crypto" }
[workspace.dependencies]
kanidmd_core = { path = "./server/core", version = "=1.1.0-rc.16" }
kanidmd_lib = { path = "./server/lib", version = "=1.1.0-rc.16" }
kanidmd_lib_macros = { path = "./server/lib-macros", version = "=1.1.0-rc.16" }
kanidmd_testkit = { path = "./server/testkit", version = "=1.1.0-rc.16" }
kanidm_build_profiles = { path = "./libs/profiles", version = "=1.1.0-rc.16" }
kanidm_client = { path = "./libs/client", version = "=1.1.0-rc.16" }
kanidm-hsm-crypto = "^0.1.5"
kanidm_lib_crypto = { path = "./libs/crypto", version = "=1.1.0-rc.16" }
kanidm_lib_file_permissions = { path = "./libs/file_permissions", version = "=1.1.0-rc.16" }
kanidm_proto = { path = "./proto", version = "=1.1.0-rc.16" }
kanidm_unix_int = { path = "./unix_integration", version = "=1.1.0-rc.16" }
kanidm_utils_users = { path = "./libs/users", version = "=1.1.0-rc.16" }
sketching = { path = "./libs/sketching", version = "=1.1.0-rc.16" }
serde_with = "3.4.0"
argon2 = { version = "0.5.2", features = ["alloc"] }
async-recursion = "1.0.5"
async-trait = "^0.1.74"
axum = { version = "0.6.20", features = [
"form",
"headers",
"http2",
"json",
"macros",
"multipart",
"original-uri",
"query",
"tracing",
] }
axum-csp = { version = "0.0.5" }
base32 = "^0.4.0"
base64 = "^0.21.5"
base64urlsafedata = "0.1.3"
bytes = "^1.5.0"
clap = { version = "^4.4.8", features = ["derive", "env"] }
clap_complete = "^4.4.4"
# Forced by saffron/cron
chrono = "^0.4.31"
compact_jwt = { version = "^0.3.3", default-features = false }
concread = "^0.4.4"
cron = "0.12.0"
crossbeam = "0.8.1"
criterion = "^0.5.1"
csv = "1.2.2"
dialoguer = "0.10.4"
dyn-clone = "^1.0.16"
fernet = "^0.2.1"
filetime = "^0.2.22"
fs2 = "^0.4.3"
futures = "^0.3.29"
futures-concurrency = "^3.1.0"
futures-util = { version = "^0.3.21", features = ["sink"] }
gix = { version = "0.53.1", default-features = false }
gloo = "^0.8.1"
gloo-utils = "0.2.0"
hashbrown = { version = "0.14.2", features = ["serde", "inline-more", "ahash"] }
hex = "^0.4.3"
http = "0.2.11"
hyper = { version = "0.14.27", features = ["full"] }
hyper-tls = "0.5.0"
idlset = "^0.2.4"
image = { version = "0.24.7", default-features = false, features = [
"gif",
"jpeg",
"webp",
] }
itertools = "0.12.1"
enum-iterator = "1.4.0"
js-sys = "^0.3.65"
kanidmd_web_ui_shared = { path = "./server/web_ui/shared" }
# REMOVE this
lazy_static = "^1.4.0"
ldap3_client = "^0.4.3"
ldap3_proto = { version = "^0.4.3", features = ["serde"] }
libc = "^0.2.150"
libnss = "^0.4.0"
libsqlite3-sys = "^0.25.0"
lodepng = "3.7.2"
lru = "^0.8.0"
mathru = "^0.13.0"
notify-debouncer-full = { version = "0.1" }
num_enum = "^0.5.11"
oauth2_ext = { version = "^4.1.0", package = "oauth2", default-features = false }
openssl-sys = "^0.9"
openssl = "^0.10.59"
opentelemetry = { version = "0.20.0" }
opentelemetry_api = { version = "0.20.0", features = ["logs", "metrics"] }
opentelemetry-otlp = { version = "0.13.0", default-features = false, features = [
"serde",
"logs",
"metrics",
"http-proto",
"grpc-tonic",
] }
opentelemetry_sdk = "0.20.0"
opentelemetry-stdout = { version = "0.1.0", features = [
"logs",
"metrics",
"trace",
] }
tonic = "0.10.2"
tracing-opentelemetry = "0.21.0"
paste = "^1.0.14"
pkg-config = "^0.3.27"
proc-macro2 = "1.0.69"
qrcode = "^0.12.0"
quote = "1"
rand = "^0.8.5"
regex = "1.10.2"
reqwest = { version = "0.11.20", default-features = false, features = [
"cookies",
"json",
"gzip",
"native-tls",
"native-tls-alpn",
] }
rpassword = "^7.3.1"
rusqlite = { version = "^0.28.0", features = ["array", "bundled"] }
scim_proto = "^0.2.1"
sd-notify = "^0.4.1"
selinux = "^0.4.2"
serde = "^1.0.190"
serde_cbor = { version = "0.12.0-dev", package = "serde_cbor_2" }
serde_json = "^1.0.107"
serde-wasm-bindgen = "0.5"
shellexpand = "^2.1.2"
smartstring = "^1.0.1"
smolset = "^1.3.1"
sshkey-attest = "^0.5.0-dev"
svg = "0.13.1"
syn = { version = "2.0.38", features = ["full"] }
tempfile = "3.8.1"
testkit-macros = { path = "./server/testkit-macros" }
time = { version = "^0.3.21", features = ["formatting", "local-offset"] }
tikv-jemallocator = "0.5"
tokio = "^1.34.0"
tokio-openssl = "^0.6.3"
tokio-util = "^0.7.10"
toml = "^0.5.11"
tracing = { version = "^0.1.40", features = [
"max_level_trace",
"release_max_level_debug",
] }
# tracing = { version = "^0.1.37" }
tracing-subscriber = { version = "^0.3.18", features = ["env-filter"] }
tracing-forest = "^0.1.6"
url = "^2.4.1"
urlencoding = "2.1.3"
utoipa = "4.1.0"
utoipa-swagger-ui = "4.0.0"
uuid = "^1.5.0"
wasm-bindgen = "^0.2.86"
wasm-bindgen-futures = "^0.4.38"
wasm-bindgen-test = "0.3.38"
webauthn-authenticator-rs = { version = "0.5.0-dev", features = [
"softpasskey",
"softtoken",
"mozilla",
] }
webauthn-rs = { version = "0.5.0-dev", features = ["preview-features"] }
webauthn-rs-core = "0.5.0-dev"
webauthn-rs-proto = "0.5.0-dev"
web-sys = "^0.3.65"
whoami = "^1.4.1"
walkdir = "2"
yew = "^0.20.0"
yew-router = "^0.17.0"
zxcvbn = "^2.2.2"
nonempty = "0.8.1"