Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
de371f4
chore: add skeleton files and requirements
Vishnu2707 Apr 25, 2026
dd24ce0
fix: remove embedded git repo
Vishnu2707 Apr 25, 2026
e872074
Core Structure Created
Vishnu2707 Apr 25, 2026
ee77377
feat: build complete core — scanner engine, 10 rules, API, playbooks,…
Vishnu2707 Apr 25, 2026
053be03
docs: replace ASCII architecture with interactive Mermaid diagram
Vishnu2707 Apr 25, 2026
b31ecb7
feat: Sentinel integration — ingest.py, 4 KQL rules, setup guide (#12)
TFT444 May 2, 2026
d545744
fix: add AZ-STOR-003 compliance mappings, correct NIST control to PR.…
Vishnu2707 May 4, 2026
6c0c58e
docs: add real-world breach scenarios for all 10 starter rules (#15)
TFT444 May 4, 2026
e4382cd
feat: add AZ-KV-002 key vault public access rule and remediation play…
parthrohit22 May 4, 2026
7593ba0
Merge branch 'main' into dev
Vishnu2707 May 4, 2026
0ec2290
Merge remote-tracking branch 'origin/main' into dev
Vishnu2707 May 4, 2026
e8fed83
docs: update README with rule count, roadmap progress and contributors
Vishnu2707 May 4, 2026
35312d4
feat: add network security rules AZ-NET-003 to AZ-NET-010 (#16)
TFT444 May 4, 2026
aee88b2
Merge remote-tracking branch 'origin/main' into dev
Vishnu2707 May 4, 2026
2badbce
Feat/az stor 003 (#21)
ritiksah141 May 5, 2026
1e7a81f
docs: add SOC 2 Type II compliance framework mapping (#33)
TFT444 May 8, 2026
f409b67
Refactor/azure client network methods (#22)
TFT444 May 9, 2026
bb47779
feat: add CI pipeline with 6 automated checks (#34)
ritiksah141 May 9, 2026
0d99e2d
Merge branch 'main' into dev
Vishnu2707 May 9, 2026
46096a6
Merge remote-tracking branch 'origin/main' into dev
Vishnu2707 May 9, 2026
9e5d355
docs: update .github/ISSUE_TEMPLATE/new_rule.md to reflect current co…
Vishnu2707 May 9, 2026
2a5655e
docs: update .github/PULL_REQUEST_TEMPLATE.md to reflect current code…
Vishnu2707 May 9, 2026
57f25a6
docs: update CONTRIBUTING.md to reflect current codebase state
Vishnu2707 May 9, 2026
309deca
docs: update README.md to reflect current codebase state
Vishnu2707 May 9, 2026
693b20c
docs: update compliance/frameworks/iso27001.json to reflect current c…
Vishnu2707 May 9, 2026
c292efc
docs: update compliance/frameworks/nist_csf.json to reflect current c…
Vishnu2707 May 9, 2026
034b9d5
docs: update docs/adding-a-rule.md to reflect current codebase state
Vishnu2707 May 9, 2026
936a7d6
docs: update docs/architecture.md to reflect current codebase state
Vishnu2707 May 9, 2026
3cd0f00
docs: update docs/az-stor-003-test-plan.md to reflect current codebas…
Vishnu2707 May 9, 2026
17c29f4
docs: update docs/azure-setup.md to reflect current codebase state
Vishnu2707 May 9, 2026
6275396
docs: update docs/ci-pipeline.md to reflect current codebase state
Vishnu2707 May 9, 2026
ab16a16
docs: update docs/sentinel-setup.md to reflect current codebase state
Vishnu2707 May 9, 2026
1cd89dd
docs: update sentinel/TEST_PLAN.md to reflect current codebase state
Vishnu2707 May 9, 2026
a2fed2e
docs: update docs/api-reference.md to reflect current codebase state
Vishnu2707 May 9, 2026
98894bc
docs: update docs/rules-reference.md to reflect current codebase state
Vishnu2707 May 9, 2026
fdae7e7
Merge remote-tracking branch 'origin/dev' into dev
Vishnu2707 May 9, 2026
85bbb7f
docs: update README.md for professional open source style
Vishnu2707 May 9, 2026
0643eaf
docs: update CONTRIBUTING.md for professional open source style
Vishnu2707 May 9, 2026
5ebcdd9
docs: update docs/adding-a-rule.md for professional open source style
Vishnu2707 May 9, 2026
eb88659
Merge branch 'main' into dev
Vishnu2707 May 9, 2026
2d230dd
docs: update deployment guide to use Render instead of Azure App Service
Vishnu2707 May 9, 2026
bac6146
Merge remote-tracking branch 'origin/dev' into dev
Vishnu2707 May 9, 2026
d4384fe
feat: add rule AZ-STOR-004 storage account diagnostic logging check (…
SHAURYAKSHARMA24 May 13, 2026
826396a
feat: add rule AZ-IDN-003 Adds scanner rule AZ-IDN-003 detecting Entr…
TFT444 May 13, 2026
cd47b68
feat: add rule AZ-CMP-002 — VM disk not protected by CMK or ADE (#47)
TFT444 May 13, 2026
1efe1f3
Feat/api deployment (#46)
ritiksah141 May 13, 2026
ba6c70c
feat: AZ-NET-011 Network Watcher not enabled in all regions (#42)
emon22-ts May 13, 2026
e7c3487
feat: add AZ-DB-003 PostgreSQL Flexible Server SSL enforcement rule a…
emon22-ts May 16, 2026
024e635
Merge branch 'main' into dev
Vishnu2707 May 16, 2026
bc146ef
[RULE] AZ-CMP-003: VM without endpoint protection installed (#57)
TFT444 May 23, 2026
923cc75
[DOCS] Add OpenShield learning and onboarding portal (#51)
parthrohit22 May 23, 2026
954505c
Merge branch 'main' into dev
Vishnu2707 May 24, 2026
4a2ef01
refactor: reuse database connection per request using Flask g (#41)
safidnadaf May 24, 2026
0e82402
docs: add security policy, issue template, and README badges (#64)
ritiksah141 May 24, 2026
1b25a74
feat: add rule AZ-KV-004 Key Vault purge protection disabled (#55)
aav-wh May 24, 2026
4a1b153
feat: add AZ-STOR-005 geo-redundant storage rule (#74)
SHAURYAKSHARMA24 May 27, 2026
cd339e1
feat: add rule AZ-DB-004 SQL Server firewall allows all Azure service…
aav-wh May 27, 2026
00dad53
docs: add 6 README badges (#79)
ritiksah141 May 28, 2026
d362cc7
feat: add AZ-KV-005 Key Vault certificate expiring within 30 days (#75)
TFT444 May 28, 2026
82efdfb
[RULE] AZ-CMP-004: VM without automatic OS patching enabled (#73)
TFT444 May 28, 2026
1757c84
Merge branch 'main' into dev
Vishnu2707 May 29, 2026
6ff2686
feat: add AI provider abstraction layer for Anthropic, Groq and Gemin…
TFT444 May 29, 2026
5dedde9
Smoke Test Alginment after the recent changes to the Repository causi…
ritiksah141 May 29, 2026
8cf18db
feat: add AZ-IDN-004 PIM not configured for admin roles rule and play…
emon22-ts May 30, 2026
4b2afb5
feat: add AI executive summary and remediation endpoint (#95)
SHAURYAKSHARMA24 May 30, 2026
3636dd7
feat(scanner): add AZ-NET-014 VNet peering gateway transit rule (#94)
aav-wh May 30, 2026
70cb686
feat: add AZ-NET-013 Azure Firewall VNet rule (#99)
SHAURYAKSHARMA24 May 31, 2026
bf82c39
Implement AI Q&A over scan findings (#98)
SHAURYAKSHARMA24 May 31, 2026
9a1f824
Merge branch 'main' into dev
Vishnu2707 May 31, 2026
c0116f8
Feat/CVE correlation (#96)
ritiksah141 Jun 1, 2026
3d17d7b
feat: add RAG powered AI insights layer with Azure security skill emb…
TFT444 Jun 1, 2026
a2263a4
feat: add AZ-NET-012 - NSG flow logs not enabled rule (#76)
safidnadaf Jun 1, 2026
808a9c6
fix: resolve CodeQL warnings in embed.py and test files
Vishnu2707 Jun 1, 2026
c9592c0
Merge branch 'main' into dev
Vishnu2707 Jun 1, 2026
931d32c
feat(frontend): build complete 7-page security dashboard (#111)
vogonPrayas Jun 3, 2026
673511e
Feat/jwt secret prod fail closed (#117)
ritiksah141 Jun 3, 2026
03cd7cb
feat: AI-004 RAG Pipeline - Document Ingestion and Vector Store (#104)
emon22-ts Jun 3, 2026
115320f
Potential fix for pull request finding 'Unused import'
Vishnu2707 Jun 4, 2026
4ad4ceb
feat: add AZ-PQC-001 to AZ-PQC-003 post-quantum cryptography scanner …
Vishnu2707 Jun 4, 2026
6e5e9a4
feat: add PQC compliance mappings, azure client methods and dependencies
Vishnu2707 Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions ai/knowledge/skills/post-quantum-cryptography-azure/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
name: post-quantum-cryptography-azure
description: Identifies and remediates non-quantum-safe cryptographic configurations in Azure including classical TLS key exchange, RSA and ECC keys in Key Vault, and classical certificate algorithms. Maps findings to NIST PQC standards FIPS 203, FIPS 204, and FIPS 205. Use when assessing quantum readiness of Azure infrastructure or building a Cryptographic Bill of Materials.
domain: cybersecurity
subdomain: post-quantum-cryptography
tags:
- post-quantum
- pqc
- azure
- key-vault
- tls
- cryptography
- cbom
version: '1.0'
author: openshield
license: Apache-2.0
nist_csf:
- PR.DS-2
- PR.DS-1
---

# Post-Quantum Cryptography Assessment for Azure

## When to Use
- When assessing an Azure environment for quantum readiness
- When building a Cryptographic Bill of Materials for Azure resources
- When identifying classical cryptographic algorithms that need migration
- When planning post-quantum migration for Key Vault keys and certificates
- When evaluating TLS configurations for quantum vulnerability

## Key Concepts

| Term | Definition |
|------|------------|
| Harvest Now Decrypt Later | Attack where adversaries collect encrypted traffic today and decrypt it when quantum computers become available |
| Shor's Algorithm | Quantum algorithm that can break RSA and ECC by solving integer factorisation and discrete logarithm problems efficiently |
| ML-KEM | Module Lattice Key Encapsulation Mechanism, NIST FIPS 203, post-quantum safe key exchange |
| ML-DSA | Module Lattice Digital Signature Algorithm, NIST FIPS 204, post-quantum safe signing |
| SLH-DSA | Stateless Hash-Based Digital Signature Algorithm, NIST FIPS 205, post-quantum safe signing |
| CBOM | Cryptographic Bill of Materials, inventory of all cryptographic assets in a system |
| PQMA | Post-Quantum Migration Analyser, tool for validating PQC migration paths |

## OpenShield PQC Rules

| Rule | Description | Severity |
|------|-------------|----------|
| AZ-PQC-001 | TLS below 1.3 on App Service | HIGH |
| AZ-PQC-002 | Key Vault key using RSA or ECC algorithm | HIGH |
| AZ-PQC-003 | Key Vault certificate using non-quantum-safe signature algorithm | MEDIUM |

## Assessment Workflow

### Step 1: Identify Classical Keys in Key Vault
```bash
az keyvault list --output table
az keyvault key list --vault-name <vault-name> --output table
az keyvault certificate list --vault-name <vault-name> --output table
```

### Step 2: Check TLS Configuration on App Services
```bash
az webapp list --output table
az webapp config show --resource-group <rg> --name <app-name> --query minTlsVersion
```

### Step 3: Build Cryptographic Bill of Materials
Document all findings with resource ID, algorithm type, key size, expiry date, and dependent services.

### Step 4: Prioritise Migration
1. Keys and certificates exposed to internet traffic first
2. Long-lived keys with high blast radius second
3. Internal service-to-service encryption third

## NIST PQC Standards Reference

| Standard | Algorithm | Use Case |
|----------|-----------|----------|
| FIPS 203 | ML-KEM | Key encapsulation, replacing RSA and ECDH key exchange |
| FIPS 204 | ML-DSA | Digital signatures, replacing RSA-PSS and ECDSA |
| FIPS 205 | SLH-DSA | Digital signatures, hash-based alternative |

## Compliance Mapping

| Framework | Control | Requirement |
|-----------|---------|-------------|
| NIST CSF | PR.DS-2 | Data in transit is protected using quantum-safe algorithms |
| ISO 27001 | A.10.1.1 | Cryptographic controls policy must address quantum threats |
| CIS Azure | 8.1 | Key management must include post-quantum migration planning |
| SOC 2 | CC6.7 | Encryption protecting data in transit must be quantum-safe |
15 changes: 15 additions & 0 deletions compliance/frameworks/cis_azure_benchmark.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,21 @@
"control_id": "6.4",
"control_name": "Ensure that Azure Firewall is enabled on Virtual Networks",
"description": "VNet peering connections with allowGatewayTransit or useRemoteGateways enabled allow traffic to route between network segments through shared gateways. This can break network segmentation and enable lateral movement between zones that should remain isolated. Peering connections should be reviewed and gateway transit disabled unless explicitly required and documented."
},
"AZ-PQC-001": {
"control_id": "9.1",
"control_name": "Ensure TLS is enforced with quantum-safe configuration",
"description": "App Services configured with TLS versions below 1.3 use classical key exchange algorithms vulnerable to Harvest Now Decrypt Later attacks. CIS 9.1 requires that data in transit is protected using current encryption standards. Enforcing TLS 1.3 minimum reduces exposure to quantum-enabled decryption of captured traffic."
},
"AZ-PQC-002": {
"control_id": "8.1",
"control_name": "Ensure Key Vault keys use quantum-safe algorithms",
"description": "Key Vault keys using RSA or ECC algorithms are vulnerable to Shor's algorithm on quantum computers. CIS 8.1 requires that cryptographic key management follows current standards. Keys should be inventoried in a Cryptographic Bill of Materials and migration to post-quantum safe algorithms planned."
},
"AZ-PQC-003": {
"control_id": "8.5",
"control_name": "Ensure certificates use quantum-safe signature algorithms",
"description": "Key Vault certificates signed with RSA or ECDSA are vulnerable to quantum attacks. CIS 8.5 requires that certificate management includes monitoring of algorithm strength. Certificates should be migrated to post-quantum safe signature algorithms such as ML-DSA when CA support is available."
}
}
}
15 changes: 15 additions & 0 deletions compliance/frameworks/iso27001.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,21 @@
"control_id": "A.13.1.1",
"control_name": "Network controls",
"description": "VNet peering connections with gateway transit enabled allow traffic to flow between network segments through shared gateways, potentially bypassing network controls. Networks should be managed and controlled to protect information in systems and applications. Gateway transit on peering connections should be disabled unless explicitly required."
},
"AZ-PQC-001": {
"control_id": "A.10.1.1",
"control_name": "Policy on the use of cryptographic controls",
"description": "TLS configurations using classical key exchange algorithms do not align with a forward-looking cryptographic controls policy. A.10.1.1 requires that the organisation defines rules for effective use of cryptography. The policy must address post-quantum threats and mandate migration to quantum-safe cipher suites when supported."
},
"AZ-PQC-002": {
"control_id": "A.10.1.1",
"control_name": "Policy on the use of cryptographic controls",
"description": "Key Vault keys using RSA or ECC do not meet the requirements of a cryptographic controls policy that accounts for quantum threats. A.10.1.1 requires that cryptographic controls are appropriate to the level of risk. Post-quantum safe algorithms must be adopted as part of the cryptographic policy when supported."
},
"AZ-PQC-003": {
"control_id": "A.10.1.1",
"control_name": "Policy on the use of cryptographic controls",
"description": "Certificates using classical signature algorithms expose the organisation to quantum-enabled signature forgery. A.10.1.1 requires that the cryptographic controls policy covers all cryptographic assets including certificates. Migration planning to post-quantum safe signature algorithms is required."
}
}
}
15 changes: 15 additions & 0 deletions compliance/frameworks/nist_csf.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,21 @@
"control_id": "PR.AC-5",
"control_name": "Network integrity is protected",
"description": "VNet peering with gateway transit enabled allows traffic to cross network boundaries through shared gateways, undermining network segmentation. PR.AC-5 requires that network integrity is protected. Disabling gateway transit on peering connections enforces boundary integrity between network zones."
},
"AZ-PQC-001": {
"control_id": "PR.DS-2",
"control_name": "Data in transit is protected",
"description": "TLS configurations using classical key exchange algorithms expose data in transit to Harvest Now Decrypt Later attacks. PR.DS-2 requires that data in transit is protected. Migrating to TLS 1.3 and post-quantum safe cipher suites when supported helps data remain protected against quantum-enabled adversaries."
},
"AZ-PQC-002": {
"control_id": "PR.DS-2",
"control_name": "Data in transit is protected",
"description": "Key Vault keys using RSA or ECC can be broken by Shor's algorithm on quantum computers, compromising protected data and signatures. PR.DS-2 requires that data protection mechanisms are maintained. Post-quantum safe key encapsulation algorithms such as ML-KEM should replace classical alternatives when supported."
},
"AZ-PQC-003": {
"control_id": "PR.DS-2",
"control_name": "Data in transit is protected",
"description": "Certificates using classical signature algorithms are vulnerable to quantum attacks, undermining authentication and integrity guarantees. PR.DS-2 requires that data protection includes integrity mechanisms. Migration to ML-DSA or SLH-DSA signature algorithms should be planned."
}
}
}
17 changes: 16 additions & 1 deletion compliance/frameworks/soc2.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,25 @@
"control_name": "Restricts Access from Outside the Network Boundary",
"description": "A virtual network without an Azure Firewall relies on NSGs alone and lacks a centralized point to inspect, filter, and log traffic crossing the network boundary. CC6.6 requires that logical access from outside the network boundary is restricted and controlled. Deploying an Azure Firewall enforces inspected, logged perimeter access for the network."
},
"AZ-NET-014": {
"AZ-NET-014": {
"control_id": "CC6.6",
"control_name": "Restricts Access from Outside the Network Boundary",
"description": "VNet peering with allowGatewayTransit or useRemoteGateways enabled allows traffic to cross network boundaries through shared gateways, weakening the logical separation between network zones. CC6.6 requires that logical access from outside the network boundary is restricted and controlled. Gateway transit on peering connections should be disabled to enforce boundary separation."
},
"AZ-PQC-001": {
"control_id": "CC6.7",
"control_name": "Protects Data in Transit",
"description": "TLS configurations using classical key exchange algorithms expose data in transit to Harvest Now Decrypt Later attacks where adversaries collect traffic today and decrypt it with future quantum computers. CC6.7 requires that data transmitted over networks is protected using encryption. Enforcing TLS 1.3 minimum reduces this risk."
},
"AZ-PQC-002": {
"control_id": "CC6.7",
"control_name": "Protects Data in Transit",
"description": "Key Vault keys using RSA or ECC will be vulnerable to Shor's algorithm, compromising data encrypted or signed with these keys. CC6.7 requires that data is protected using encryption. Post-quantum safe key encapsulation algorithms should replace classical alternatives when supported to maintain this protection."
},
"AZ-PQC-003": {
"control_id": "CC6.7",
"control_name": "Protects Data in Transit",
"description": "Certificates using classical signature algorithms will be vulnerable to quantum-enabled forgery, undermining authentication and data integrity. CC6.7 requires that data integrity is maintained through encryption and signing. Migration to post-quantum safe certificate algorithms should be planned."
}
}
}
23 changes: 23 additions & 0 deletions playbooks/cli/fix_az_pqc_001.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -euo pipefail

# Playbook: fix_az_pqc_001.sh
# Rule: AZ-PQC-001 - TLS using classical key exchange algorithm

if [[ $# -lt 2 ]]; then
echo "Usage: $0 <resource-group> <app-name>"
exit 1
fi

RESOURCE_GROUP="$1"
APP_NAME="$2"

echo "Enforcing TLS 1.3 minimum on App Service: $APP_NAME"
az webapp config set \
--resource-group "$RESOURCE_GROUP" \
--name "$APP_NAME" \
--min-tls-version 1.3 \
--output none

echo "Done. Verify with:"
echo " az webapp config show --resource-group $RESOURCE_GROUP --name $APP_NAME --query minTlsVersion"
31 changes: 31 additions & 0 deletions playbooks/cli/fix_az_pqc_002.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
set -euo pipefail

# Playbook: fix_az_pqc_002.sh
# Rule: AZ-PQC-002 - Key Vault key using non-quantum-safe algorithm

if [[ $# -lt 3 ]]; then
echo "Usage: $0 <resource-group> <vault-name> <key-name>"
exit 1
fi

RESOURCE_GROUP="$1"
VAULT_NAME="$2"
KEY_NAME="$3"

echo "Listing current key properties for: $KEY_NAME in vault: $VAULT_NAME"
az keyvault key show \
--vault-name "$VAULT_NAME" \
--name "$KEY_NAME" \
--output table

echo ""
echo "Next steps:"
echo " 1. Review all workloads using this key and plan migration."
echo " 2. Generate a new key using a post-quantum safe algorithm when supported."
echo " 3. Document this key in your Cryptographic Bill of Materials (CBOM)."
echo " 4. Update all dependent services to use the new key."
echo " 5. Disable and schedule deletion of the old key after migration."
echo ""
echo "Verify existing keys with:"
echo " az keyvault key list --vault-name $VAULT_NAME --output table"
31 changes: 31 additions & 0 deletions playbooks/cli/fix_az_pqc_003.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
set -euo pipefail

# Playbook: fix_az_pqc_003.sh
# Rule: AZ-PQC-003 - Key Vault certificate using non-quantum-safe algorithm

if [[ $# -lt 3 ]]; then
echo "Usage: $0 <resource-group> <vault-name> <cert-name>"
exit 1
fi

RESOURCE_GROUP="$1"
VAULT_NAME="$2"
CERT_NAME="$3"

echo "Listing current certificate properties for: $CERT_NAME in vault: $VAULT_NAME"
az keyvault certificate show \
--vault-name "$VAULT_NAME" \
--name "$CERT_NAME" \
--output table

echo ""
echo "Next steps:"
echo " 1. Identify the CA issuing this certificate."
echo " 2. Check if the CA supports post-quantum safe signature algorithms."
echo " 3. Document this certificate in your Cryptographic Bill of Materials."
echo " 4. Plan certificate renewal with a post-quantum safe algorithm."
echo " 5. Update all services using this certificate before expiry."
echo ""
echo "Verify existing certificates with:"
echo " az keyvault certificate list --vault-name $VAULT_NAME --output table"
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ azure-mgmt-sql==3.0.1
azure-mgmt-keyvault==10.3.0
azure-mgmt-rdbms==10.1.0
azure-mgmt-authorization==4.0.0
azure-mgmt-web==7.3.1
azure-monitor-ingestion==1.0.3
azure-mgmt-monitor==6.0.0
psycopg2-binary==2.9.9
Expand All @@ -21,5 +22,6 @@ cryptography==42.0.5
msrest==0.7.1
azure-mgmt-postgresqlflexibleservers==1.0.0b1
azure-keyvault-certificates==4.8.0
azure-keyvault-keys==4.9.0
chromadb==0.4.24
sentence-transformers==2.7.0
23 changes: 22 additions & 1 deletion scanner/azure_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,16 @@ def get_virtual_machines(self) -> List[Any]:
logger.error("get_virtual_machines failed: %s", exc)
return []

def get_web_apps(self) -> List[Any]:
"""List all App Services in the subscription."""
try:
from azure.mgmt.web import WebSiteManagementClient
client = WebSiteManagementClient(self.credential, self.subscription_id)
return list(client.web_apps.list())
except Exception as exc:
logger.error("get_web_apps failed: %s", exc)
return []

def get_vm_extensions(
self, resource_group: str, vm_name: str
) -> Optional[List[Any]]:
Expand Down Expand Up @@ -387,6 +397,17 @@ def get_key_vault_certificates(self, vault_name: str) -> List[Any]:
)
return []

def get_key_vault_keys(self, vault_name: str) -> List[Any]:
"""List all keys in a Key Vault using the Key Vault data plane API."""
try:
from azure.keyvault.keys import KeyClient
vault_url = f"https://{vault_name}.vault.azure.net"
client = KeyClient(vault_url=vault_url, credential=self.credential)
return list(client.list_properties_of_keys())
except Exception as exc:
logger.error("get_key_vault_keys(%s) failed: %s", vault_name, exc)
return []

# ------------------------------------------------------------------ #
# Monitoring #
# ------------------------------------------------------------------ #
Expand Down Expand Up @@ -533,4 +554,4 @@ def get_network_watcher_regions(self) -> List[str]:
return list(regions)
except Exception as exc:
logger.error("get_network_watcher_regions failed: %s", exc)
return []
return []
Loading
Loading