[package]
edition = "2024"
rust-version = "1.100.0"
name = "ic-auth"
version = "0.41.1"
build = false
publish = ["crates-io"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Portable authentication, delegation proof verification and local session machinery"
readme = "README.md"
license-file = "LICENSE.md"
repository = "https://github.com/dragginzgame/ic-auth"
[package.metadata.cargo-machete]
ignored = ["toko-tooling"]
[features]
canister-signature-preparation = [
"dep:ic-platform",
"ic-platform/canister-sig-creation",
"ic-platform/certification-cbor",
]
canister-signature-verification = [
"dep:ic-platform",
"ic-platform/canister-sig-creation",
"ic-platform/certification",
"ic-platform/signature-verification",
]
certified-proof-verification = [
"canister-signature-verification",
"chain-key-verification",
]
chain-key-verification = [
"dep:ic-platform",
"ic-platform/ecdsa",
]
default = []
persistent = [
"session-restore",
"dep:ic-storage",
]
portable-signature-verification = [
"dep:ic-platform",
"ic-platform/ed25519",
]
session-restore = ["sessions"]
sessions = [
"dep:serde",
"dep:serde_bytes",
"dep:ic-wire",
]
[lib]
name = "ic_auth"
path = "src/lib.rs"
[[test]]
name = "admission_refusals"
path = "tests/admission_refusals.rs"
[[test]]
name = "canister_signature"
path = "tests/canister_signature.rs"
[[test]]
name = "canonical"
path = "tests/canonical.rs"
[[test]]
name = "certificate_issuance"
path = "tests/certificate_issuance.rs"
[[test]]
name = "certified"
path = "tests/certified.rs"
[[test]]
name = "chain_key_batch"
path = "tests/chain_key_batch.rs"
[[test]]
name = "chain_key_signature"
path = "tests/chain_key_signature.rs"
[[test]]
name = "persistent_sessions"
path = "tests/persistent_sessions.rs"
[[test]]
name = "portable"
path = "tests/portable.rs"
[[test]]
name = "portable_revocation"
path = "tests/portable_revocation.rs"
[[test]]
name = "portable_rules"
path = "tests/portable_rules.rs"
[[test]]
name = "portable_signature"
path = "tests/portable_signature.rs"
[[test]]
name = "session_configuration"
path = "tests/session_configuration.rs"
[[test]]
name = "session_request"
path = "tests/session_request.rs"
[[test]]
name = "sessions"
path = "tests/sessions.rs"
[[test]]
name = "shape_validation"
path = "tests/shape_validation.rs"
[[test]]
name = "signature_store"
path = "tests/signature_store.rs"
[[test]]
name = "validated_grants"
path = "tests/validated_grants.rs"
[dependencies.ic-auth-protocol-types]
version = "0.40.1"
[dependencies.ic-platform]
version = "0.33.1"
optional = true
default-features = false
[dependencies.ic-platform-types]
version = "0.20.2"
features = ["principal-self-authenticating"]
default-features = false
[dependencies.ic-storage]
version = "0.74.0"
optional = true
[dependencies.ic-wire]
version = "0.22.1"
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
optional = true
[dependencies.serde_bytes]
version = "0.11"
optional = true
[dependencies.sha2]
version = "0.11.1"
[dependencies.thiserror]
version = "2"
[dev-dependencies.ic-platform]
version = "0.33.1"
features = [
"bls",
"ecdsa",
"ed25519",
"ic-protocol-fixtures",
]
default-features = false
[dev-dependencies.ic-storage]
version = "0.74.0"
features = ["test-support"]
[dev-dependencies.ic-wire]
version = "0.22.1"
[dev-dependencies.leb128]
version = "0.2"
[dev-dependencies.serde]
version = "1"
features = ["derive"]
[dev-dependencies.serde_bytes]
version = "0.11"
[dev-dependencies.toko-tooling]
version = "=0.43.2"
[lints.cargo]
missing_lints_inheritance = "deny"
unknown_lints = "deny"
unused_dependencies = "deny"
unused_workspace_dependencies = "deny"
unused_workspace_package_fields = "deny"
[lints.clippy]
missing_panics_doc = "warn"
must_use_candidate = "warn"
needless_pass_by_value = "warn"
redundant_clone = "warn"
too_many_lines = "allow"
wildcard_imports = "warn"
[lints.clippy.all]
level = "warn"
priority = -2
[lints.clippy.correctness]
level = "deny"
priority = -1
[lints.rust]
dead_code = "deny"
missing_docs = "warn"
unfulfilled_lint_expectations = "deny"
unsafe_code = "forbid"
unsafe_op_in_unsafe_fn = "deny"
unused_must_use = "deny"
[lints.rustdoc]
broken_intra_doc_links = "deny"
invalid_markdown_table = "deny"