Policy Server is a policy engine is written in python inspired by OPA
Project description
policyserver
Policy Server is a policy engine is written in python inspired by OPA unlike OPA policy can be written in Python
Usage
```bash
$> policyserver --help
positional arguments:
{server} sub-commands
server run server.
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-l, --log-level log level.
```
Installation
Steps to Install Policy Server
-
Pip Install Policy Server
pip3 install policyserver
Example
* To start a server
```bash
policyserver server -r examples/block_ssh/
```
* Check the result of the policy based on user input
```bassh
cat << EOF > input.json
{
"user": "user1",
"network": "192.0.2.0/17"
}
EOF
>> curl -X POST -d @input.json -H "Content-Type: application/json" http://localhost:8081/ps/v1/ssh/user_allow_network
{"status":false}
```
Setting up development environment
- Clone Policy Server repo
git clone https://github.com/SheverNts/policyserver.git
- Setup Virtual env
virtulaenv -p $(which python3) policyserver cd policyserver source bin/activate pip3 install requirements_test.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
policyserver-0.0.1.tar.gz
(17.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file policyserver-0.0.1.tar.gz.
File metadata
- Download URL: policyserver-0.0.1.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c1ad4d1b6c62f9f6b04676012dda3de7e0eafcadb63afb2f4f6a165b8707a5b
|
|
| MD5 |
5c5311f356fc7b3c8b1809dc3b043dcb
|
|
| BLAKE2b-256 |
77dd6c00ea11d7dcaae188b8b114ac6202e6641e8fff5362de828ea7c8e28cdf
|
File details
Details for the file policyserver-0.0.1-py3-none-any.whl.
File metadata
- Download URL: policyserver-0.0.1-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2dec655c90d8289e9ba455f13203e9bed0a9bc4c7203d87bc1163cebbb0b3ca
|
|
| MD5 |
660a5acba652b39f6196b05e935e1e15
|
|
| BLAKE2b-256 |
538db575bbb3b8e79b1fb09be5ff57b7d121e344439833f7842a71135df61ea6
|