dotCMS Cloud request-cost pipeline: multi-cloud support and attribution
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Parent
Part of #32886 (per-request-cost accounting).
Summary
Adds cloud-provider attribution and enforced TLS to the request-cost telemetry pipeline (RequestCostPublisher → OVH token-collector → telemetry_request_cost), which has been running for OVH-hosted instances for some time and is the data source for the Q3 Profitability/PLG rock's per-cloud cost comparison.
Full design: ADR-0022 (dotCMS/platform-adrs) and the companion implementation plan, docs/plan-request-cost-provider-attribution.md on branch worktree-ovh-k8s-cluster+request-cost-provider-attribution in dotCMS/ovh-k8s-cluster.
Why
Two gaps found while scoping the rock's "configurable per backend (AWS/OVH/GCP + Azure)" requirement:
RequestCostPublisheronly warns (doesn't refuse) if its push URL isn'thttps://.telemetry_request_costhas no cloud-provider column, andcluster_iddoesn't reliably encode which cloud a row came from.
A security review of token-collector's actual auth code found that trusting a client-supplied provider field (the original design) would let any write-token holder mislabel their own provider, corrupting the profitability dataset — so provider is derived from which write token authenticated the request, not anything the client sends. See ADR-0022 for full rationale, alternatives considered, and risk analysis.
Sub-issues
- Enforce HTTPS-only in
RequestCostPublisher(dotCMS/core) - Migrate
telemetry_request_cost: add nativecloud_providercolumn (dotCMS/ovh-k8s-cluster) - Token → provider map in
auth.ts+ renameWRITE_TOKEN→WRITE_TOKEN_OVH(dotCMS/ovh-k8s-cluster) - Validator hardening: length caps + missing write-path tests (dotCMS/ovh-k8s-cluster)
Out of scope
- Building an AWS, GCP, or Azure publisher/collector — tracked separately (see sibling epic in
dotCMS/infrastructure-as-codefor the AWS/Evergreen side, which uses a different mechanism — response headers, not this push pipeline). - Any billing-system integration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with RequestCostPublisher in dotCMS/core and read ADR-0022 for the provider-attribution design and TLS requirement. Then review the listed implementation points, including telemetry_request_cost, auth.ts, WRITE_TOKEN_OVH, and validator tests. Done means all four sub-issues are addressed without adding the out-of-scope publishers or billing integration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, cloud, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100