-
Notifications
You must be signed in to change notification settings - Fork 14
Build and Run from Source
To build the project from source, all you need is Node.JS installed.
If you want to generate the EXE and Linux binaries too, then you will also need the PKG package installed globally.
Quick Links:
- Clone/Download the project
git clone https://github.com/microsoft/Privileged-Security-Management.git
or using GitHub Desktop:
- Install the latest LTS build of Node.JS: https://nodejs.org/en/download/
- (Optional) Install PKG to be able to generate EXE/Linux Bin files:
npm install -g pkg
Since the server and UI are built in separate folders, you can technically run the API server without a UI. Because of this, there are extra build steps to follow to build the entire project as you will need to build the Server and the UI separately.
You can build the server or the UI in any order.
- Change your working directory to the
Server
directory:
cd /Server
- Install the dependencies:
npm install
- Compile the servers files:
npm run build
Now you can run the server 😎
You can start the server by running:
npm start
The user interface is a standalone API client. The server doesn't technically need one to operate. The server has been configured to serve a UI from the bin folder next to the server core API files.
- Change your working directory to the
User-Interface
directory:
cd /User-Interface
- Install the UI's dependencies:
npm install
- Compile the UI files:
npm run build
The Windows installers are built using the Advanced Installer tool from Caphyon.
An Enterprise
or higher license is required as custom dialogs are used to keep the MSI
and EXE
installers on brand. Since this is an open-source project, Caphyon has very generously granted us an Architect
license to build our installers via Ci/CD with GitHub Actions.
To Build the EXE
and MSI
installers, you can run the below CLI command in advanced installer.
The EXE
version needs to be built first as the EXE
build process will delete any existing MSI
as an MSI
object is generated as part of the EXE
build process and subsequently deleted for resource clean up reasons. So, by building the EXE
first then the MSI
, you will have both in the dist
folder.
Before building the Installers, the raw Windows EXE
needs to be generated from PKG as the Advanced Installer system is configured to package it up.
Note: The Advanced Installer executables are located here by default on a 64-Bit Windows computer:
C:\Program Files (x86)\Caphyon\Advanced Installer 19.5\bin\x86
- Set the working directory to the
Server
folder:
cd /Server
- Build the raw EXE:
npx pkg .
- Set the working directory to the Project's Root:
cd ..
- Build the EXE Installer:
AdvancedInstaller.com /build ".\Privileged Security Management.aip" -buildslist "EXE"
- Build the MSI Installer:
AdvancedInstaller.com /build ".\Privileged Security Management.aip" -buildslist "MSI"
You are done!
The UI and the server's files have been compiled and are ready to operate.
Starting the server will serve the UI at the servers root. You can start the server by running the below command in the Server
directory:
npm start
Don't forget to configure the environmental variables if you are running without a Managed Identity as you will need to authenticate via an App Registration.
- Deployment
- Deploy to Azure (todo, Preferred)
- Deploy to Container (todo)
- Deploy to Windows (todo)
- Deploy to Linux (todo)
- Deploy/Run from Source
- Required Graph API Permissions
- Configuration
- Managed Identity
- App Registration (Coming Soon)
- Environmental Variables Reference
- Scope Tag Data Format
- PAW Group Data Format
- Debug Mode (todo)
- Identity Reference (todo)
- Usage
- Architecture Auto Deployment (todo)
- PAW Lifecycle Management (todo)
- Silo Management (todo)
- Configuration Health Check (todo)
- In-app Permissions/RBAC/IAM (todo)
- Updating the App (todo)
- Workflows
- Troubleshooting
- REST API
- Policy List
- Dev Zone
- Troubleshooting (Coming Soon)