Giter Site home page Giter Site logo

nileshgule / techtalks-azure-container-apps-demo Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 12.27 MB

A simple example to showcase Azure container apps capabilities using a TechTalks demo with native integration for Dapr and KEDA

License: MIT License

C# 22.22% PowerShell 77.78%
azure azurecli azurecontainerapps dapr dapr-pub-sub keda keda-scalers microservices powershell rabbitmq

techtalks-azure-container-apps-demo's Introduction

techtalks-azure-container-apps-demo

This repository is a demo for the Azure Container Apps. It showcases how to deploy a simple .Net core application consisting of two microservices a RabbitMQ Producer and a RabbitMQ Consumer.

The application architecture along with the main components used are shown below.

Application Architecture

Azure container apps have native integration with Dapr and KEDA open source projects. this demo shows how to use Dapr and KEDA to scale the consumer app based on the messages in the RabbitMQ queue.

Pre-requisites:

Note: I am using a Azure Container Registry (ACR) to publish the container images. You can use any container registry of your choice.


Steps to build and deploy the application

Follow the steps mentioned in the build container images to build the container images for TechTalks Producer and Consumer applications.

Push the docker images to the container registry

Follow the steps mentioned in the publish container images to registry to push the container images to the container registry.

We are now all set to deploy the application to Azure Container Apps.


Deploy the application to Azure Container Apps

1 - Create RabbitMQ cluster

Follow the steps mentioned in the create RabbitMQ cluster to create a RabbitMQ cluster.

If you have an existing RabbitMQ cluster, you can skip this step. In this case you will need to update the configuration for the Dapr Pubsub component to point to your RabbitMQ cluster. The same configuration needs to be updated for the KEDA autoscaler configuration.

2 - Configure the RabbitMQ queue

Follow the steps mentioned in the configure RabbitMQ queue to configure the RabbitMQ queue.

3 - Enable Azure Container Apps for your subscription

Follow the steps mentioned in the enable Azure Container Apps to enable Azure Container Apps for your subscription.

4 - Deploy RabbitMQ Producer and Consumer applications to Azure Container Apps

Follow the steps mentioned in the Deploy RabbitMQ Producer and Consumer applications to Azure Container Apps to deploy the RabbitMQ Producer and Consumer applications to Azure Container Apps.

5 - Test the applications

Follow the steps mentioned in the Test the Producer and Consumer apps to test the applications.

Enable KEDA for the Azure Container Apps

Follow the steps mentioned in the autoscale consumer using KEDA to enable KEDA for the Azure Container Apps.

Delete resources

Refer to the cleanup resources to delete the resources created for this demo.


Public talks / YouTube videos linked to this project

  • AzureTar YouTube channel by Jorge Arteiro - Microservices developement with Azure Container Apps, Keda and Dapr
  • Festive Tech Calendar - Getting started with Azure Container Apps
  • YouTube video about creating RabbitMQ VM using Bitnami Marketplace image and Azure Portal
  • YouTube video about creating RabbitMQ VM using Bitnami Marketplace image and Azure CLI

techtalks-azure-container-apps-demo's People

Contributors

dependabot[bot] avatar nileshgule avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nupurbaranwal

techtalks-azure-container-apps-demo's Issues

swashbuckle.aspnetcore.6.2.3.nupkg: 1 vulnerabilities (highest severity is: 7.5) - autoclosed

Vulnerable Library - swashbuckle.aspnetcore.6.2.3.nupkg

Path to dependency file: /src/TechTalksConsumer/TechTalksConsumer.csproj

Path to vulnerable library: /home/wss-scanner/.nuget/packages/microsoft.extensions.apidescription.server/3.0.0/microsoft.extensions.apidescription.server.3.0.0.nupkg

Found in HEAD commit: b5364dace8accd65bacfebc49674d5def088bd0c

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (swashbuckle.aspnetcore.6.2.3.nupkg version) Remediation Available
WS-2022-0161 High 7.5 microsoft.extensions.apidescription.server.3.0.0.nupkg Transitive N/A*

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the section "Details" below to see if there is a version of transitive dependency where vulnerability is fixed.

Details

WS-2022-0161

Vulnerable Library - microsoft.extensions.apidescription.server.3.0.0.nupkg

MSBuild tasks and targets for build-time Swagger and OpenApi document generation

This package was b...

Library home page: https://api.nuget.org/packages/microsoft.extensions.apidescription.server.3.0.0.nupkg

Path to dependency file: /src/TechTalksConsumer/TechTalksConsumer.csproj

Path to vulnerable library: /home/wss-scanner/.nuget/packages/microsoft.extensions.apidescription.server/3.0.0/microsoft.extensions.apidescription.server.3.0.0.nupkg

Dependency Hierarchy:

  • swashbuckle.aspnetcore.6.2.3.nupkg (Root Library)
    • microsoft.extensions.apidescription.server.3.0.0.nupkg (Vulnerable Library)

Found in HEAD commit: b5364dace8accd65bacfebc49674d5def088bd0c

Found in base branch: main

Vulnerability Details

Improper Handling of Exceptional Conditions in Newtonsoft.Json.
Newtonsoft.Json prior to version 13.0.1 is vulnerable to Insecure Defaults due to improper handling of StackOverFlow exception (SOE) whenever nested expressions are being processed. Exploiting this vulnerability results in Denial Of Service (DoS), and it is exploitable when an attacker sends 5 requests that cause SOE in time frame of 5 minutes. This vulnerability affects Internet Information Services (IIS) Applications.

