Validation and Verification of Infrastructure as Code
Abstract
De siste årene har utviklingen av teknologier som Infrastructure as Code (IaC) og Policy as Code (PaC) forvandlet moderne informasjons- og kommunikasjonsteknologiske infrastrukturer til mer programvarebaserte systemer. Denne utviklingen har muliggjort raskere distribusjon, skalerbarhet og forenklet nettverksadministrasjon. Dessuten har det økende antallet IaC-baserte løsninger skapt et mangfoldig landskap, noe som gjør det nødvendig at hver organisasjon bestemmer den mest passende løsningen for sine behov, samtidig som de sikrer overholdelse av policyer før klargjøring og distribusjon av infrastrukturen.PaC innebærer kodifisering av sikkerhets- og samsvarspolicyer til kjørbar kode. Ved å integrere policyer direkte i infrastrukturkoden, kan organisasjoner sikre at sikkerhets- og samsvarskrav blir håndhevet automatisk, og dermed redusere risikoen for menneskelige feil og forbedre den generelle styringen. Forskjellige PaC-løsninger skreddersyr imidlertid sjekk av samsvar med retningslinjer for hver spesifikk IaC- og infrastrukturleverandør, noe som fører til betydelig redundans og kompliserer kodeforståelsen for sikkerhets- og samsvarsteam.I denne oppgaven definerer og validerer vi et Agnostic Policy as Code (APaC) verktøy, der policyregler kontrolleres uavhengig av infrastrukturkodeplattformene. Vi demonstrerer mulige brukstilfeller gjennom et Proof of Concept (PoC) ved å bruke eksisterende IaC-verktøy og sammenligner resultatene med utbredte PaC-verktøy, og fremhever fordelene med en agnostisk tilnærming.Analysen vår bekrefter potensialet for å abstrahere policyregler på tvers av alle IaC-verktøy eller infrastrukturleverandører, og dermed hjelpe ulike interessenter med å lage enklere og mindre overflødige policyer. In recent years, the development of technologies such as Infrastruc-ture as Code (IaC) and Policy as Code (PaC) has transformed modernInformation and Communication Technology infrastructures into moresoftware-based systems. This evolution has enabled faster deployment,scalability, and simplified network management. Moreover, the growingnumber of IaC-based solutions has created a diverse landscape, necessi-tating that each organization determine the most suitable solution for itsneeds while ensuring policy compliance before provisioning and deployingthe infrastructure.PaC involves codifying security and compliance policies into exe-cutable code. By integrating policies directly into the infrastructure code,organizations can ensure that security and compliance requirements areautomatically enforced, thereby reducing the risk of human error andenhancing overall governance. However, various PaC solutions tailor pol-icy compliance checking to each specific IaC and Infrastructure Provider,leading to significant redundancy and complicating code comprehensionfor Security and Compliance teams.In this thesis, we define and validate an Agnostic Policy as Code(APaC) tool, where policy rules are checked regardless of the infrastructurecode platforms. We demonstrate the possible use cases through a Proofof Concept (PoC) using existing IaC tools and compare the results withwidespread PaC tools, highlighting the benefits of an agnostic approach.Our analysis confirms the potential of abstracting policy rules across anyIaC tool or infrastructure provider, thereby aiding various stakeholdersin creating simpler and less redundant policies.