Paper Files / Cloud
A Formal Architecture for Adaptive Threat Detection and Containment in Multi-Cloud Environments Based on Temporal Graphs and Verifiable Policies
TITLE: A Formal Architecture for Adaptive Threat Detection and Containment in Multi-Cloud Environments Based on Temporal Graphs and Verifiable Policies ABSTRACT: The adoption of multi-cloud and hybrid strategies has become a dominant practice in critical sectors, increasing the semantic and operational complexity of access control and security monitoring mechanisms. The heterogeneity among AWS IAM, Microsoft Entra ID/Azure RBAC, Google Cloud IAM, and RBAC/ABAC models in Kubernetes, combined with identity federation, CI/CD pipelines, and API-driven integrations, introduces temporal and cross-cutting dependencies that are not captured by local policy analyses. Recent reports indicate that the misuse of valid credentials remains the predominant attack vector in incidents, often exploiting legitimate compositions of permissions. We propose a formal architecture for adaptive threat detection and containment based on temporal privilege graphs and automated policy verification via SMT. We formalize the multi-cloud environment as a dynamic system G_t = (V_t, E_t, τ_t, w_t, ℓ_t), defining compromise paths, accumulated temporal risk, and the dual problem of detection and containment as instances of reachability and minimum cut under functional constraints. We demonstrate partial correctness properties and a reduction to maximum flow for minimum containment. We present an incremental algorithm with sublinear amortized complexity analysis under sparsity and temporal locality assumptions. Containment is validated by encoding organizational invariants in decidable first-order logic, solved by SMT. We implemented a prototype in Kubernetes 1.29 with a graph backend and integration with OPA and MITRE ATT&CK taxonomies. Empirical evaluations with anonymized real logs and synthetic scenarios show a statistically significant reduction in detection time compared to approaches based exclusively on correlation. Case studies in the financial and healthcare sectors illustrate the ability to block attack chains while preserving functional requirements. The proposal contributes to the convergence of identity-based security, formal verification, and automated response in contemporary multi-cloud ecosystems.
- Introduction
Cloud computing has evolved from an emerging paradigm into the foundational infrastructure of critical sectors such as finance, energy, telecommunications, healthcare, and public administration. Multi-cloud and hybrid strategies are widely adopted to mitigate vendor lock-in, meet regulatory requirements, and increase operational resilience (ENISA, 2023; NIST, 2020a). In 2025, the consolidation of CNAPP (Cloud-Native Application Protection Platform) platforms and the integration with eBPF-based observability mechanisms further expanded the monitoring surface, but also the systemic complexity.
The coexistence of multiple access control models — AWS IAM, Microsoft Entra ID with Azure RBAC, Google Cloud IAM, and RBAC/ABAC in Kubernetes — produces semantic and compositional heterogeneity. Identity federation via OIDC/SAML, integrations with external providers, and infrastructure-as-code (IaC)-driven automations introduce cross-cutting dependencies not made explicit in local policies. Consequently, the attack surface becomes dynamic, distributed, and temporally evolving.
Widely recognized reports indicate that misuse of valid credentials remains the predominant attack vector in incidents (VERIZON, 2024; IBM, 2024; MANDIANT, 2024). In the MITRE ATT&CK framework, techniques such as Valid Accounts (T1078), Account Manipulation (T1098), and Exploitation for Privilege Escalation (T1068) recur in modern attack chains (MITRE, 2024). These data converge to a structural diagnosis: attacks often exploit legitimate compositions of permissions rather than relying exclusively on unknown vulnerabilities.
Cases such as Log4Shell (CVE-2021-44228) and Spring4Shell (CVE-2022-22965) illustrate initial vectors that evolve into privilege escalation via stored credentials and misconfigured roles. In contemporary multi-cloud environments, the threat typically emerges as a temporal sequence of individually permitted actions that are globally unsafe.
We formulate three research questions:
RQ1: How can multi-cloud identity and privilege states be formally represented while preserving temporal semantics and interoperability?
RQ2: Under which structural conditions is it possible to incrementally detect compromise paths with sublinear amortized complexity?
RQ3: How can automatic containment mechanisms be guaranteed to eliminate all relevant paths without violating organizational functional invariants?
We contribute: (C1) a formal temporal privilege graph model; (C2) an incremental algorithm with complexity analysis; (C3) a containment mechanism with SMT verification; (C4) a comparative empirical evaluation; (C5) cross-sector case studies.
- Background and Related Work
Attack graphs were formalized by Ammann, Wijesinghe, and Kaushik (2002) as a representation of exploitation states. Subsequent approaches introduced symbolic reductions and incremental analyses. However, most assume relatively static topologies and do not explicitly incorporate temporal weights with exponential decay.
Fireman demonstrated formal verification of firewall policies (YUAN et al., 2006), establishing a precedent for declarative rule modeling. In the domain of automated reasoning, the Z3 SMT solver became established as an efficient tool for combined theories (DE MOURA; BJØRNER, 2008).
The Zero Trust paradigm (NIST, 2020a) emphasizes continuous identity- and context-based evaluation. NIST SP 800-53 Rev.5 defines security and privacy controls (NIST, 2020b), while NIST SP 800-207 operationalizes Zero Trust architecture. Recent work addresses cloud-native security, including workload protection and declarative policies (SHARMA; CHEN, 2022; RED HAT, 2023).
However, we identify gaps: (i) the absence of integrated temporal formalization across multiple providers; (ii) limited integration between logical verification and automated response; (iii) scarcity of formal complexity analysis in dynamic multi-cloud scenarios.
- Threat Model and Problem Formalization
3.1 System Model
Definition 1 (Multi-Cloud Environment).
Let $C = {c_1,\dots,c_k}$ be a finite set of independent administrative domains. Each $c_i$ has identities $I_{c_i}$, resources $R_{c_i}$, and policies $P_{c_i}$. The global state at time $t$ is the disjoint union of these components, together with federation relations $F_{ij}$ between domains.
Definition 2 (Temporal Privilege Graph).
For discrete time instant $t \in \mathbb{T}$, we define
$$ G_t = (V_t, E_t, \tau_t, w_t, \ell_t) $$
where $V_t = \bigcup_i (I_{c_i}(t) \cup R_{c_i}(t))$,
$E_t \subseteq V_t \times V_t$ represents authorization or dependency relations,
$\tau_t: E_t \rightarrow \mathbb{T}$ associates a timestamp,
$w_t: E_t \rightarrow \mathbb{R}^+$ defines a risk weight,
$\ell_t$ labels edges with a semantic type (assume-role, read, write, admin, federate).
3.2 Paths and Risk
Definition 3 (Compromise Path).
A directed path $p=(v_0,\dots,v_n)$ is a compromise path if $v_0 \in I_{comp}$ and $v_n \in A$, where $A$ is the set of critical assets.
Definition 4 (Accumulated Temporal Risk).
$$ R(p)=\sum_{e\in p} w_t(e)\cdot \lambda^{(t-\tau_t(e))} $$
with $\lambda\in(0,1]$ representing the temporal decay factor.
The detection problem consists of deciding:
$$ \exists p \subseteq G_t : v_0 \in I_{comp} \land v_n \in A. $$
The containment problem is to find a minimum set $E^- \subseteq E_t$ such that, in $G’_t=(V_t,E_t\setminus E^-)$,
$$ \forall p’ \text{ from } I_{comp} \text{ to } A, \neg(p’ \subseteq G’_t), $$
subject to functional invariants $F$.
3.3 Theoretical Properties
Theorem 1 (Partial Correctness).
If $E^-$ intercepts all minimum paths between $I_{comp}$ and $A$, then there is no residual minimum path in $G’_t$.
Proof.
Assume for contradiction that there exists a residual minimum path $p^$. Then $p^$ does not contain edges from $E^-$. Therefore, $E^-$ did not intercept all minimum paths, contradicting the hypothesis. $\square$
The global minimality of $E^-$ reduces to the directed minimum cut problem. Through a network construction with unit edge capacities, we can apply a maximum flow algorithm, obtaining worst-case complexity $O(|V||E|)$ using Edmonds–Karp.
- Proposed Methodology
The architecture is composed of: (i) log ingestion via Apache Kafka; (ii) incremental construction of $G_t$; (iii) a detection engine based on weighted search; (iv) SMT verification; (v) automated orchestration compatible with cloud APIs and Kubernetes controllers.
4.1 Incremental Algorithm
When inserting edge $(u,v)$, we execute a search limited to depth $k$ or risk threshold $\theta$. In sparse graphs with average degree $d$, local expansion is $O(d^k)$. If $d$ is bounded and $k \ll \log_d |V|$, we obtain amortized sublinear complexity in $|V|$. In the worst case, applying Dijkstra implies $O(|E|\log|V|)$.
4.2 Containment via SMT
We encode policies in first-order logic over decidable theories (equality, arrays, finite sets). Example:
$$ \forall x (Role(x) \land Perm(x,\text{s3:}) \rightarrow Approved(x)). $$
The removal proposal generates formula $\Phi = P \land \neg Perm(r,\text{s3:}) \land F$. We verify satisfiability of $\Phi$ in Z3 (DE MOURA; BJØRNER, 2008). If satisfiable, containment preserves invariants.
Example call:
z3 policy.smt2
- Implementation
The prototype was implemented in Kubernetes 1.29 (KUBERNETES, 2024), using Neo4j as the graph backend and integration with Open Policy Agent (OPA). AWS CloudTrail logs, Azure Monitor Activity Logs, and Google Cloud Audit Logs are normalized according to MITRE ATT&CK taxonomies (MITRE, 2024).
The operational pipeline follows:
Ingestion → Normalization → Update of G_t → Detection → SMT Verification → API Application → Audit
The audit follows the guidelines of NIST SP 800-92 (NIST, 2006) and the controls of NIST SP 800-53 Rev.5.
- Experimental Evaluation
We used real anonymized logs and synthetic chains aligned with ATT&CK. Baselines included rule-based correlation and traditional SIEM.
| Method | Mean detection time (s) | Invariant violation |
|---|---|---|
| Traditional SIEM | 42.3 | Not applicable |
| Rule-based correlation | 31.7 | 2 cases |
| Proposed (without SMT) | 18.4 | 3 cases |
| Proposed (with SMT) | 19.1 | 0 |
We applied the Mann-Whitney test with $\alpha=0.05$, observing a statistically significant difference between our full approach and the baselines ($p<0.01$).
The ablation analysis indicated that $\lambda=1$ increased false positives by 14%, while the absence of SMT verification resulted in detectable functional violations.
- Case Studies
7.1 Financial Sector
AWS→Azure chain exploiting T1078. Containment involved selective revocation of the trust policy and adjustment of the federated role. The minimum cut preserved critical payment integrations.
7.2 Healthcare Sector
Web application exploitation followed by abuse of a Kubernetes service account with excessive permissions. Containment removed the cluster-admin permission while preserving legitimate clinical access via granular RBAC.
- Discussion
The proposal offers structural explainability and formal verifiability, contrasting with purely statistical machine-learning-based approaches. In 2025, with the growth of AI-assisted attacks and automated exploitation of exposed credentials, integration between formal modeling and adaptive response becomes essential.
Limitations include dependence on log completeness, ingestion latency, and lack of coverage of out-of-band channels. Probabilistic modeling of adaptive adversaries remains an open challenge.
- Conclusion and Future Work
We formalized an architecture based on temporal graphs and SMT verification for detection and adaptive multi-cloud containment. We demonstrated partial correctness, reduction to minimum cut, and incremental complexity analysis. Empirical evaluations indicate significant performance gains and preservation of invariants.
Future work includes integration with cryptographic transparency based on Merkle trees, adoption of post-quantum cryptography for log signing (NIST, 2024), and stochastic modeling of adaptive threats.
References
AMMANN, P.; WIJESINGHE, D.; KAUSHIK, S. Scalable, graph-based network vulnerability analysis. In: ACM CCS, 2002. Available at: https://dl.acm.org/doi/10.1145/586110.586145
DE MOURA, L.; BJØRNER, N. Z3: An efficient SMT solver. In: TACAS, 2008. Available at: https://link.springer.com/chapter/10.1007/978-3-540-78800-3_24
ENISA. Cloud Security Threat Landscape 2023. 2023. Available at: https://www.enisa.europa.eu
IBM. X-Force Threat Intelligence Index 2024. 2024. Available at: https://www.ibm.com/reports/threat-intelligence
KUBERNETES. RBAC Authorization. 2024. Available at: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
MANDIANT. M-Trends 2024. 2024. Available at: https://www.mandiant.com/resources/m-trends
MITRE. ATT&CK Framework. 2024. Available at: https://attack.mitre.org
NIST. Guide to Computer Security Log Management (SP 800-92). 2006. Available at: https://csrc.nist.gov/publications/detail/sp/800-92/final
NIST. Zero Trust Architecture (SP 800-207). 2020a. Available at: https://csrc.nist.gov/publications/detail/sp/800-207/final
NIST. Security and Privacy Controls (SP 800-53 Rev.5). 2020b. Available at: https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final
NIST. Post-Quantum Cryptography Standards. 2024. Available at: https://csrc.nist.gov/projects/post-quantum-cryptography
RED HAT. State of Kubernetes Security Report. 2023. Available at: https://www.redhat.com
VERIZON. Data Breach Investigations Report 2024. 2024. Available at: https://www.verizon.com/business/resources/reports/dbir/
YUAN, L. et al. Fireman: A toolkit for firewall modeling and analysis. IEEE Symposium on Security and Privacy, 2006. Available at: https://ieeexplore.ieee.org/document/1610614