Skip to content

Revert "security(demo): deactivate default-credential demo users on production install + drop Production/Stable (#341)" - #515

Merged
gonzalesedwin1123 merged 2 commits into
19.0-staging-sec-batch3from
revert-341-batch3
Sep 10, 2026
Merged

Revert "security(demo): deactivate default-credential demo users on production install + drop Production/Stable (#341)"#515
gonzalesedwin1123 merged 2 commits into
19.0-staging-sec-batch3from
revert-341-batch3

Conversation

@gonzalesedwin1123

Copy link
Copy Markdown
Member

Reverts #341's squash commit 2bc37daa on the batch-3 staging branch. Verified mechanically: the revert diff is the byte-exact inverse of the squash (index lines aside). Nothing else in the batch touches spp_demo or spp_farmer_registry_demo, so the other seven reviewed heads are unaffected.

Why

The merge-turn adversarial review (record in the internal plans folder, batch3-merge-turn-review.md) found the gate signal wrong in both directions, and each claim was verified by hand:

  • Fails closed on OpenSPP's own stack. The archive keys on ir_module_module.demo. docker/odoo.conf.template:101 sets without_demo = True for every instance we ship, so the flag is always False and every evaluation instance loses all nine demo personas at install (the TCPP demo script logs in as manager/officer).
  • Fails open on stock Odoo. A plain odoo-bin -d prod -i … has demo data on by default, so demo=True and sppadmin/demo stays live on a real production DB — the exact attack the PR set out to close.
  • Password and login reversion on upgrade. The version bump forces -u spp_demo, which reloads spp_demo/data/users_data.xml (noupdate="0", <field name="password">demo</field> inline). That overwrites spp_farmer_registry_demo's noupdate="1" login overrides (managerdemo_manager, observed in today's upgrade gate) and resets the passwords on every upgrade, undoing any rotation and restoring the well-known secret under the archive.

What happens next

The fix is redesigned around an explicit, auditable opt-in (ir.config_parameter, default off) instead of the demo flag, plus a password scrub on archive so unarchiving does not restore demo. It re-lands in batch 4 together with #356, which was already sequenced behind #341. The tracking issue stays open.

Squash-merge into 19.0-staging-sec-batch3; recorded in the batch manifest as a revert row.

…roduction install + drop Production/Stable (#341)"

This reverts commit 2bc37da from the
batch-3 staging branch.

The merge-turn adversarial review found the gate signal wrong in both
directions: the archive keys on ir_module_module.demo, which is always False
on OpenSPP's own stack (docker/odoo.conf.template sets without_demo = True),
so every evaluation instance loses its demo personas, while a stock Odoo
production install has demo data on by default and keeps sppadmin/demo live.
The forced -u spp_demo also reloads a noupdate=0 data file that rewrites the
demo logins and resets their passwords on every upgrade.

The fix will be redesigned around an explicit opt-in config parameter plus a
password scrub on archive, and re-landed in batch 4 together with #356, which
was already sequenced behind it. Reviewed heads of the other seven batch-3
PRs are untouched.
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.49%. Comparing base (d482b38) to head (7325b5e).

Additional details and impacted files

Impacted file tree graph

@@                     Coverage Diff                     @@
##           19.0-staging-sec-batch3     #515      +/-   ##
===========================================================
- Coverage                    74.52%   74.49%   -0.03%     
===========================================================
  Files                          624      624              
  Lines                        43955    43928      -27     
===========================================================
- Hits                         32758    32725      -33     
- Misses                       11197    11203       +6     
Flag Coverage Δ
spp_base_common 91.07% <ø> (ø)
spp_case_demo 94.82% <ø> (ø)
spp_dci_demo 94.28% <ø> (ø)
spp_demo 73.60% <ø> (-0.52%) ⬇️
spp_demo_phl_luzon 86.71% <ø> (ø)
spp_farmer_registry_demo 63.39% <ø> (-0.17%) ⬇️
spp_grm_demo 80.13% <ø> (-1.31%) ⬇️
spp_mis_demo_v2 70.38% <ø> (ø)
spp_programs 67.58% <ø> (ø)
spp_registry 88.94% <ø> (ø)
spp_security 69.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
spp_demo/__init__.py 100.00% <ø> (ø)
spp_farmer_registry_demo/__init__.py 100.00% <ø> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gonzalesedwin1123
gonzalesedwin1123 merged commit 3f367f2 into 19.0-staging-sec-batch3 Sep 10, 2026
26 checks passed
@gonzalesedwin1123
gonzalesedwin1123 deleted the revert-341-batch3 branch September 10, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant