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

fix(terraform-provider-jans): update terraform module #9464

Merged
merged 4 commits into from
Sep 13, 2024

Conversation

moabu
Copy link
Member

@moabu moabu commented Sep 11, 2024

Bug Fixes

Signed-off-by: moabu <47318409+moabu@users.noreply.github.com>
Copy link

dryrunsecurity bot commented Sep 11, 2024

DryRun Security Summary

The provided code changes cover a wide range of updates and improvements to the terraform-provider-jans project, which is a Terraform provider for the Jans open-source identity and access management (IAM) platform, addressing various aspects such as CHANGELOG updates, configuration parameter additions, documentation improvements, and test suite enhancements, while also highlighting the importance of secure configuration management, input validation, secure communication, and logging and monitoring to ensure the continued security and reliability of the Jans integration.

Expand for full summary

Summary:

The provided code changes cover a wide range of updates and improvements to the terraform-provider-jans project, which is a Terraform provider for the Jans open-source identity and access management (IAM) platform. The changes span across various files and address different aspects of the provider, including CHANGELOG updates, configuration parameter additions, documentation improvements, and test suite enhancements.

From an application security perspective, the changes generally do not introduce any obvious security vulnerabilities. However, there are a few areas that require attention to ensure the continued security and reliability of the Jans integration:

  1. Secure Configuration Management: The provider handles sensitive information, such as client IDs, client secrets, and authentication-related parameters. Ensure that these values are properly secured and not exposed in any logs or outputs.
  2. Input Validation: Thoroughly review the code to ensure that all user-supplied input is properly validated and sanitized to prevent potential injection attacks (e.g., SQL injection, XML injection).
  3. Secure Communication: Verify that all communication with the Jans API endpoints is done over a secure channel (e.g., HTTPS) to prevent man-in-the-middle attacks.
  4. Logging and Monitoring: Implement robust logging and monitoring mechanisms to detect and respond to any suspicious activities or configuration changes related to the Jans integration.

Overall, the changes appear to be focused on improving the functionality and usability of the Terraform provider, while maintaining a reasonable level of security. However, it is essential to continue reviewing the codebase and the broader context of the application to ensure that the integration with the Jans platform remains secure and resilient.

Files Changed:

  1. terraform-provider-jans/CHANGELOG.md: Updates to the CHANGELOG, including bug fixes and API updates.
  2. terraform-provider-jans/docs/resources/app_configuration.md: Addition of new configuration parameters related to the "Status List" feature.
  3. terraform-provider-jans/README.md: Updates to the "Tests" section, including information about custom attribute tests and the "insecure_client" option.
  4. terraform-provider-jans/docs/resources/api_app_configuration.md: Addition of new optional attributes for ACR validation and custom attribute validation.
  5. terraform-provider-jans/docs/resources/default_authentication_method.md: Update to the default_acr field, changing the default authentication method.
  6. terraform-provider-jans/docs/resources/kc_saml_configuration.md: Addition of new optional attributes related to SAML configuration.
  7. terraform-provider-jans/docs/resources/scim_app_configuration.md: Addition of new optional attributes to control the audit logger and logger timer.
  8. terraform-provider-jans/examples/resources/jans_smtp_configuration/resource.tf: Renaming of the user_name and password fields to more descriptive names.
  9. terraform-provider-jans/jans/agama_deployment_test.go: Update to the expected number of deployments in the test cases.
  10. terraform-provider-jans/jans/api_app_configuration.go: Addition of new configuration options related to asset management and API application validation.
  11. terraform-provider-jans/jans/app_configuration.go: Addition of new configuration parameters related to the "Status List" feature.
  12. terraform-provider-jans/jans/attributes.go: Changes to the response structure for the GetAttributes function.
  13. terraform-provider-jans/jans/client_test.go: Update to the skipKnownFailures variable.
  14. terraform-provider-jans/jans/attributes_test.go: Changes to the custom user attribute testing.
  15. terraform-provider-jans/jans/default_authentication_method_test.go: Update to the default authentication method in the test case.
  16. terraform-provider-jans/jans/kc_saml_config_test.go: Addition of a new field to the KCSAMLConfiguration struct.
  17. terraform-provider-jans/jans/kc_saml_config.go: Addition of a new field to the KCSAMLConfiguration struct.
  18. terraform-provider-jans/jans/jans_asset_test.go: Test case for the CreateJansAsset function.

Code Analysis

We ran 9 analyzers against 30 files and 1 analyzer had findings. 8 analyzers had no findings.

Analyzer Findings
Authn/Authz Analyzer 9 findings

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@mo-auto
Copy link
Member

mo-auto commented Sep 11, 2024

Error: Hi @moabu, You did not reference an open issue in your PR. I attempted to create an issue for you.
Please update that issues' title and body and make sure I correctly referenced it in the above PRs body.

@mo-auto mo-auto added area-documentation Documentation needs to change as part of issue or PR kind-bug Issue or PR is a bug in existing functionality labels Sep 11, 2024
DisableLoggerTimer bool `schema:"disable_logger_timer" json:"disableLoggerTimer"`
DisableAuditLogger bool `schema:"disable_audit_logger" json:"disableAuditLogger"`
CustomAttributeValidationEnabled bool `schema:"custom_attribute_validation_enabled" json:"customAttributeValidationEnabled"`
ArcValidationEnabled bool `schema:"arc_validation_enabled" json:"arcValidationEnabled"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be acrValidationEnabled?

ModuleNameValidationEnabled bool `schema:"module_name_validation_enabled" json:"moduleNameValidationEnabled"`
AssetBaseDirectory string `schema:"asset_base_directory" json:"assetBaseDirectory"`
JansServiceModule []string `schema:"jans_service_module" json:"jansServiceModule"`
AssetDirMappings []AssetDirMapping `schema:"asset_dir_mappings" json:"assetDirMappings"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The json:"assetDirMappings" likely need to be rename to json:"assetDirMapping"?

@moabu moabu merged commit c15ccfe into main Sep 13, 2024
10 of 11 checks passed
@moabu moabu deleted the cn-update-terraform-provider-jans branch September 13, 2024 17:58
yuriyz pushed a commit that referenced this pull request Nov 7, 2024
* fix(terraform-provider-jans): update terraform provider

Signed-off-by: moabu <47318409+moabu@users.noreply.github.com>

* fix: fix references for acr and app configuration

Signed-off-by: moabu <47318409+moabu@users.noreply.github.com>

---------

Signed-off-by: moabu <47318409+moabu@users.noreply.github.com>
Former-commit-id: c15ccfe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Documentation needs to change as part of issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(terraform-provider-jans): update terraform module with the API changes for 1.1.5
3 participants