Skip to content

[19.0][FIX] Neutralize storage backend credentials - #696

Open
dreispt wants to merge 3 commits into
OCA:19.0from
dreispt:19.0-neutralize-backend-credentials
Open

dreispt wants to merge 3 commits into
OCA:19.0from
dreispt:19.0-neutralize-backend-credentials

Conversation

@dreispt

@dreispt dreispt commented Nov 11, 2026

Copy link
Copy Markdown
Member

Summary

Adds data/neutralize.sql to the implemented storage.backend types so that database copies made with Neutralize cannot reach production servers with live credentials:

  • storage_backend_sftp: clears sftp_password and sftp_ssh_private_key
  • storage_backend_ftp: clears ftp_password
  • storage_backend_s3: clears aws_secret_access_key

Only secret material is removed — hosts, ports, logins and buckets are kept so backends stay inspectable and can be re-pointed at test environments. Same pattern as microsoft_drive_account.

Test plan

  • Duplicate a database with Neutralize enabled and confirm the secret fields are emptied on storage.backend records

Assisted-by: Devin:SWE-2 Flash Medium

@dreispt dreispt changed the title [ADD] Neutralize storage backend credentials [19.0][ADD] Neutralize storage backend credentials Nov 11, 2026
Null the password and SSH private key when a database copy is
neutralized, so staging/test databases cannot reach production SFTP
servers with live credentials.

Assisted-by: Devin:SWE-2 Flash Medium
Null the FTP password when a database copy is neutralized, so
staging/test databases cannot reach production FTP servers with live
credentials.

Assisted-by: Devin:SWE-2 Flash Medium
Null the AWS secret access key when a database copy is neutralized, so
staging/test databases cannot reach production S3 buckets with live
credentials.

Assisted-by: Devin:SWE-2 Flash Medium
@dreispt
dreispt force-pushed the 19.0-neutralize-backend-credentials branch from d890044 to d827e53 Compare November 11, 2026 14:46
@dreispt dreispt changed the title [19.0][ADD] Neutralize storage backend credentials [FIX] Neutralize storage backend credentials Nov 11, 2026
@dreispt dreispt changed the title [FIX] Neutralize storage backend credentials [19.0][FIX] Neutralize storage backend credentials Nov 11, 2026
@dreispt

dreispt commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Improvement idea: the neutralization could be sensitive to ENV variables and support setting alternative credentials on staging/test envs provided by the system ENV?

@simahawk

Copy link
Copy Markdown
Contributor

Improvement idea: the neutralization could be sensitive to ENV variables and support setting alternative credentials on staging/test envs provided by the system ENV?

I would recommend using https://github.com/camptocamp/confidoo for that.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants