Skip to content
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(terraform): Ensure basic authentication for FTP is disabled #6099

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tdefise
Copy link
Contributor

@tdefise tdefise commented Mar 18, 2024

User description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Fixes #6098

New/Edited policies (Delete if not relevant)

Description

App Service provides basic authentication for FTP and WebDeploy clients to connect to it by using deployment credentials. These APIs are great for browsing your site’s file system, uploading drivers and utilities, and deploying with MsBuild. However, enterprises often require more secure deployment methods than basic authentication, such as Microsoft Entra ID authentication (see Authentication types by deployment methods in Azure App Service).

cc https://learn.microsoft.com/en-us/azure/app-service/configure-basic-auth-disable?tabs=portal

Fix

Set "ftp_publish_basic_authentication_enabled" to 'false

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Generated description

Dear maintainer, below is a concise technical summary of the changes proposed in this PR:

Implement a new check AppServiceFTPBasicAuthenticationDisabled to ensure that basic authentication for FTP is disabled in Azure App Services. This check is added to the checkov library and targets resources azurerm_linux_web_app and azurerm_windows_web_app. The check verifies that the ftp_publish_basic_authentication_enabled property is set to false. Additionally, test cases are provided to validate the functionality of this check, ensuring that both passing and failing scenarios are covered.

TopicDetails
Test Cases Add test cases to validate the new FTP authentication check.
Modified files (2)
  • tests/terraform/checks/resource/azure/example_AppServiceFTPBasicAuthenticationDisabled/main.tf
  • tests/terraform/checks/resource/azure/test_AppServiceFTPBasicAuthenticationDisabled.py
Latest Contributors(0)
EmailCommitDate
FTP Auth Check Implement a new check to ensure basic authentication for FTP is disabled in Azure App Services.
Modified files (1)
  • checkov/terraform/checks/resource/azure/AppServiceFTPBasicAuthenticationDisabled.py
Latest Contributors(0)
EmailCommitDate
This pull request is reviewed by Baz. Join @tdefise and the rest of your team on (Baz).

@tdefise tdefise changed the title feat(terraform): Ensure basic authentication for SCM is disabled feat(terraform): Ensure basic authentication for FTP is disabled May 15, 2024
@tdefise
Copy link
Contributor Author

tdefise commented Jun 13, 2024

Dear Checkov Team,

Would it be possible to have a status on this PR please?

Kind Regards,
Thomas

@AdamDev
Copy link
Contributor

AdamDev commented Jan 5, 2025

Hi @tdefise,
Could you update your branch with main branch, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure App Services - Ensure basic authentication for FTP is disabled
2 participants