-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(arm): add CKV_AZURE_173 to ensure that API management uses at least TLS 1.2 #6322
base: main
Are you sure you want to change the base?
Conversation
… APIManagementMinTLS12Check
|
||
def scan_resource_conf(self, conf: dict[str, Any]) -> CheckResult: | ||
properties = conf.get('properties', {}) | ||
if 'security' in properties: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no field security
in Microsoft.ApiManagement/service
type
properties = conf.get('properties', {}) | ||
if 'enableClientCertificate' in properties: | ||
enableClientCertificate = properties['enableClientCertificate'] | ||
if 'enableFrontendTls10' in enableClientCertificate: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enableClientCertificate
is a bool value.
identity
identity
identity
What do I need to do to fix the security? |
properties = conf.get('properties', {}) | ||
if 'identity' in properties: | ||
identity = properties['identity'] | ||
if 'enableFrontendTls10' in identity: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the identity structure -
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
"clientId": "string",
"principalId": "string"
}
}
}
APIManagementMinTLS12
Be aware that we use the title to create changelog automatically and therefore only allow specific prefixes
- break: to indicate a breaking change, this supersedes any of the types
- feat: to indicate new features or checks
- fix: to indicate a bugfix or handling of edge cases of existing checks
- docs: to indicate an update to our documentation
- chore: to indicate adjustments to workflow files or dependency updates
- platform: to indicate a change needed for the platform
Additionally a scope is needs to be added to the prefix, which indicates the targeted framework, in doubt choose 'general'.
Description
ensure that API management uses at least TLS 1.2
Checklist: