strig 0.10.0

Extensible authorization engine: permission catalog, RBAC, ABAC and ReBAC in one decision, with governance and auditing of changes.
Documentation
[package]
name = "strig"
description = "Extensible authorization engine: permission catalog, RBAC, ABAC and ReBAC in one decision, with governance and auditing of changes."
keywords = ["authorization", "rbac", "abac", "rebac", "permissions"]
categories = ["authentication"]
readme = "../../README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true

[features]
default = ["audit", "tz"]
## Trilha de auditoria das mudanças de permissão, com níveis de detalhe e cadeia de hashes.
audit = ["dep:sha2"]
## IANA time zones (`tz`) for `time_between` and `weekday_in`, through the bundled `chrono-tz` database. Without it a `tz` is refused at load.
tz = ["dep:chrono-tz", "dep:chrono"]
## Spans (`tracing`) and metrics (`metrics`) for decisions, queries, governance, approvals and the audit trail. Off by default; off costs nothing. Pure facades, so the core stays free of IO and wasm-friendly.
tracing = ["dep:tracing", "dep:metrics"]
## Posse exclusiva de recurso com prioridade, preempção e prazo.
exclusive = []
## `strig::exclusive_conformance`, the battery every `ExclusiveStore` must pass. For the tests of store adapters; not part of the stable API.
conformance = ["exclusive"]
## RFC 3161 time-stamp requests and verification of `TimeStampResp` (DER, CMS signature, certificate chain against roots you supply). Pure (no IO, no clock); the HTTP exchange with the TSA is yours. Off by default: the core without it gains no dependency.
timestamp = ["audit", "dep:rsa", "dep:p256", "dep:p384", "dep:sha2-rustcrypto-010"]
## Policy language: lexer, validator, Blocks syntax, `Project` and the canonical JSON. Pure (no IO, no clock) and wasm-friendly.
dsl = []
## File access for the policy language (read a file, read a directory into a `Project`, write a file). Not for wasm.
dsl-fs = ["dsl"]
## Importers: turn a Casbin model and policy, or an OpenFGA model and tuples, into a `Policy` (`strig::import`). Pure (no IO, no clock) and wasm-friendly.
import = ["dsl"]

[dependencies]
serde.workspace = true
serde_json.workspace = true
chrono = { version = "0.4", default-features = false, optional = true }
chrono-tz = { version = "0.10", default-features = false, optional = true }
sha2 = { version = "0.11", optional = true }
rsa = { version = "0.9", default-features = false, features = ["std"], optional = true }
p256 = { version = "0.13", default-features = false, features = ["ecdsa", "std"], optional = true }
p384 = { version = "0.13", default-features = false, features = ["ecdsa", "std"], optional = true }
sha2-rustcrypto-010 = { package = "sha2", version = "0.10", default-features = false, features = ["oid"], optional = true }
thiserror.workspace = true
tracing = { workspace = true, optional = true }
metrics = { workspace = true, optional = true }

[dev-dependencies]
serde_json.workspace = true
metrics-util = { version = "0.20", default-features = false, features = ["debugging"] }
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "std"] }
criterion = { version = "0.5", default-features = false, features = ["cargo_bench_support"] }

[[example]]
name = "audit_storage"
required-features = ["audit"]

[[test]]
name = "observability"
required-features = ["tracing"]

[[test]]
name = "dsl"
required-features = ["dsl-fs"]

[[test]]
name = "dsl_blocks"
required-features = ["dsl"]

[[test]]
name = "dsl_project"
required-features = ["dsl"]

[[test]]
name = "dsl_testing"
required-features = ["dsl"]

[[test]]
name = "dsl_fs"
required-features = ["dsl-fs"]

[[test]]
name = "import"
required-features = ["import"]

[[test]]
name = "dsl_hardening"
required-features = ["dsl"]

[[bench]]
name = "listing"
harness = false

[[bench]]
name = "engine"
harness = false
required-features = ["audit"]

[[test]]
name = "pending_audit"
required-features = ["audit"]

[[test]]
name = "elevation"
required-features = ["audit"]

[[test]]
name = "recert"
required-features = ["audit"]

[[test]]
name = "audit_report"
required-features = ["audit"]

[[test]]
name = "timestamp"
required-features = ["timestamp"]

[[example]]
name = "timestamp_http"
required-features = ["timestamp"]