Repository navigation
test(api-conformance): give Tier 1 a known pageTokenSecret - #26634
antobinary merged 1 commit into
Conversation
From 4.0.3, bbb-web does not start with the package's placeholder pageTokenSecret, which a packaged server's after-install.sh replaces with a random value. Tier 1 sets a known one in its bbb-web.properties, next to the salt, and the bbb-web target marks it secret, so recordings mask it as they mask the salt.
|
No actionable comments were generated in the recent review. WalkthroughThe Tier 1 environment now defines a page-token secret. The rendering script substitutes the value into the bbb-web properties template and exports it as Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested reviewers: Merge Risk:
|
✅ Automated tests have passed! |
antobinary
left a comment
There was a problem hiding this comment.
Approving. I ran this (head e12a6ed) on the Tier 1 stack with the packages of the 4.0.3 merge, #26631, because the PR's own CI ran on v4.0.x-develop, where bbb-web starts with or without the setting.
It does what the description says, and #26631 needs it: its api-conformance job fails at "Bring up Tier 1" today (run 44714167464).
| Check | Result |
|---|---|
| Tier 1 from #26631's head (09d887a), without this commit | up --wait fails with container bbb-conform-tier1-akka-apps-1 is unhealthy, and bbb-web logs "Refusing to start with unusable API or page-token secrets" |
| The same tree with this commit applied | All ten services healthy after 76 s |
| The PR selection on that stack, with CI's flags | 896 cases: 894 passed, 2 expected failures, exit 0. The same counts as this PR's CI run on v4.0.x-develop |
| Is the published secret the one in force? | Yes. A page token that bbb-web put on the bus equals the HMAC-SHA256 under TIER1_PAGE_TOKEN_SECRET, and differs from the one under the salt |
| Masking | A probe case that sends ${target.pageTokenSecret} as a query parameter passes, and the JSON report shows the parameter as [secret:pageTokenSecret]. The value itself is nowhere in the report |
BBB_PAGE_TOKEN_SECRET unset |
The target loads and the same case passes with an empty value, as the comment in the target file says |
| Cherry-pick onto v4.0.x-release, merge with #26631, merge with v4.0.x-develop | All three clean |
Notes. None of them needs a change in this PR.
- Order. This goes in before #26631. After that, #26631's branch needs v4.0.x-develop merged in so that its job runs with it.
copies.sha256after #26631. Once the release merge is in,check-copies.shwarns on every run about three files:bbb-web/after-install.sh,bbb-web.serviceand akka-apps'start-template. The three warnings are on #26631's run already. This PR is what follows the first file, but its hash can't be recorded here, because v4.0.x-develop still has the old one. So it takes a follow-up after #26631:check-copies.sh --update, and a decision on the other two files, which now setJAVA_TOOL_OPTIONS.env/images/bbb-web/startandenv/images/akka-apps/startsay they start the services as the units do, and neither sets it. If they mirror it, bbb-web's script has to add to the variable, not replace it: compose passesJAVA_TOOL_OPTIONSthrough from the host for a coverage agent.- #26583 conflicts with this in two files, not one.
targets/bbb-web.yaml, as the description says, and theenvrow of the README's table of make targets, where it addsTURN_SECRET. Both resolve by keeping both. - Two comments still name only the host and the salt as what the stack's
bbb-web.propertiessets:README.mdline 261 andenv/images/Dockerfileline 52. - Without the setting bbb-web hangs. It does not exit, as the description has it. After "Application run failed" the Java process stays up and nothing listens on 8090. It was still there ten minutes later, kept alive by five non-daemon threads: the workers of
ReceivedMessageHandler,CallbackUrlService,MeetingServiceandKeepAliveService, andbbb-web-common-scheduler-1. That is why compose never restarts bbb-web and names akka-apps, whose health check goes unhealthy first. It is bbb-web's behaviour, not Tier 1's, so there is nothing to change here.
…on-tokens Conflicts, after bigbluebutton#26548 and bigbluebutton#26634 merged: - bigbluebutton-tests/api-conformance/targets/bbb-web.yaml: both sides added a vars map; it keeps turnSecret and pageTokenSecret, each under its own comment. - bigbluebutton-tests/api-conformance/README.md: the env row lists both BBB_PAGE_TOKEN_SECRET and TURN_SECRET, and the masks paragraph keeps bigbluebutton#26548's onlyMatching sentences and T11's "learningDashboard's data".
…er 1 (#26642) Since 4.0.3 was merged into v4.0.x-develop (#26631), check-copies.sh has warned on every api-conformance run: three of the package files Tier 1 mirrors by hand had changed. - bbb-web.service and bbb-apps-akka's unit set JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics (#26603). Both images' start scripts now set it too. bbb-web's keeps a JAVA_TOOL_OPTIONS that compose.yaml passes in, such as a coverage agent, after the flag. - akka-apps' start script also sets MALLOC_ARENA_MAX=2, which its unit has set since 9d4dc4b. Tier 1 had followed that only for bbb-web. - bbb-web's after-install.sh writes a random pageTokenSecret. Tier 1 already sets a known one in tier1.properties.in (#26634); the Dockerfile's note on what after-install.sh does now names it. copies.sha256 records the three sources as they are now.
Brings v4.0.x-develop to 932c31d: the merged bigbluebutton#26631 and the fixes that followed it on 4.0 (bigbluebutton#26642 and bigbluebutton#26634 for the API conformance Tier 1 stack, bigbluebutton#26641 for the presentation conversion tests, bigbluebutton#26636 and bigbluebutton#26617 for the middleware limits, bigbluebutton#26581 for failed uploads), plus bigbluebutton#26583, bigbluebutton#26548 and bigbluebutton#26615. Resolutions: - api-conformance env/tier1/copies.sha256: each hash matches the merged file. preinst is 4.1's own (0413ab4), so 4.1's line; start-template has 4.0.3's change on both lines now, so 4.0's line. - docs new-features.md: 4.1's file, unchanged. # Conflicts: # bigbluebutton-tests/api-conformance/env/tier1/copies.sha256 # docs/docs/new-features.md
What does this PR do?
Gives api-conformance's Tier 1 stack a known
pageTokenSecret, set in itsbbb-web.propertiesnext to the salt. Thebbb-webtarget marks it secret (BBB_PAGE_TOKEN_SECRET), so recordings mask it the way they mask the salt.Motivation
From 4.0.3, bbb-web does not start with the package's placeholder
pageTokenSecret. A packaged server'safter-install.shreplaces the placeholder with a random value, but Tier 1 unpacks the deb without running it. Onv4.0.x-release, run 44608067362 (push of 64f527c) failed at "Bring up Tier 1" withcontainer bbb-conform-tier1-akka-apps-1 is unhealthy. bbb-web had exited at start withRefusing to start with unusable API or page-token secrets. akka-apps reports healthy only once bbb-web pings it, so akka-apps was the container thatup --waitreported.This targets
v4.0.x-develop, so the fix reaches release with the next develop→release merge. On develop, the setting only replaces the package's default, and no case depends on it.How to test
DEBS_DIR=... make -C env up), bbb-web starts with this setting. Without it, bbb-web exits as above.More
v4.0.x-release.v4.0.x-release(bbb-web.serviceand the akka-appsstart-templatenow setJAVA_TOOL_OPTIONS). Those changes are only on release, so mirroring them belongs with them. The warnings don't fail the job.vars:entry totargets/bbb-web.yamlat the same place. Whichever PR merges second needs both entries under onevars:.