Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshify authored Oct 30, 2024
2 parents 88f5a47 + 65176b0 commit b8f08d3
Show file tree
Hide file tree
Showing 196 changed files with 60,878 additions and 44,034 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ on:
push:
branches:
- dev
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- dev

jobs:
build_and_deploy_job:
if: github.event.repository.fork == false && github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
if: github.event.repository.fork == false && github.event_name == 'push'
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
__*
__*
.next/*
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"eg2.vscode-npm-script",
"christian-kohler.npm-intellisense",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint"
"stylelint.vscode-stylelint",
"editorconfig.editorconfig"
]
}
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
"request": "launch",
"name": "Launch Chrome Debugger",
"url": "http://localhost:4280"
},
{
"type": "PowerShell",
"name": "Launch in Windows Terminal",
"request": "launch",
"cwd": "${cwd}",
"script": ". '${cwd}\\Tools\\Start-CippDevEmulators.ps1'"
}
],
"compounds": [
Expand Down
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
![CyberDrain Light](github_assets/img/CIPP.png#gh-dark-mode-only)
![CyberDrain Dark](github_assets/img/CIPP-Light.png#gh-light-mode-only)

<center><h1>Sponsored by</h1></center>
<p align="center">

![OIT](github_assets/img/oitpsonsor_light.png)&nbsp;&nbsp;&nbsp;&nbsp;
![Immybot](github_assets/img/Immybot.png)&nbsp;&nbsp;&nbsp;&nbsp;
![NinjaOne](github_assets/img/NinjaOne-Light.png#gh-dark-mode-only)
![NinjaOne](github_assets/img/NinjaOne-Dark.png#gh-light-mode-only)&nbsp;&nbsp;&nbsp;&nbsp;
![Huntress](github_assets/img/Huntress.png)
![HaloPSA](github_assets/img/halopsa-red-grey.svg)

</p>

# What is this?

The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners. The current Microsoft partner landscape makes it fairly hard to manage multi tenant situations, with loads of manual work. Microsoft Lighthouse might resolve this in the future but development of this is lagging far behind development of the current market for Microsoft Partners.
The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners. The current Microsoft partner landscape makes it fairly hard to manage multi tenant situations, with loads of manual work. Microsoft Lighthouse might resolve this in the future but development of this is lagging far behind development of the current market for Microsoft Partners.
This project is a way to help you with administration, with user management, and deploying your own preferred standards. It's not a replacement for security tools, or a way to cut costs on specific subscriptions. The tool should assist you in removing the gripes with standard partner management and save you several hours per engineer per month.
For more information, we recommend checking out our website [here](https://cipp.app)
For detailed documentation about features of CIPP, please check out our [documentation.](https://docs.cipp.app)

This project is a way to help you with administration, with user management, and deploying your own preferred standards. It's not a replacement for security tools, or a way to cut costs on specific subscriptions. The tool should assist you in removing the gripes with standard partner management and save you several hours per engineer per month.
# Our sponsors

for more information, we recommend checking out our website [here](https://cipp.app)
You can find our sponsors [here.](https://docs.cipp.app/#our-sponsors)
12 changes: 12 additions & 0 deletions Tools/Start-CippDevEmulators.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Write-Host 'Starting CIPP Dev Emulators'
Get-Process node -ErrorAction SilentlyContinue | Stop-Process -ErrorAction SilentlyContinue
$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName

$Process = Read-Host -Prompt 'Start Process Function (y/N)?'

if ($Process -eq 'y') {
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run start`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa`; new-tab --title 'CIPP-API-Processor' -d $Path\CIPP-API-Processor pwsh -c func start --port 7072
} else {
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run start`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa
}

62 changes: 19 additions & 43 deletions deployment/AzureDeploymentTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
"metadata": {
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token"
}
},
"GithubAPIRepository": {
"defaultValue": "https://github.com/KelvinTegelaar/CIPP-API",
"type": "string",
"metadata": {
"description": "URL to your Github backend fork."
}
}
},
"variables": {
Expand Down Expand Up @@ -57,7 +50,7 @@
"objectId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
"permissions": {
"keys": [],
"secrets": ["all"],
"secrets": [ "all" ],
"certificates": []
}
}
Expand Down Expand Up @@ -116,7 +109,7 @@
]
}
],
"dependsOn": ["[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"]
"dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('funcAppName'))]" ]
},
{
"apiVersion": "2015-08-01",
Expand All @@ -135,7 +128,7 @@
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverFarmName'))]",
"siteConfig": {
"Use32BitWorkerProcess": false,
"powerShellVersion": "7.2",
"powerShellVersion": "7.4",
"appSettings": [
{
"name": "AzureWebJobsStorage",
Expand All @@ -154,53 +147,36 @@
"value": "~4"
},
{
"name": "ApplicationID",
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationId)')]"
},
{
"name": "ApplicationSecret",
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationSecret)')]"
},
{
"name": "RefreshToken",
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/RefreshToken)')]"
},
{
"name": "TenantID",
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/tenantid)')]"
"name": "WEBSITE_RUN_FROM_PACKAGE",
"value": "1"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "powershell"
}
]
}
},
"resources": [
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": ["[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]"],
"properties": {
"RepoUrl": "[parameters('GithubAPIRepository')]",
"repositoryToken": "[parameters('GithubToken')]",
"token": "[parameters('GithubToken')]",

"branch": "master",
"publishRunbook": true,
"IsManualIntegration": true
}
}
]
}
},
{
"name": "[concat(variables('funcAppName'), '/ZipDeploy')]",
"type": "Microsoft.Web/sites/extensions",
"apiVersion": "2021-02-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
],
"properties": {
"packageUri": "https://cippreleases.blob.core.windows.net/cipp-api/latest.zip"
}
},
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2018-07-01",
"name": "[variables('funcStorageName')]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "funStorageName"
"displayName": "funcStorageName"
},
"sku": {
"name": "Standard_LRS"
Expand Down
63 changes: 21 additions & 42 deletions deployment/AzureDeploymentTemplate_regionoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"defaultValue": "CIPP",
"type": "string",
"metadata": {
"description": "Name use as base-template to named the resources deployed in Azure."
"description": "Name used as base-template to name the resources deployed in Azure."
}
},
"GithubRepository": {
Expand All @@ -20,14 +20,7 @@
"defaultValue": "GeneratedPassword",
"type": "string",
"metadata": {
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token"
}
},
"GithubAPIRepository": {
"defaultValue": "https://github.com/KelvinTegelaar/CIPP-API",
"type": "string",
"metadata": {
"description": "URL to your Github backend fork."
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token)"
}
}
},
Expand Down Expand Up @@ -57,7 +50,7 @@
"objectId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
"permissions": {
"keys": [],
"secrets": ["all"],
"secrets": [ "all" ],
"certificates": []
}
}
Expand Down Expand Up @@ -116,7 +109,7 @@
]
}
],
"dependsOn": ["[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"]
"dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('funcAppName'))]" ]
},
{
"apiVersion": "2015-08-01",
Expand All @@ -135,7 +128,7 @@
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverFarmName'))]",
"siteConfig": {
"Use32BitWorkerProcess": false,
"powerShellVersion": "7.2",
"powerShellVersion": "7.4",
"appSettings": [
{
"name": "AzureWebJobsStorage",
Expand All @@ -154,50 +147,36 @@
"value": "~4"
},
{
"name": "ApplicationID",
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationId)')]"
},
{
"name": "ApplicationSecret",
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationSecret)')]"
},
{
"name": "RefreshToken",
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/RefreshToken)')]"
},
{
"name": "TenantID",
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/tenantid)')]"
"name": "WEBSITE_RUN_FROM_PACKAGE",
"value": "1"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "powershell"
}
]
}
},
"resources": [
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": ["[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]"],
"properties": {
"RepoUrl": "[parameters('GithubAPIRepository')]",
"branch": "master",
"publishRunbook": true,
"IsManualIntegration": true
}
}
]
}
},
{
"name": "[concat(variables('funcAppName'), '/ZipDeploy')]",
"type": "Microsoft.Web/sites/extensions",
"apiVersion": "2021-02-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
],
"properties": {
"packageUri": "https://cippreleases.blob.core.windows.net/cipp-api/latest.zip"
}
},
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2018-07-01",
"name": "[variables('funcStorageName')]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "funStorageName"
"displayName": "funcStorageName"
},
"sku": {
"name": "Standard_LRS"
Expand Down
6 changes: 3 additions & 3 deletions deployment/DevAzureDeploymentTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"defaultValue": "CIPPDev",
"type": "string",
"metadata": {
"description": "Name use as base-template to named the resources deployed in Azure."
"description": "Name used as base-template to name the resources deployed in Azure."
}
},
"TenantID": {
Expand Down Expand Up @@ -48,7 +48,7 @@
"defaultValue": "GeneratedPassword",
"type": "string",
"metadata": {
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token"
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token)"
}
},
"GithubAPIRepository": {
Expand Down Expand Up @@ -250,7 +250,7 @@
"name": "[variables('funcStorageName')]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "funStorageName"
"displayName": "funcStorageName"
},
"sku": {
"name": "Standard_LRS"
Expand Down
4 changes: 2 additions & 2 deletions deployment/DevAzureDeploymentTemplate_regionoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"defaultValue": "CIPP",
"type": "string",
"metadata": {
"description": "Name use as base-template to named the resources deployed in Azure."
"description": "Name used as base-template to name the resources deployed in Azure."
}
},
"TenantID": {
Expand Down Expand Up @@ -48,7 +48,7 @@
"defaultValue": "GeneratedPassword",
"type": "string",
"metadata": {
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token"
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token)"
}
},
"GithubAPIRepository": {
Expand Down
Loading

0 comments on commit b8f08d3

Please sign in to comment.