Publish Date: 2022-06-22

URL: WS-2022-0161

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2022-06-22

Fix Resolution: Newtonsoft.Json - 13.0.1;Microsoft.Extensions.ApiDescription.Server - 6.0.0

Step up your Open Source Security Game with Mend here

dapr.aspnetcore.1.8.0.nupkg: 1 vulnerabilities (highest severity is: 7.5)

Vulnerable Library - dapr.aspnetcore.1.8.0.nupkg

Path to dependency file: /src/TechTalksConsumer/TechTalksConsumer.csproj

Path to vulnerable library: /home/wss-scanner/.nuget/packages/google.protobuf/3.15.0/google.protobuf.3.15.0.nupkg

Found in HEAD commit: b5364dace8accd65bacfebc49674d5def088bd0c

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (dapr.aspnetcore.1.8.0.nupkg version) Remediation Available
CVE-2022-1941 High 7.5 google.protobuf.3.15.0.nupkg Transitive N/A*

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the section "Details" below to see if there is a version of transitive dependency where vulnerability is fixed.

Details

CVE-2022-1941

Vulnerable Library - google.protobuf.3.15.0.nupkg

C# runtime library for Protocol Buffers - Google's data interchange format.

Library home page: https://api.nuget.org/packages/google.protobuf.3.15.0.nupkg

Path to dependency file: /src/TechTalksConsumer/TechTalksConsumer.csproj

Path to vulnerable library: /home/wss-scanner/.nuget/packages/google.protobuf/3.15.0/google.protobuf.3.15.0.nupkg

Dependency Hierarchy:

  • dapr.aspnetcore.1.8.0.nupkg (Root Library)
    • dapr.client.1.8.0.nupkg
      • google.api.commonprotos.2.2.0.nupkg
        • google.protobuf.3.15.0.nupkg (Vulnerable Library)

Found in HEAD commit: b5364dace8accd65bacfebc49674d5def088bd0c

Found in base branch: main

Vulnerability Details

A parsing vulnerability for the MessageSet type in the ProtocolBuffers versions prior to and including 3.16.1, 3.17.3, 3.18.2, 3.19.4, 3.20.1 and 3.21.5 for protobuf-cpp, and versions prior to and including 3.16.1, 3.17.3, 3.18.2, 3.19.4, 3.20.1 and 4.21.5 for protobuf-python can lead to out of memory failures. A specially crafted message with multiple key-value per elements creates parsing issues, and can lead to a Denial of Service against services receiving unsanitized input. We recommend upgrading to versions 3.18.3, 3.19.5, 3.20.2, 3.21.6 for protobuf-cpp and 3.18.3, 3.19.5, 3.20.2, 4.21.6 for protobuf-python. Versions for 3.16 and 3.17 are no longer updated.

Publish Date: 2022-09-22

URL: CVE-2022-1941

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://cloud.google.com/support/bulletins#GCP-2022-019

Release Date: 2022-09-22

Fix Resolution: Google.Protobuf - 3.18.3,3.19.5,3.20.2,3.21.6;protobuf-python - 3.18.3,3.19.5,3.20.2,4.21.6

Step up your Open Source Security Game with Mend here

newtonsoft.json.12.0.3.nupkg: 1 vulnerabilities (highest severity is: 7.5) - autoclosed

Vulnerable Library - newtonsoft.json.12.0.3.nupkg

Json.NET is a popular high-performance JSON framework for .NET

Library home page: https://api.nuget.org/packages/newtonsoft.json.12.0.3.nupkg

Path to dependency file: /src/TechTalksMQProducer/TechTalksMQProducer.csproj

Path to vulnerable library: /on/12.0.3/newtonsoft.json.12.0.3.nupkg

Found in HEAD commit: b5364dace8accd65bacfebc49674d5def088bd0c

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (newtonsoft.json.12.0.3.nupkg version) Remediation Available
WS-2022-0161 High 7.5 newtonsoft.json.12.0.3.nupkg Direct Newtonsoft.Json - 13.0.1;Microsoft.Extensions.ApiDescription.Server - 6.0.0

Details

WS-2022-0161

Vulnerable Library - newtonsoft.json.12.0.3.nupkg

Json.NET is a popular high-performance JSON framework for .NET

Library home page: https://api.nuget.org/packages/newtonsoft.json.12.0.3.nupkg

Path to dependency file: /src/TechTalksMQProducer/TechTalksMQProducer.csproj

Path to vulnerable library: /on/12.0.3/newtonsoft.json.12.0.3.nupkg

Dependency Hierarchy:

  • newtonsoft.json.12.0.3.nupkg (Vulnerable Library)

Found in HEAD commit: b5364dace8accd65bacfebc49674d5def088bd0c

Found in base branch: main

Vulnerability Details

Improper Handling of Exceptional Conditions in Newtonsoft.Json.
Newtonsoft.Json prior to version 13.0.1 is vulnerable to Insecure Defaults due to improper handling of StackOverFlow exception (SOE) whenever nested expressions are being processed. Exploiting this vulnerability results in Denial Of Service (DoS), and it is exploitable when an attacker sends 5 requests that cause SOE in time frame of 5 minutes. This vulnerability affects Internet Information Services (IIS) Applications.

Publish Date: 2022-06-22

URL: WS-2022-0161

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2022-06-22

Fix Resolution: Newtonsoft.Json - 13.0.1;Microsoft.Extensions.ApiDescription.Server - 6.0.0

Step up your Open Source Security Game with Mend here

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.