Magen Policy Service is a microservice responsible for managing policies and validating asset access requests against the current policies in force. It exposes REST APIs for managing policies. By assets we understand any sensitive resources that could be encrypted or wrapped in order to restrict access to them.
The Magen Policy Service also includes a prototype policy information provider known as the Location Service that can provide user/device context for a policy decision. For example, imagine the Policy Service is evaluating an asset access request against a policy that allows access to devices in a specific geographical area. The Location Service could be the Policy Service's source for the needed device location information.
Current version: 1.0a1
All of Magen services depend on an operations git submodule magen_helper.
When cloning this repo, make sure to provide --recursive flag or after the clone execute a command to update magen-helpers git submodule:
git submodule update --init --recursive
For This Service there are available make commands. Makefile is located under policy/
Make Default Target: make default. Here is the list of targets available for policy
default:
@echo 'Makefile for Magen Policy Service'
@echo
@echo 'Usage:'
@echo ' make clean :Remove packages from system and pyc files'
@echo ' make test :Run the test suite'
@echo ' make package :Create Python wheel package'
@echo ' make install :Install Python wheel package'
@echo ' make all :clean->package->install'
@echo ' make list :List of All Magen Dependencies'
@echo ' make build_docker :Pull Base Docker Image and Current Image'
@echo ' make run_docker :Build and Run required Docker containers with mounted source'
@echo ' make runpkg_docker :Build and Run required Docker containers with created wheel'
@echo ' make test_docker :Build, Start and Run tests inside main Docker container interactively'
@echo ' make stop_docker :Stop and Remove All running Docker containers'
@echo ' make clean_docker :Remove Docker unused images'
@echo ' make rm_docker :Remove All Docker images if no containers running'
@echo ' make doc :Generate Sphinx API docs'
@echo
@echopython3 -V: Python 3.5.2 (>=3.4)pip3 -V: pip 9.0.1make -v: GNU Make 3.81docker -v: Docker version 17.03.0-ce, build 60ccb22docker-compose -v: docker-compose version 1.11.2, build dfed245- Make sure you have correct rights to clone Cisco-Magen github organization
python3 -V: Python 3.5.2pip3 -V: pip 9.0.1make -v: GNU Make 4.1docker -v: Docker version 17.03.0-ce, build 60ccb22docker-compose -v: docker-compose version 1.11.2, build dfed245- Make sure AWS user and root have correct rights to Cisco-Magen github organization
make all-> Install Magen-Core dependencies, clean, package and install policy packagemake test-> run policy tests
- get helper_scripts to the repo
- follow the structure in docker_policy to create
docker-compose.ymlandDockerfilefiles - use Makefile as an example for building make automation
There is a configured Sphinx API docs for the service. To compile docs execute:
make doc in the policy directory