WasmEdge / docs

https://wasmedge.org/docs/
Apache License 2.0
17 stars 57 forks source link

Remove TLS from install guide #229

Closed juntao closed 4 months ago

juntao commented 4 months ago

Explanation

Remove TLS Plugin from install docs

/kind documentation

alabulei1 commented 4 months ago

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


Summary:

In reviewing the GitHub Pull Request titled "Remove TLS from install guide," several potential issues and important findings emerged. The primary concerns revolve around the removal of TLS support from the installation guide and the potential impacts on users who rely on secure communication. The changes introduce a shift towards directly compiling TLS functions into WebAssembly, emphasizing portability but potentially creating confusion and security implications.

Potential Issues and Errors:

  1. TLS Deprecation Confusion: The removal of TLS support without a clear explanation and transition plan may cause confusion for users needing secure communication. Ensuring proper justification and guidance for the deprecation is crucial.
  2. Tense and Consistency Issues: Inconsistencies in tense and content referencing could lead to misunderstanding or misinterpretation, requiring corrections for clarity.
  3. Console Command Risks: Encouraging users to run potentially risky commands directly from URLs poses security risks that should be addressed following best practices.
  4. Documentation Structure: While additional plug-ins are beneficial, maintaining a coherent and organized structure is essential for user understanding and navigation.
  5. Cross-Referencing Links: Validating external links and ensuring their accuracy is necessary to provide users with the correct resources.
  6. Code Snippets Accuracy: Revising and verifying code snippets for accuracy, formatting, and typos will enhance the overall user experience.

Important Findings:

  1. Security Impact of TLS Removal: The removal of TLS instructions poses security implications that should be justified clearly to users, especially those relying on HTTPS and secure communications.
  2. Code Examples Enhancement: The addition of comprehensive code examples for MySQL interaction improves the documentation's usability and practical value for developers.
  3. API Documentation and Configuration: The inclusion of socket API docs and configuration notes benefits user understanding and facilitates the setup process.
  4. Dependency Management: Manual dependency patching and updating procedures should be streamlined to prevent compatibility issues and maintenance challenges for users.

In conclusion, the Pull Request's changes aim to enhance portability and usability but require careful consideration to address potential issues, ensure clarity, maintain security standards, and improve the overall user experience. Further clarification, documentation updates, and validation of changes are necessary to guarantee a successful transition for users.

Details

Commit add404327a49904e7e9832827b40c11853ddbd8b

Key Changes:

  1. Removed reference to installing wasmedge_rustls plug-in to enable TLS and HTTPS networking.
  2. Updated the example command to now install wasi_nn-ggml plug-in instead.
  3. Updated the example command for installing multiple plug-ins, now featuring wasi_logging and wasi_nn-ggml.
  4. Added new sections for installing wasmedge_opencvmini, wasmedge_zlib, and further information and examples for each plug-in.

Potential Problems:

  1. Deprecated Content: Removing the instructions for installing the TLS plug-in may cause confusion for users who were specifically looking for TLS functionality.

  2. Tense Mismatch in Documentation: There seems to be a mix up of tenses in the documentation. For example, the "TLS plug-in" section references using wasmedge_rustls but then suggests running wasi_logging for logging support. This inconsistency should be corrected for clarity.

  3. Console Command Blindness: The patch encourages running potentially risky commands directly from the internet. Best practices should be followed to make sure users are aware of the risks associated with running scripts directly from URLs.

  4. Documentation Structure: The addition of new plug-ins is beneficial, but make sure that the documentation structure remains coherent and organized. Sections should be clearly delineated and properly introduced to the user.

  5. Cross-Referencing Links: Ensure that any external links, such as the log::Log API referenced in the documentation, are valid and lead to the appropriate resources.

  6. Code snippets: Check the code snippets for accuracy and consistency. Make sure that they are properly formatted and free of typos.

Overall, the changes appear to expand the plug-in options available but may require further clarifications and corrections for a seamless user experience.

Commit 697013b60a1a75732c974a4cb5dac56a54cc9662

Key Changes:

Potential Problems:

  1. The patch adds information about deprecating the TLS plug-in and transitioning to directly compiling TLS functions into Wasm. This change might impact users who rely on the TLS plug-in for HTTPS and TLS requests. It would be good to clarify the reasons for deprecation and provide guidance on how users can adapt to the new approach.

  2. The patch refers to installing WasmEdge with the TLS plug-in using a specific command. The instructions might need updating to reflect the deprecation mentioned earlier.

Overall, the explanation for the deprecation and its implications need to be clarified, and the installation instructions should be updated to reflect the changes.

Commit d4660bcbaa703f443ca4b559d51ec1dd8cce2b60

Key Changes:

Findings:

  1. Important: The removal of TLS-related instructions from the install guide might be a significant change in terms of security and communication protocols. Ensure that there is a valid reason for removing TLS support instructions.

  2. Code Example Addition: The addition of comprehensive code examples for interacting with a MySQL database is beneficial for developers. It enhances the documentation and provides practical guidance.

  3. API Documentation: The addition of new socket API docs is a positive development, as it improves the clarity and completeness of the documentation.

  4. Configuration Notes: The inclusion of configuration notes related to async networking with Tokio is helpful for developers, providing insights into the setup process.

  5. Missing TLS Setup: While the TLS-related content was removed, if TLS is still an important aspect of the project, some guidance or explanation may be necessary to inform users how to handle secure connections now.

Based on the changes, it is critical to validate that the removal of TLS support aligns with the project's security requirements. Additionally, ensure that the code examples and configuration notes are accurate and impactful for users.

Commit 3a8a58e5e8d8e0d9cab77fe7caf48261ef4f4162

Key Changes:

  1. The patch removes references to installing the WasmEdge TLS plug-in and using TLS in the installation guide for HTTP services.
  2. Updates the instructions for importing crates in Cargo.toml related to HTTP and HTTPS client implementations using popular Rust APIs.

Potential Problems:

  1. TLS Removal: While removing TLS instructions may simplify the setup process, it might impact users who require secure communication. It's important to ensure that the decision to remove TLS support is intentional and well-documented.

  2. Dependency Patching: The patch introduces manual patching of dependency crates for WasmEdge compatibility. This may lead to dependencies being out of sync with upstream versions, potentially causing compatibility issues or future maintenance challenges.

  3. Cargo.toml Changes: Users following the updated Cargo.toml instructions need to be aware of the changes in dependency versions and features. It's crucial to provide clear explanations and potentially automate the dependency patching process for easier adoption.

  4. MacOS Compilation: The note about compiling on MacOS using the wasi-sdk version of clang for Rust TLS highlights a platform-specific requirement that users need to be aware of. Clear instructions on handling platform-specific setups are essential for a smooth development experience.

Overall, the decision to remove TLS and the introduction of manual dependency patching should be carefully evaluated to ensure compatibility, security, and ease of use for users. Consider providing clear documentation and possibly automation tools for dependency management.

alabulei1 commented 4 months ago

I don't think we should remove the rustTLS plugin directly because ome existing WasmEdge programs may depend on the rustTLS plugin. How about adding a special note for the RustTLS plugin?

juntao commented 4 months ago

I don't think we should remove the rustTLS plugin directly because ome existing WasmEdge programs may depend on the rustTLS plugin. How about adding a special note for the RustTLS plugin?

Done