{"id":10857,"date":"2021-07-28T07:00:00","date_gmt":"2021-07-28T15:00:00","guid":{"rendered":"https:\/\/formtek.com\/blog\/?p=10857"},"modified":"2021-04-08T07:59:16","modified_gmt":"2021-04-08T15:59:16","slug":"policy-as-code-establishing-repeatable-and-versionable-policies","status":"publish","type":"post","link":"https:\/\/formtek.com\/blog\/policy-as-code-establishing-repeatable-and-versionable-policies\/","title":{"rendered":"Policy As Code: Establishing Repeatable and Versionable Policies"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/docs.hashicorp.com\/sentinel\/concepts\/policy-as-code\" data-type=\"URL\" data-id=\"https:\/\/docs.hashicorp.com\/sentinel\/concepts\/policy-as-code\">Policy as Code<\/a> is an automated system that defines policy and policy management though data and code.  Standard software techniques like version control, automated testing and automated deployment can then be applied to the policy definitions.  Encapsulating policy definitions as code and data make them repeatable and versionable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tim Hinrichs, CTO at Styra, <a href=\"https:\/\/www.infoworld.com\/article\/3613872\/using-opa-with-gitops-to-speed-cloud-native-development.html\" data-type=\"URL\" data-id=\"https:\/\/www.infoworld.com\/article\/3613872\/using-opa-with-gitops-to-speed-cloud-native-development.html\">wrote that<\/a> &#8220;because the policy is code, just like the app is code, teams can monitor, audit, and more easily collaborate on those policies with the existing cloud-native tools, processes, and pipelines they already use.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some of the <a href=\"https:\/\/docs.hashicorp.com\/sentinel\/concepts\/policy-as-code\" data-type=\"URL\" data-id=\"https:\/\/docs.hashicorp.com\/sentinel\/concepts\/policy-as-code\">benefits of Policy as code<\/a> include:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Sandboxing <\/strong>&#8211; the automated policy system can be implemented so that it is protected from performing dangerous actions.<\/li><li><strong>Codification <\/strong>&#8211; allows policy logic can be audited and commented.<\/li><li><strong>Version control<\/strong> &#8211; policies can be versioned which brings the advantages of tracking the policy history and performing diffs to see how policies have changed or evolved.<\/li><li><strong>Testing <\/strong>&#8211; automated testing can be set up to ensure that policy behavior works as expected.<\/li><li><strong>Automation <\/strong>&#8211; policies can be automated and managed with automation tools.<\/li><\/ul>\n<div class=\"lightsocial_container\"><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/digg.com\/submit?url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F&amp;title=\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/digg.png\" alt=\"Digg This\" title=\"Digg This\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F&amp;title=\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/reddit.png\" alt=\"Reddit This\" title=\"Reddit This\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/www.stumbleupon.com\/submit?url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F&amp;title=\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/stumbleupon.png\" alt=\"Stumble Now!\" title=\"Stumble Now!\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/buzz.yahoo.com\/buzz?targetUrl=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F&amp;headline=\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/yahoo_buzz.png\" alt=\"Buzz This\" title=\"Buzz This\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/www.dzone.com\/links\/add.html?title=&amp;url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/dzone.png\" alt=\"Vote on DZone\" title=\"Vote on DZone\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/www.facebook.com\/sharer.php?t=&amp;u=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/facebook.png\" alt=\"Share on Facebook\" title=\"Share on Facebook\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/delicious.com\/save?title=&amp;url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/delicious.png\" alt=\"Bookmark this on Delicious\" title=\"Bookmark this on Delicious\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/www.dotnetkicks.com\/kick\/?title=&amp;url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/dotnetkicks.png\" alt=\"Kick It on DotNetKicks.com\" title=\"Kick It on DotNetKicks.com\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/dotnetshoutout.com\/Submit?title=&amp;url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/dotnetshoutout.png\" alt=\"Shout it\" title=\"Shout it\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/www.linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F&amp;title=&amp;summary=&amp;source=\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/linkedin.png\" alt=\"Share on LinkedIn\" title=\"Share on LinkedIn\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/www.technorati.com\/faves?add=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/technorati.png\" alt=\"Bookmark this on Technorati\" title=\"Bookmark this on Technorati\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/twitter.com\/home?status=Reading+https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/twitter.png\" alt=\"Post on Twitter\" title=\"Post on Twitter\" \/><\/a><\/div><div class=\"lightsocial_element\"><a class=\"lightsocial_a\" href=\"http:\/\/www.google.com\/buzz\/post?url=https%3A%2F%2Fformtek.com%2Fblog%2Fpolicy-as-code-establishing-repeatable-and-versionable-policies%2F\" target=\"_blank\"><img decoding=\"async\" class=\"lightsocial_img\" src=\"https:\/\/formtek.com\/blog\/wp-content\/plugins\/light-social\/google_buzz.png\" alt=\"Google Buzz (aka. Google Reader)\" title=\"Google Buzz (aka. Google Reader)\" \/><\/a><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Policy as Code is an automated system that defines policy and policy management though data and code. Standard software techniques like version control, automated testing and automated deployment can then be applied to the policy definitions. Encapsulating policy definitions as<span class=\"ellipsis\">&hellip;<\/span><\/p>\n<div class=\"read-more\"><a href=\"https:\/\/formtek.com\/blog\/policy-as-code-establishing-repeatable-and-versionable-policies\/\">Read more &#8250;<\/a><\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[],"class_list":["post-10857","post","type-post","status-publish","format-standard","hentry","category-code-development"],"_links":{"self":[{"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/posts\/10857","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/comments?post=10857"}],"version-history":[{"count":1,"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/posts\/10857\/revisions"}],"predecessor-version":[{"id":10858,"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/posts\/10857\/revisions\/10858"}],"wp:attachment":[{"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/media?parent=10857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/categories?post=10857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/formtek.com\/blog\/wp-json\/wp\/v2\/tags?post=10857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}