Skip to content

Conversation

oleksandr-nc
Copy link
Contributor

This PR adds the updateCertificates method to automate SSL certificate updates in Docker containers.

It detects the container's OS, determines the correct certificate directory (e.g., /usr/local/share/ca-certificates for Debian), parses the Nextcloud certificate bundle, copies individual certificates into the container, and applies updates using OS-specific commands like update-ca-certificates.

Tested on Debian and Alpine.

@oleksandr-nc
Copy link
Contributor Author

the only thing that worries me is that we copy all the certificates from the bundle from the server, including the system ones.

as far as I know, this shouldn't break anything, and this PR won't be backported, so we have plenty of time for testing until Nextcloud 31 get released.

@oleksandr-nc oleksandr-nc force-pushed the feat/ssl-certificates-update branch from 7f7e394 to 1343bda Compare December 26, 2024 11:45
Signed-off-by: Oleksander Piskun <[email protected]>
@oleksandr-nc oleksandr-nc force-pushed the feat/ssl-certificates-update branch from 1343bda to 4d4c892 Compare December 26, 2024 11:51
@oleksandr-nc oleksandr-nc added the enhancement New feature or request label Dec 26, 2024
Copy link
Contributor

@andrey18106 andrey18106 left a comment

Choose a reason for hiding this comment

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

LGTM

@oleksandr-nc oleksandr-nc merged commit 28b9319 into main Dec 27, 2024
31 checks passed
@oleksandr-nc oleksandr-nc deleted the feat/ssl-certificates-update branch December 27, 2024 20:02
bigcat88 added a commit to cloud-py-api/nc_py_api that referenced this pull request Jan 19, 2025
After internal discussion with @kyteinsky when we tested this
nextcloud/app_api#448 - it was found out that
the `test-deploy` ExApp from AppAPI "Test Deploy" button action fails in
such setups, since the Python library "httpx" ignores system
certificates by default.

reference: encode/httpx#302

Temporary workaround, until "httpx" will change it's behavior.

---------

Signed-off-by: bigcat88 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants