Skip to content

tc-logview cannot query mozcloud clusters yet #8478

Closed

Description

@lotas

After switching to MozCloud deployments, fx-ci and community-tc logs can no longer be easily queried using tc-logview that had serviceAccount in a different GCP project.

TODO: find a way to create log-reader SA in new gcp project

Activity

  1. added
    housekeepingEases the development of taskcluster, such as build/test/release automation, development docs, etc
    stabilizationIssues that remove rough edges, deprecations, etc.
    on Apr 13, 2026
  2. moved this from Ready to pickup to Backlog / Inbox in TC intake boardon Apr 16, 2026
  3. lotas commented on Apr 16, 2026

    @lotas
    ContributorAuthor

    To maintain least-privilege without static keys, we could move to an impersonated Service Account (SA) model. This allows the tool to "act as" a scoped identity using the user's active SSO session.

    Technical Strategy:

    • Identity: Provision a dedicated tc-log-reader SA via Terraform.
    • Permissions: Grant the SA roles/logging.viewAccessor and grant roles/iam.serviceAccountTokenCreator on that SA
    • Implementation: Update the Go tool to use google.golang.org/api/impersonate. This allows it to automatically use local Application Default Credentials (ADC) to fetch short-lived tokens.

    TODO List:

    • Terraform: Define the tc-log-reader Service Account in the GPA repo.
    • IAM: Bind logging.viewAccessor to the SA and serviceAccountTokenCreator to the SRE group.
    • Code: Refactor tc-logview to use the Go impersonate package instead of a static JSON path.
    • Setup: Run gcloud auth application-default login --impersonate-service-account=[SA_EMAIL] for local keyless access.
  4. moved this from Backlog / Inbox to Ready to pickup in TC intake boardon Apr 17, 2026
  5. moved this from Ready to pickup to In progress in TC intake boardon May 26, 2026
  6. self-assigned this
    on May 26, 2026
  7. lotas commented on May 28, 2026

    @lotas
    ContributorAuthor

    Added ADC support to allow gcloud auth application-default login as a fallback authentication (no key_path is needed)
    https://github.com/taskcluster/tc-logview/tree/v1.1.0

  8. lotas commented on May 28, 2026

    @lotas
    ContributorAuthor

    Added versioning as well tc-logview version reports current version.. Might be handy as features change over time

  9. lotas commented on May 29, 2026

    @lotas
    ContributorAuthor

    Added also short lived tokens for isolated envs:
    Pre-issued OAuth2 access tokens via the TC_LOGVIEW_ACCESS_TOKEN env var. Intended for containers/agents that should run without access to the host's gcloud session or a long-lived service account key. The host mints a short-lived, SA-scoped token (e.g. gcloud auth print-access-token --impersonate-service-account=<SA>)

  10. lotas commented on May 29, 2026

    @lotas
    ContributorAuthor

    taskcluster/tc-logview#4 add support for the scoped log view client access tokens

    https://github.com/mozilla/webservices-infra/pull/11197 webservices infra change

  11. moved this from In progress to Done in TC intake boardon May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

housekeepingEases the development of taskcluster, such as build/test/release automation, development docs, etcstabilizationIssues that remove rough edges, deprecations, etc.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions