Skip to content

fix: enhance CA certificate handling in entrypoint script#40933

Merged
pratapaprasanna merged 5 commits intoreleasefrom
fix/import/symlinks/to/ca-certs
Jul 3, 2025
Merged

fix: enhance CA certificate handling in entrypoint script#40933
pratapaprasanna merged 5 commits intoreleasefrom
fix/import/symlinks/to/ca-certs

Conversation

@pratapaprasanna
Copy link
Contributor

@pratapaprasanna pratapaprasanna commented Jun 12, 2025

Updated the entrypoint script to improve the detection and processing of custom CA certificates. The script now correctly identifies both regular files and symbolic links with a '.crt' extension, ensuring that all relevant certificates are included in the keystore. This change enhances the robustness of the CA certificate setup process.

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Warning

Tests have not run on the HEAD 534af3a yet


Wed, 02 Jul 2025 09:06:55 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection and import of custom CA certificates by including support for symbolic links, ensuring all relevant .crt files are recognized and imported.
    • Enhanced handling of certificate bundles by splitting and importing individual certificates for better compatibility.

Updated the entrypoint script to improve the detection and processing of custom CA certificates. The script now correctly identifies both regular files and symbolic links with a '.crt' extension, ensuring that all relevant certificates are included in the keystore. This change enhances the robustness of the CA certificate setup process.
@github-actions github-actions bot added the Bug Something isn't working label Jun 12, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 12, 2025

Walkthrough

The Docker entrypoint script's setup-custom-ca-certificates function was enhanced to handle custom CA certificates more robustly. It now stages certificates in a temporary directory, splits bundled certificates, processes both files and symlinks, imports each certificate individually into the Java keystore, and cleans up afterward.

Changes

File(s) Change Summary
deploy/docker/fs/opt/appsmith/entrypoint.sh Enhanced setup-custom-ca-certificates to stage certs in a temp directory, split bundled .crt files, handle symlinks, import each cert individually, and clean up. Warning about .pem files remains.

Poem

In the land of Docker, symlinks now gleam,
Certificates—no longer just files in the stream.
Entrypoint’s wisdom, both links and files,
Gathered together in cryptographic piles.
Secure and complete, the CA path’s dream!
🗝️🔗


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cbf51a5 and 534af3a.

📒 Files selected for processing (1)
  • deploy/docker/fs/opt/appsmith/entrypoint.sh (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • deploy/docker/fs/opt/appsmith/entrypoint.sh
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 126f557 and 1c595ef.

📒 Files selected for processing (1)
  • deploy/docker/fs/opt/appsmith/entrypoint.sh (2 hunks)

Refactored the entrypoint script to enhance the handling of custom CA certificates. The script now creates a temporary directory for processing certificates, splits bundled certificates, and ensures all relevant files are imported into the keystore. This change improves the robustness and clarity of the CA certificate setup process.
…ypoint script

Enhanced the entrypoint script to notify users if '.pem' files are found in the 'ca-certs' folder, prompting them to rename these files to '.crt' for proper processing. This change improves user guidance and ensures correct handling of custom CA certificates.
@github-actions
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Jun 26, 2025
@pratapaprasanna
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/15919732185.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 40933.
recreate: .

@github-actions
Copy link

Deploy-Preview-URL: https://ce-40933.dp.appsmith.com

Updated the entrypoint script to improve the processing of CA certificates. The new implementation splits both bundled and individual .crt files into separate certificates, ensuring better organization and handling of custom CA certificates. This change enhances the robustness of the certificate setup process.
@pratapaprasanna
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/15923438419.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 40933.
recreate: .

@github-actions
Copy link

Deploy-Preview-URL: https://ce-40933.dp.appsmith.com

@github-actions github-actions bot removed the Stale label Jun 27, 2025
Updated the entrypoint script to enhance the detection of custom CA certificates. The logic now correctly identifies both regular files and symbolic links with a '.crt' extension, improving the robustness of the CA certificate setup process.
@pratapaprasanna
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Jul 2, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/16020953624.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 40933.
recreate: .

@github-actions
Copy link

github-actions bot commented Jul 2, 2025

Deploy-Preview-URL: https://ce-40933.dp.appsmith.com

@pratapaprasanna pratapaprasanna merged commit ea7bfd0 into release Jul 3, 2025
18 checks passed
@pratapaprasanna pratapaprasanna deleted the fix/import/symlinks/to/ca-certs branch July 3, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants