Repository navigation
fix(looker-studio): attest external template access, name the terminal "not shared" dialog (#445) - #446
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
…l "not shared" dialog (#445) An external user's Linking API copy fails with the terminal "This report isn't shared with you" dialog before any ds.* parameter is applied (#445). Every live_template_verification method is owner-side, anonymous HTTP cannot observe the ACL (the embed shell is byte-identical for public, private, and nonexistent report IDs), and a 2026-08-25 authenticated Permissions API read returned LINK_VIEWER: allUsers — so the cause is not isolated and only an end-to-end canary from a signed-in, non-owner, out-of-domain identity can clear the copy path. - bindings/report_template.yaml: new external_access_verification attestation with two controls (Permissions API link-role read; dated external-identity copy canary with c.explain=true), status FAILING, and the outage recorded in known_live_issues with its NOT_ISOLATED cause state. - tests: pin both new blocks; a contract test makes PASSING require a dated canary no older than the published template and FAILING require an OPEN known_live_issues entry, so the outage cannot be silently erased; a docs test asserts all three user-facing surfaces quote the dialog. - docs/index.html, README.md, USER_MANUAL.md: distinguish the terminal dialog from the #398 provisioning flicker, explain that it is a template-side copy failure (not the user's data, IAM, or identifiers), ask reporters to note which account the dialog selected, and stop presenting hydrate_dashboard.py as an outage workaround (it copies the same template); Grafana is the alternative while the template is blocked. - tools/test_web_configurator.mjs: pin the new copy so the distinction cannot regress silently.
31c0dcb to
a6fdf76
Compare
|
CI status: all substantive checks pass (5-version Python test matrix, Configurator browser smoke, CLA). The Format check failure is not from this PR: pyink 26.5.1 shipped after |
caohy1988
left a comment
There was a problem hiding this comment.
Full review: I found three P2 issues that should be addressed before merge and one P3 documentation correction. The focused dashboard suite passes (28 tests), the configurator smoke test passes, and the Python 3.10–3.14 CI matrix is green. The current Format check failure is unrelated repository-wide pyink drift tracked by #447; it is not attributed to this diff. Inline comments contain the actionable findings.
caohy1988
left a comment
There was a problem hiding this comment.
Reviewed locally on a worktree at a6fdf76: 28 pytest passed, tools/test_web_configurator.mjs OK, browser_smoke.sh OK.
What checks out (verified, not assumed)
- The Permissions API vocabulary is exactly right.
LINK_VIEWERwith memberallUsers= "Anyone with the link can view", andassets:searchreturnstrashed— confirmed against the official API types reference. The two-control design is sound: the API exposes the link role but not the viewer copy-disable control, so the end-to-end canary is genuinely necessary. c.explain=trueis real — it enables the Linking API debug dialog. Good choice for the canary protocol.- Honest bookkeeping:
status: FAILING,link_access_verified_date: null,known_live_issueswithcause_isolation: NOT_ISOLATED— the attestation claims no more than was observed. The FAILING⇒OPEN-issue invariant in the new test is a good idea. - Docs nuance is correct:
hydrate_dashboard.pyis not an outage workaround (its URL copies the same template); Grafana is. The multi-account-first guidance in USER_MANUAL matches hypothesis 4 in #445.
Findings
[P2] bindings/report_template.yaml comment — "byte-identical" is falsified by the evidence it cites.
The comment says the embed shell is "byte-identical for public, private, and nonexistent report IDs (#445)". #445's own measurement: real ID = 71973 bytes, nonexistent = 71971 bytes (reproduced again today). The correct claim is "the same application shell, indistinguishable without an identity". Precision matters doubly in an attestation file. Suggest rewording to the issue's phrasing.
[P2] Nothing enforces the monthly cadence — acceptance criterion 2 is only weakly met.
cadence: monthly_manual_until_automated is a label, not a mechanism. Once status flips to PASSING, the only date invariant is link_access_verified_date >= published_date — and published_date is static (2026-08-11), so a verification done today stays green forever even if access regresses later. That recreates the blind spot that caused #445: nobody is prompted to re-run the canary. Suggest a follow-up: a scheduled (weekly) staleness workflow that opens/bumps a tracking issue when link_access_verified_date is missing or older than 30 days — no hosted credential needed, it just makes the dated manual protocol recur. Happy to contribute this as a stacked PR.
[P3] docs/app.mjs WAITING_MESSAGE untouched.
The static notes in index.html now distinguish the terminal dialog, but the dynamic status text set on submit/click still says only "may briefly show an error page — don't close it" — the message a user actually watches after clicking still trains them to wait out a terminal denial. The new tests assert on index.html only, so this gap is invisible to CI. One appended sentence fixes it (the duration-consistency test constrains the edit).
[P3] The API protocol omits caller constraints.
GET …/v1/assets/{id}/permissions isn't callable from just any account: the Looker Studio API is gated to Workspace/Cloud Identity org members with the datastudio OAuth scope (even its discovery doc 403s for unregistered callers). A maintainer following the protocol from a personal Gmail hits PERMISSION_DENIED and may misread it as a sharing regression. One line in the protocol string ("call from a Workspace-org identity with the datastudio scope") prevents that.
[P3] Step-02 contract loosened in tools/test_web_configurator.mjs.
The old regex pinned the transient warning immediately before the dialog explanation; the split into two independent matches lets the two fragments drift apart undetected. Net coverage is still good given the new #445 assertions. Optional: keep the split but assert ordering.
Ask: cause_isolation records a 2026-08-25 authenticated API read (LINK_VIEWER allUsers, non-trashed) — pivotal evidence and vocabulary-exact, but not reproducible from the PR. Please paste the command and redacted response (here or into the protocol) so the next person can re-run it verbatim.
Recommendation: approve with comments — fix the "byte-identical" wording before merge; the rest work as follow-ups.
…sistent status, no public identifiers Review findings on PR #446, all verified before changing: - The attestation comment claimed the embed shell is byte-identical across report IDs; #445's own measurement (71973 vs 71971 bytes) falsifies that. It now says: same application shell, indistinguishable without an identity. - The PASSING branch of the attestation contract accepted contradictory evidence. It now requires success results on both controls, a non-future canary date, and no matching OPEN live issue; FAILING requires failure evidence plus the OPEN entry. Dates cannot be in the future, and a new next_due_date field must schedule the next manual run within the monthly cadence — statically checked so CI never fails by wall-clock passage; a scheduled staleness consumer is a follow-up on #445. - The docs asked reporters to post which Google account the dialog selected, which solicits identifiers #445 deliberately redacts. All three surfaces now ask only personal-vs-organization and say not to post the address; the canary protocol says to record the account privately. - README no longer asserts the viewer copy-disable control produces this exact dialog; it is a candidate cause until reproduced end-to-end. - app.mjs WAITING_MESSAGE now excepts the terminal dialog from the wait guidance, the docs test covers app.mjs so the gap is CI-visible, the Permissions API protocol names its Workspace/Cloud Identity + datastudio scope caller constraint, and the step-02 contract regains an ordering assertion.
|
All review findings addressed in 327e4d5 (28/28 tests pass including the node contract test and browser smoke; pyink 25.x clean). Item by item:
On the ask (reproducible API read): the observation is recorded in the 2026-08-25 validation comment on #445 — I did not run it in this PR's verification. To re-run verbatim, from a Workspace/Cloud Identity account whose token carries the Recorded response: |
caohy1988
left a comment
There was a problem hiding this comment.
Re-review of 327e4d5, verified locally on a worktree: 28 pytest passed, test_web_configurator.mjs OK, browser_smoke.sh OK.
Previous findings — resolution audit
- [P2] "byte-identical" — Fixed. "The same application shell … (sizes differ only by the echoed id)" is accurate and matches the measured 71973/71971.
- [P2] Cadence enforcement — Partially addressed, honestly.
next_due_datewith a real invariant (newest_observation < next_due ≤ newest + 35d) puts the data contract in place; the docstring defers the scheduled staleness check explicitly. Noted as a follow-up, not a blocker — a weekly workflow consumingnext_due_datecan close this. - [P3]
app.mjsWAITING_MESSAGE — Fixed, and pinned twice (JS contract regex + the docs-surface test). - [P3] API caller constraints — Fixed. Workspace/Cloud Identity +
datastudioscope, PERMISSION_DENIED-is-caller-constraint is exactly right. - [P3] Step-02 ordering — Fixed via the
indexOfassertion. - Ask: paste the API command + redacted response — not addressed;
cause_isolationis still not reproducible from the PR. Three lines would do it.
New findings in this revision (both minor)
[P3] No date field records a canary failure re-run. The next_due_date invariant anchors to the newest observation, but when FAILING the only observation date is the API read's last_observed_date — link_access_verified_date is null and passes-only. If someone re-runs the canary on 2026-09-10 and it fails again, there is nowhere to record that date, so next_due_date stays anchored to 2026-08-25 and silently schedules the next run more than 30 days from the actual latest check. Suggest giving the canary control its own last_observed_date (set on every run, pass or fail) and including it in observation_dates when last_result == "FAILURE_REPORTED".
[Nit] docs/index.html — one reflow casualty: "account's email address. The repository's CLI preflight can still validate your" is a ~110-char line inside an ~80-char-wrapped paragraph.
Also verified in the new test logic
- The
next_due_dateinvariant never compares against wall-clocktoday— no CI time bomb; only future-dating is rejected. Good design. - PASSING now requires success on both controls plus no OPEN tracked issue; FAILING requires
FAILURE_REPORTED+ OPEN issue. Evidence-consistent in both directions. - The privacy correction (report "personal vs organization", never the email) is applied consistently across README, USER_MANUAL, index.html, and the canary protocol — aligns with Publication safety.
Recommendation: approve. Remaining items are small follow-ups, not blockers.
caohy1988
left a comment
There was a problem hiding this comment.
Full re-review of 327e4d5: the prior contradictory-status, public-account-identifier, copy-control wording, dynamic WAITING_MESSAGE, and step-order findings are fixed. Three P2 issues remain inline and should be addressed before merge.
One P3 metadata correction is also needed: the PR description still says the public explainer asks users to report “which account the dialog selected,” and its test summary omits the new success-result/open-issue/date invariants. Please update the PR body to match the privacy-safe wording and current state contract.
Verification: 28 focused pytest tests passed; the configurator smoke test, Node syntax checks, git diff --check, pyink<26, and isort<8 passed. GitHub’s Python 3.10–3.14 matrix, configurator smoke, CLA, and security checks are green. The Format check remains an unrelated repository-wide pyink issue tracked by #447.
…-anchored cadence, scheduled staleness - A PASSING canary must now postdate every recorded incident for the tracked issue, and its verification date must equal its observation date — recovery evidence can no longer predate the outage it claims to resolve. - The canary control records last_observed_date on every run, pass or fail (currently 2026-08-24, the reported failure), and next_due_date is anchored to that date alone, so refreshing the weaker Permissions API read cannot advance the deadline. - The wall-clock half of the cadence now exists: a weekly scheduled workflow runs scripts/check_external_access_staleness.py and opens or bumps a tracking issue once next_due_date passes; unit tests pin the script's verdicts on both sides of the deadline and the workflow wiring. Unit tests still never compare dates to today. - The API protocol prescribes the least-privilege datastudio.readonly scope and treats PERMISSION_DENIED as indeterminate (caller constraint or lost asset authorization), instead of dismissing it as non-regression. - The 2026-08-25 observation is now reproducible from the repo: the yaml records the verbatim command and redacted response beside the control. - Rewrapped the overlong index.html line.
|
Round-2 findings addressed in de8b4f8 (29/29 tests pass incl. node contract + browser smoke; pyink 25.x clean). Beyond the three inline threads:
New in this revision, per the "scheduled consumer must land with this contract" condition: |
caohy1988
left a comment
There was a problem hiding this comment.
Fresh full review of de8b4f8.
I re-read the complete 555-line diff and all changed files, audited the current #445 evidence and review threads, checked the recipient-policy claim against current Google Workspace documentation, and ran independent testing, maintainability, security, performance, design, red-team, and adversarial passes.
The three P2 findings from the previous round are fixed: recovery now postdates retained incidents, recurrence is anchored to the end-to-end canary and has a scheduled consumer, and the OAuth guidance now uses datastudio.readonly and treats denial as indeterminate.
This pass found four P2 issues and three P3 issues inline. The P2s should be addressed before merge. The account is also the PR author, so GitHub only permits a COMMENTED review rather than a formal request-changes review.
Verification: 29 focused pytest tests passed; the Node configurator contract and syntax checks passed; git diff --check, pyink<26, and isort<8 passed; and the staleness CLI returned 0 on the due date and 1 the day after. GitHub's Python 3.10–3.14 matrix, configurator smoke, CLA, and security checks are green. The Format check remains the unrelated repo-wide pyink drift tracked by #447.
…eshness, durable history, hardened workflow Four P2s and three P3s from the fresh full review of de8b4f8, each verified before changing: - Recipient organization policy: a Workspace admin can block members from receiving Looker Studio assets owned by external domains, so a managed canary account can fail against a fully public template. The canary protocol now requires a personal account or a managed account with recorded policy, records last_identity_class on every run (the 2026-08-24 reporter's class is unknown, which is recorded as such), a PASSING canary must carry a policy-clearing class, and every public doc names recipient policy instead of calling a persistent failure necessarily owner-side. The cause record adds it as a fourth credible cause. - Evidence freshness: PASSING now requires the Permissions API observation to share the passing canary's date, so stale link-role evidence cannot vouch for a fresh copy; the protocol also requires the canary account to hold no direct grant on the report. - Durable, ordered history: the tracked issue must keep at least one known_live_issues entry in both states (RESOLVED, never deleted), and a RESOLVED entry must carry resolution_observed_date equal to the passing canary's date and no earlier than the incident — an explicit recovery marker replacing the strict date inequality that both allowed history erasure and rejected legitimate same-day recovery. - Supply chain: the staleness script is stdlib-only (its field extraction is cross-checked against a real YAML parse in tests), and the workflow is split into a contents:read check job that installs nothing and an issues:write report job with no checkout and no downloads. - The workflow test now parses the YAML structurally (active cron, script invocation in a run step, no pip install, write-job gating and failure path) instead of substring matching; the docs test asserts per-surface no-wait guidance, the identifier-posting prohibition, rejection of the prior selected-account wording, and the explainer's body-text size. - The #report-not-shared explainer renders at 1rem instead of inheriting the 0.82rem notice fine print.
|
Round-3 findings all addressed in 36b4bd1 — the four P2s and three P3s each have a fix-reply in their thread. Highlights:
Verification: 29/29 pytest (node contract + real-Chrome smoke included), pyink 25.x format-stable, the staleness CLI flips exactly at the deadline, and the contract was negative-tested against all four attack mutations (stale-API vouching, history erasure, marker-less/pre-incident resolution, unknown identity class) plus positive-tested for the two legitimate recovery shapes (same-day and later, with matched API read). |
There was a problem hiding this comment.
Final full review of current head 24df3f7 (including the merge from main). I re-read the complete PR diff, audited all prior findings and replies, and verified the head delta is only the #447 pyink pin. The seven round-3 findings are fixed and their threads are now resolved.
No P1/P2 or merge-blocking correctness issues remain. I left two non-blocking P3 comments: one test-contract gap that permits an inverted report gate or package download in the write job, and one check-then-create race that can duplicate the tracking issue under overlapping workflow runs. Both are suitable follow-ups.
Verification: 29 focused pytest tests passed (including real-Chrome smoke); Node configurator syntax/contracts, the staleness due-date boundary, git diff --check, full-tree pyink<26 (290 files), and isort passed. GitHub now reports Format, Python 3.10-3.14, browser smoke, build, CLA, scan-pr, and zizmor all green. The PR is mergeable/CLEAN and has collaborator approval.
Recommendation: merge-ready; track the two P3 hardening items as follow-ups.
| report_job = workflow["jobs"]["report"] | ||
| assert report_job["permissions"] == {"issues": "write"} | ||
| assert report_job["needs"] == "check" | ||
| assert "overdue" in report_job["if"] |
There was a problem hiding this comment.
P3 (non-blocking) — this regression test still permits both failures it is meant to prevent. assert "overdue" in report_job["if"] accepts an inverted gate such as overdue != 'true', and the dependency check scans only check_runs; adding pip install ... to a run step in the issues: write job still satisfies the steps-vs-runs assertion. I replayed the current assertions against both mutations and both passed. Please assert the exact overdue predicate and explicitly reject dependency/download commands in report_runs (or cover the write step through an equivalent structural check).
| body="$MESSAGE | ||
|
|
||
| Protocol: dashboard/looker_studio/bindings/report_template.yaml -> external_access_verification. Context: #445." | ||
| existing=$(gh issue list --repo "$GITHUB_REPOSITORY" --state open \ |
There was a problem hiding this comment.
P3 (non-blocking) — overlapping scheduled/manual runs can race this check-then-create sequence. With no workflow or job concurrency key, two report jobs can both observe no matching issue and then both create one. Add a workflow-level concurrency group with cancel-in-progress: false (matching the repository pattern in release-tracing.yml) so issue reconciliation is serialized.
…configurator (#450) * chore(release): 0.5.1 — evalbench reader, canonical rubrics, single-input configurator Version bump 0.5.0 -> 0.5.1 and the changelog cut for everything merged since v0.5.0 (2026-08-11). In the wheel: the EvalBench BigQuery run reader (#444), canonical evaluation rubrics in core (#431), and the CLI judge-feedback escaping fix (#438). Repo/live-template side: the single fully-qualified table-ID configurator entrance (#449), Console table-link paste (#424), the attested external-access contract with its staleness workflow (#446), the end-user manual (#425), Grafana metric and scan-bound fixes (#433) with the one-command local run (#422), and the documentation and CI follow-ups. * chore(release): fold #432 golden-matching into the 0.5.1 cut The release branch was cut one commit before #432 landed on main; the synthetic merge CI builds would already ship golden_matching.py in the 0.5.1 wheel, so the module and its three top-level exports must be in the release section. Merges main and documents the module in Release highlights and Added.
Implements the repository-side half of #445 (fix plans B + D), incorporating the 2026-08-25 validation findings on the issue: the live ACL currently reads
LINK_VIEWER: allUsersand the report is non-trashed, so the cause is not isolated — the Permissions API cannot see the separate viewer copy-disable control, and only an end-to-end copy canary from a signed-in, non-owner, out-of-domain identity clears the whole path the configurator depends on.What changed
bindings/report_template.yaml— newexternal_access_verificationattestation with two controls:permissions_api_link_role_check— authenticated Permissions API read must listLINK_VIEWER: allUsers, called with the least-privilegedatastudio.readonlyscope from a Workspace/Cloud Identity account;PERMISSION_DENIEDis treated as indeterminate (caller constraint or lost asset authorization). Records its known limitation (does_not_expose_viewer_copy_disable_control) and its last observation (2026-08-25, present), with the verbatim command and redacted response reproducible from the file.external_identity_link_access_check— end-to-end copy canary (/reporting/create?c.reportId=…&c.mode=view&c.explain=true) that recordslast_observed_dateon every run, pass or fail (currently 2026-08-24, the reported failure);link_access_verified_date: null,last_result: FAILURE_REPORTED.Overall
status: FAILING,cadence: monthly_manual_until_automated,next_due_date: 2026-09-24anchored to the canary's own observation, tracking #445. The outage is also recorded inknown_live_issueswith itsNOT_ISOLATEDcause state naming the three remaining credible causes.Attestation contract (
tests/test_looker_studio_dashboard.py) — the bindings-drift test pins the attestation byte-for-byte, andtest_external_access_attestation_is_dated_or_trackedenforces evidence-consistency in both directions:PASSINGrequires success results on both controls, a canary verification date equal to its observation date, no older than the published template, strictly newer than every recorded incident for the tracked issue, and no matching OPEN live issue — recovery evidence cannot predate the outage, and the status cannot flip while contradictory failure evidence remains.FAILINGrequiresFAILURE_REPORTEDon the canary plus a matching OPENknown_live_issuesentry — the outage cannot be silently erased.next_due_datemust fall within 35 days of the canary'slast_observed_date— refreshing the weaker API read alone cannot advance the deadline.Wall-clock enforcement — unit tests deliberately never compare attestation dates to today (that would fail unrelated PRs by time passing). Instead,
.github/workflows/external-access-staleness.ymlrunsscripts/check_external_access_staleness.pyweekly: oncenext_due_datepasses it opens (or bumps) a tracking issue and fails the scheduled run, with no credentialed API involved. Unit tests pin the script's verdicts on both sides of the deadline and the workflow wiring.Docs (
docs/index.html,docs/app.mjs,README.md,USER_MANUAL.md) — every wait-it-out note (including the dynamic status message a user watches after clicking) now distinguishes the terminal "This report isn't shared with you" dialog from the #398 provisioning flicker, and a#report-not-sharedexplainer states it is a template-side copy failure — nothing is wrong with the user's data, IAM, or identifiers. Reporters are asked to say only whether the signed-in account is personal or part of an organization, and explicitly told not to post the account's email address (reporter identifiers are redacted per Publication safety). The CLI preflight is explicitly not presented as a workaround (it copies the same template); Grafana is the alternative. The viewer copy-disable control is described as a candidate cause, not a confirmed one.tools/test_web_configurator.mjs— pins the new copy (explainer present, anchor references from both wait-it-out notes, verbatim dialog quotes, issue link, warning-before-dialog ordering, and the WAITING_MESSAGE exception) so none of it can regress silently.Verification
python3 -m pytest tests/test_looker_studio_dashboard.py→ 29 passed (includes the node contract test and the real-Chrome browser smoke).bash autoformat.sh(pyink 25.x + isort) → no changes, format-stable.scripts/check_external_access_staleness.py→ exit 0 today, exit 1 with an actionable message for a post-deadline date.Out of scope (owner-side, tracked on #445)
Restoring/confirming the copy path (fix plan A — including the viewer copy-disable check under Share → Manage access), the non-owner canary click-through, and the ownership transfer (plan C,
governance.transfer_status: PENDING_MAINTAINER) happen in Looker Studio/Drive. Once the canary passes, the resolution path is codified: setstatus: PASSING, fill both canary dates, close theknown_live_issuesentry — the contract test enforces exactly that shape.Addresses the repository-side acceptance criteria 2–4 of #445; criteria 1 and 5 remain owner-side.
🤖 Generated with Claude Code