Code Monkey home page Code Monkey logo

ctfd-azure-paas's Introduction

CTFd on Azure PaaS

This project sets up a self-hosted, secured CTFd environment, using Azure PaaS, that is easy to maintain. It supports the Capture-the-Flag with CTFd on Azure PaaS content on the [Azure Architecture Center](link.com TODO:).

Features

CTFd architecture

This project provides the following features:

Getting Started

Prerequisites

  • Azure CLI
  • Azure Subscription with at least a Resource-Group's Contributor access

Quickstart

Deploy to Azure

git clone https://github.com/Azure-Samples/ctfd-azure-paas.git
cd ctfd-azure-paas

# This is bash syntax. if using Powershell, add $ sign before the assignments (i.e. $DB_PASSWORD='YOUR PASSWORD')
DB_PASSWORD='YOUR PASSWORD'
RESOURCE_GROUP_NAME='RESOURCE GROUP NAME'

az deployment group create --resource-group $RESOURCE_GROUP_NAME --template-file ctfd.bicep --parameters administratorLoginPassword=$DB_PASSWORD 

Access and Configure CTFd

  • Navigate your browser to the App Service URL, in the form of *https://[YOUR APP SERVICE NAME].azurewebsites.net*
  • Configure your Capture the Flag event using the administrator dashboard. more info here

Troubleshooting and debugging

  • Navigate to the Log Analytics workspace in the resource group.
  • Check logs from CTFd container(s) using the table AppServiceConsoleLogs

Adjustable Network Isolation

By default the solution isolates network traffic from the CTFd App Service to the internal services (database, cache and key mangement) using a virtual network. You may reduce the solution complexity and potentially optimize cost by provisioning it without network isolation using the following command:

az deployment group create --resource-group $RESOURCE_GROUP_NAME --template-file ctfd.bicep --parameters administratorLoginPassword=$DB_PASSWORD --parameters vnet=False

When provisioing the solution without a virtual network, the archicture diagram should look like this:

CTFd architecture without vnet

Cleanup

Delete the resource group using the following command

az group delete -n $RESOURCE_GROUP_NAME

Additinal Configuratin Options

The template deployment can be further configured using the following parameters:

  • resourcesLocation - Location for all resources. Defaults to the resource group location.
  • vnet - Deploy the solution with VNet. Defaults to True
  • redisSkuName - Azure Cache for Redis SKU Name. More info at Azure Cache for Redis Pricing
  • redisSkuSize - Azure Cache for Redis SKU Size. More info at Azure Cache for Redis Pricing
  • administratorLogin - Admin Login of Azure Database for MySQL
  • administratorLoginPassword - Admin Password of Azure Database for MySQL
  • mysqlType - Azure Database for MySQL Workload Type. Can be either Development, SmallMedium or BusinessCritical. This affects the underlying virtual machine size as well as the storage capacity. More info at Azure Database for MySQL Pricing
  • appServicePlanSkuName - Azure App Service Plan SKU Name. More info at Azure App Service Pricing
  • webAppName - Azure App Service Name. Controls the DNS name of the CTF site.

Contribute to this project

Follow the Contribution Guide

Resources

ctfd-azure-paas's People

Contributors

balteravishay avatar microsoftopensource avatar blacksud0 avatar microsoft-github-operations[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.