OPA (Open Policy Agent): Part-4: Rego – Writing Test Cases
Overview In this article, we are going to learn about how to write test cases for OPA policy. Working Example Let’s create a Directory called test5 and create 3 files like below: policy.rego input.json policy_test.rego Testing Policy Test cases Now test our policy set. We have written 3 test cases which are: The “allow” rule should be […]
OPA (Open Policy Agent): Part-3: Rego – Loops & Input Variable
Overview In this article, we are going to learn about Loops in Rego as well as how we can pass input variable to OPA policy. Note: Loops in rego are defined as [ _ ] We will see how we can iterate over a json file and evaluate if the policy is true or false. […]
OPA (Open Policy Agent): Part-2: Rego – Input Variable
Overview In this article, we are going to learn about how we can pass input variable to OPA policy. Working Example Let’s create a Directory called test3 and create 2 files like below: This is a very simple policy where we are checking a rule called “hello”. By default the hello rule is set to […]
OPA (Open Policy Agent): Part-1: Rego Basics
Policy Language OPA is purpose built for reasoning about information represented in structured documents. The data that your service and its users publish can be inspected and transformed using OPA’s native query language Rego. What is Rego? Rego was inspired by Datalog, which is a well understood, decades old query language. Rego extends Datalog to support […]
Computer Vision: Face Detection Using Python and OpenCV
What is computer vision? Computer vision is a field of artificial intelligence (AI) that enables computers and systems to derive meaningful information from digital images, videos and other visual inputs — and take actions or make recommendations based on that information. If AI enables computers to think, computer vision enables them to see, observe and […]
Windows Subsystem for Linux(WSL) : Running linux on your Windows OS
Windows Subsystem for Linux (WSL) lets developers run a GNU/Linux environment — including most command-line tools, utilities, and applications — directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup. Prerequisites You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11. How to […]
Docker: Docker Cheat Sheet
A Docker cheat sheet is a set of notes used for quick reference while using Docker in the real world. Below is the Docker cheat sheet that includes an extensive list of Docker commands. You can use it as a quick reference guide when working with Docker. Docker Basic Commands COMMANDS DESCRIPTIONS systemctl start docker Start Docker service systemctl restart […]
Google Cloud: DNS Overview
Introduction DNS is a hierarchical distributed database that stores IP addresses and other data and allows queries by name. In other words, DNS is a directory of easily readable domain names that translate to numeric IP addresses used by computers to communicate with each other. For example, when you type a URL into a browser, […]
Bitbucket: Branch or fork your repository
There are a number of ways to get your Bitbucket Cloud repository code so that you can work on the project. Each method is slightly different and is done for different reasons. What is a branch? What is a fork? Branching and forking provide two ways of diverging from the main code line. Both Mercurial […]
Google Cloud: Interacting with Terraform Modules and Working with Terraform Registry
Overview As you manage your infrastructure with Terraform, increasingly complex configurations will be created. There is no intrinsic limit to the complexity of a single Terraform configuration file or directory, so it is possible to continue writing and updating your configuration files in a single directory. However, if you do, you may encounter one or […]