WIP: feat: authenticated Kennel log access #1

Draft
kritdass wants to merge 1 commit from feat/kennel-log-access into main
Member

Direct terminal log reads need an authenticated Kennel API so developers do not have to manage Grafana service-account tokens. This draft records the backend contract and intended collar kennel logs behavior; it deliberately does not ship the rejected token-based logcli adapter.

Required Kennel work:

  • Authenticated, authorized read-only build/deployment log endpoints, with project access checks.
  • Stable identifier discovery from repository plus full commit SHA, or machine-readable build/deployment IDs in status metadata.
  • Bounded Loki queries, line limits, pagination, and a documented follow protocol.
  • A supported SSO flow for CLI users and authorized automation. Forgejo tokens are not automatically Kennel credentials.

After that backend contract exists, collar kennel logs 42 should retrieve deployment logs directly, --build should select build logs, --follow should stream, and --links should retain Grafana URLs. Preserve the existing JSON report contract.

Current infrastructure already has a Grafana Loki proxy, but an unauthenticated read returns 401. Kennel currently has no user-authenticated API. Authentication and authorization are the dependency, not exposing Loki publicly.

Validation: proposal reviewed against current canonical Kennel routes, status-link generation, and infrastructure Grafana/Loki configuration. Repository hooks passed. No live resources were changed for testing.

Direct terminal log reads need an authenticated Kennel API so developers do not have to manage Grafana service-account tokens. This draft records the backend contract and intended `collar kennel logs` behavior; it deliberately does not ship the rejected token-based logcli adapter. Required Kennel work: - Authenticated, authorized read-only build/deployment log endpoints, with project access checks. - Stable identifier discovery from repository plus full commit SHA, or machine-readable build/deployment IDs in status metadata. - Bounded Loki queries, line limits, pagination, and a documented follow protocol. - A supported SSO flow for CLI users and authorized automation. Forgejo tokens are not automatically Kennel credentials. After that backend contract exists, `collar kennel logs 42` should retrieve deployment logs directly, `--build` should select build logs, `--follow` should stream, and `--links` should retain Grafana URLs. Preserve the existing JSON report contract. Current infrastructure already has a Grafana Loki proxy, but an unauthenticated read returns 401. Kennel currently has no user-authenticated API. Authentication and authorization are the dependency, not exposing Loki publicly. Validation: proposal reviewed against current canonical Kennel routes, status-link generation, and infrastructure Grafana/Loki configuration. Repository hooks passed. No live resources were changed for testing.
docs: propose authenticated kennel log access
Some checks failed
CI / build (pull_request) Has been skipped
CI / package (pull_request) Successful in 21m30s
CI / check (pull_request) Has been cancelled
CI / check-1 (pull_request) Has been cancelled
29c2684a92
Author
Member

@anish this is for the grafana integration because I think Loki tokens would be too unergonomic

@anish this is for the grafana integration because I think Loki tokens would be too unergonomic
kritdass force-pushed feat/kennel-log-access from 29c2684a92
Some checks failed
CI / build (pull_request) Has been skipped
CI / package (pull_request) Successful in 21m30s
CI / check (pull_request) Has been cancelled
CI / check-1 (pull_request) Has been cancelled
to 778ef018eb
All checks were successful
CI / build (pull_request) Has been skipped
CI / package (pull_request) Successful in 2m18s
CI / check-1 (pull_request) Successful in 9m47s
CI / check (pull_request) Successful in 0s
2026-10-15 19:20:07 +00:00
Compare
Author
Member

@thesuperRL would like your thoughts as well

@thesuperRL would like your thoughts as well
All checks were successful
CI / build (pull_request) Has been skipped
CI / package (pull_request) Successful in 2m18s
CI / check-1 (pull_request) Successful in 9m47s
CI / check (pull_request) Successful in 0s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/kennel-log-access:feat/kennel-log-access
git switch feat/kennel-log-access

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/kennel-log-access
git switch feat/kennel-log-access
git rebase main
git switch main
git merge --ff-only feat/kennel-log-access
git switch feat/kennel-log-access
git rebase main
git switch main
git merge --no-ff feat/kennel-log-access
git switch main
git merge --squash feat/kennel-log-access
git switch main
git merge --ff-only feat/kennel-log-access
git switch main
git merge feat/kennel-log-access
git push origin main
Sign in to join this conversation.
No description provided.