Commit Briefs

baf2c1e410 mischa

remove requests.conf (main)


3c5e97fc45 mischa

move requests.conf to requests.conf-example


2a4b05e26b mischa

add .gitignore for requests.conf


4a4cfd10ac mischa

minor README tweaks


19d980d1e9 mischa

add .gitignore for files in /storage


df6b2b147b mischa

add information around /storage


6266b91f67 mischa

add configurable EMAIL_DOMAIN and WWW_DOMAIN


19fa0e4665 mischa

Initial import


Branches

Tags

This repository contains no tags

Tree

.gitignorecommits | blame
README.mdcommits | blame
gen.pl*commits | blame
requests.conf-examplecommits | blame
requests.pl*commits | blame
storage/
www/

README.md

# Email Appproval Requests

The setup consists of two pieces:

1. Perl script, requests.pl
Pulls the requests via the Prisma Browser API generates and sends an email to the admin.

2. PHP, www/*
Handles the approve or decline of the request and translates this to the Prisma Browser API.

Both parts need are using a directory called: storage
Needs to be writeable for the webserver as well as requests.pl
Typically owned by www:www

There are a couple of modules the Perl script needs:

- Cwd (should be included)
- File::Basename (should be included)
- Getopt::Long (should be included)
- HTTP::Tiny, needs to be installed
- JSON::PP, needs to be installed
- Data::Dumper, needs to be installed

The PHP script uses GuzzleHttp to make the outbound API calls, this is included in the pkg.

In Palo Alto Networks SCM a service account needs to be created with read-write access.

requests.conf holds all the relevant data to process the requests.

- Company name
- Key, to identify the request, generated by gen.pl
- TSGID, can be find in the SCM tenant
- Frequency, options are: single (receive an email for every request) or digest (bundle requests in a single email)
- Email address of the recipient
- BCC, other email addresses for the requests to be send to
- Client ID
- Client Secret

NOTE: $EMAIL_DOMAIN and $WWW_DOMAIN need to be set in requests.pl