Skip to content

docs: propose owner-only kas sign-in from private messages - #1

Draft
knowlet wants to merge 1 commit into
docs/rfc-kas-owner-dm-basefrom
docs/rfc-kas-owner-dm
Draft

knowlet wants to merge 1 commit into
docs/rfc-kas-owner-dm-basefrom
docs/rfc-kas-owner-dm

Conversation

@knowlet

@knowlet knowlet commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Problem / Motivation

Goal: Obtain a reviewable maintainer decision on terminal-free, owner-only KAS account sign-in from Telegram and Slack private messages before implementation begins.

Part of kirodotdev#26042

The upstream issue is tier:T3 and parked. This is the separate RFC requested by the maintainer at kirodotdev#26042 (comment), not a claim, implementation assignment, or request to treat the feature as scheduled.

Why it matters

A phone-operated remote gateway needs an explicit recovery entry point that does not depend on a working authenticated model turn or a terminal on the host. Account sign-in changes the installation's credential, so sender identity, private-DM proof, cross-entry-point races, and disclosure must be reviewed before a command is added.

Not a goal

  • Implementing or enabling a login command, changing runtime behavior, or changing the issue's priority or labels.
  • Closing Owner-only KAS device sign-in from Telegram and Slack kirodotdev/KiroCrew#26042, recording design acceptance, or claiming live Telegram/Slack/provider validation.
  • New credential stores, shell execution, owner enrollment through chat, account switching, shared-channel login, or enterprise boot-policy changes.

What changed (motivation → approach → change)

Added docs/request-for-change/rfc-kas-owner-dm-sign-in.md with the upstream front matter (status: draft), an explicit unimplemented status, and source references pinned to 8b9aeceeef98a03a491d3547f2b71632d06c1765.

The RFC maps Telegram commands/transport/session-resume ownership, Slack native and transport dispatch, configured owner checks, dashboard owner gating, KasLoginService, device authorization, the encrypted account vault, and current KAS route resolution. It distinguishes the merged CLI/cloud sign-in work (kirodotdev#23657), sign-in generation (kirodotdev#25608), and remote MCP sign-in retention (kirodotdev#28630) from this account-login entry point.

The proposed direct-device-flow MVP has a fresh confirmation, immutable owner/installation/DM binding, one shared per-vault interactive attempt, fenced persistence, cancellation/timeout outcomes, replay controls, and secret-free history/audit requirements. The existing independently authenticated login UI is compared explicitly. Owner-binding authority and the shared UI/CLI coordination cost remain blocking maintainer decisions.

Linked the proposal from docs/README.md so it is reachable from the contributor documentation index. No source code, configuration defaults, workflow, shipped behavior specification, or changelog is changed.

Branch provenance: the preexisting knowlet:docs/rfc-kas-owner-dm branch had no unique changes (45 commits behind the audit snapshot) and was fast-forwarded from 037a89c872b839c9f83772d6dbc7043f9ce0289b to the audited upstream commit before this standalone documentation commit. No write performed for this work targeted the fork's main.

Publication boundary: this is a staging Draft PR in the fork, not an upstream submission. Creating the upstream Draft PR and posting a pointer on the upstream issue both returned 403 Resource not accessible by integration. The base branch docs/rfc-kas-owner-dm-base is an unchanged snapshot of the audited upstream commit, so this fork review contains only one design commit and two documentation files, not unrelated upstream changes. Do not merge this staging PR as an implementation. The intended upstream target remains kirodotdev/KiroCrew:main, with head knowlet:docs/rfc-kas-owner-dm.

Backwards compatibility

Compatible: documentation only; no command, API, credential, or accepted input changes.

Removes nothing: the RFC proposes future behavior and does not remove or tighten anything on main.

Tests

Performed 29 local document checks only:

  • YAML front matter, draft status, issue linkage, required RFC sections, and the unstarted implementation list.
  • Reference definitions and immutable source-reference pin consistency; source paths checked against the files actually read through GitHub.
  • Upstream docs/README.md source reconstructed and verified against its Git blob SHA 84606a325a0ed90e153bbb02ec1b0a4d4b608711 before the focused index addition.
  • Whitespace/conflict-marker and PR-template-heading/Goal checks on the authored files and prepared upstream description.
  • GitHub compare confirms the design commit is one commit ahead of the audited base and changes only the RFC and docs/README.md.

Not run: full-repository scripts/docs-lint.sh, scripts/local-gate.py, backend/frontend tests, and live OAuth/platform E2E. The execution container could not resolve/reach GitHub for a full checkout; source inspection and publication use the GitHub connector. This is not a claim that CI or the repository-wide gates passed. The RFC's acceptance matrix specifies future tests, not completed tests.

Remaining before merge-readiness: add the proposal row to the directory-level docs/request-for-change/README.md index and run the upstream repository documentation gate. The root index link is present, but is not represented as completing that separate directory-index requirement. This PR intentionally remains Draft for design discussion.

Proof: not provable -- docs or config only

Manual verification

Read the current issue and maintainer guidance, RFC format, contribution rules, PR template, and the pinned source integration points. Rechecked the merged state of kirodotdev#23657 and kirodotdev#25608. No provider device authorization was initiated, no account credentials were read, and no Telegram or Slack message was sent.

Requested feedback: authoritative owner binding; direct code/link versus authenticated UI; shared single-flight/commit fencing; first supported providers and gateway shapes. Implementation remains blocked on that feedback and the normal acceptance process. No upstream review or successful upstream notification is claimed.

Screenshots / video

N/A — a design document only, with no rendered product change.

Related Issues

Part of kirodotdev#26042

Related existing work: kirodotdev#23657, kirodotdev#25608. Distinct remote MCP credential lifecycle: kirodotdev#28630.

Sibling sweep

N/A — this is a standalone design proposal, not a fix or revert.

Pattern harvest

N/A — no production defect is fixed in this documentation PR.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality — not claimed; no runtime functionality is implemented here.
  • Self-review completed; code follows project style guidelines — documentation and source-backed design review only.
  • Documentation updated (if applicable) — RFC and root index added; directory-level index and full documentation gate remain outstanding.
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

Summary by Sourcery

Document and solicit maintainer decisions on a secure, terminal-free owner-only KAS sign-in flow without changing runtime behavior.

Enhancements:

  • Add a draft RFC defining security, ownership, concurrency, lifecycle, and secret-handling requirements for future owner-only KAS sign-in from Telegram and Slack private messages.

Documentation:

  • Link the new owner-only KAS sign-in RFC from the documentation index.

Tests:

  • Add documented acceptance criteria and verification requirements for the proposed sign-in flow; no runtime tests are introduced.

Summary by cubic

Adds a draft RFC proposing terminal-free, owner-only KAS account sign-in from Telegram and Slack private messages, and links it from docs/README.md. This is documentation only; no runtime behavior, configuration, or credentials change.

The RFC maps the existing Telegram/Slack dispatch, owner checks, KasLoginService, device flow, and encrypted vault code to a proposed opt-in /login (!login) command grammar with fresh confirmation, replay defense, and fenced single-flight coordination, and explicitly marks owner-binding authority, direct-code delivery vs. authenticated UI, and shared commit fencing as blocking maintainer decisions.

Written for commit ebf38ef. Summary will update on new commits.

View guided diff Turn on auto-fix

Document the owner-DM authorization and account-login lifecycle for
maintainer review before any implementation begins. Compare direct
device-code delivery with an independently authenticated UI handoff.

Part of kirodotdev#26042
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@sourcery-ai

sourcery-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

This documentation-only PR adds a detailed, source-pinned draft RFC for terminal-free owner-only KAS account sign-in through Telegram and Slack private messages, including security and concurrency design constraints, alternatives, open maintainer decisions, and future acceptance criteria; it does not change runtime behavior or implement the feature.

Sequence diagram for proposed owner-only KAS sign-in

sequenceDiagram
    actor Owner
    participant TelegramSlack as Telegram_or_Slack
    participant Gateway as Gateway_Control_Interceptor
    participant Coordinator as KasLoginCoordinator
    participant KAS as KasLoginService
    participant Vault as Encrypted_Account_Vault
    participant Issuer as Device_Flow_Issuer

    Owner->>TelegramSlack: /login start provider
    TelegramSlack->>Gateway: Authenticated private-DM event
    Gateway->>Gateway: is_owner
    Gateway->>Coordinator: start
    Coordinator->>Coordinator: create_confirmation_nonce
    Coordinator-->>TelegramSlack: Confirmation challenge
    Owner->>TelegramSlack: /login confirm nonce
    TelegramSlack->>Gateway: Authenticated private-DM event
    Gateway->>Coordinator: confirm
    Coordinator->>KAS: begin_device
    KAS->>Issuer: Begin device authorization
    Issuer-->>KAS: user_code and verification_uri_complete
    KAS-->>Coordinator: Device authorization details
    Coordinator-->>TelegramSlack: Send code and verification link
    Coordinator->>KAS: poll_token_once
    KAS->>Issuer: Poll authorization
    Issuer-->>KAS: Approved token
    KAS->>Vault: Persist credential
    Vault-->>KAS: Commit result
    Coordinator-->>TelegramSlack: Sanitized completion status
Loading

State diagram for proposed KAS device sign-in attempt

stateDiagram-v2
    [*] --> awaiting_confirmation
    awaiting_confirmation --> starting: confirm
    awaiting_confirmation --> expired: confirmation_expired
    starting --> pending: begin_device
    starting --> failed: authorization_failed
    pending --> pending: poll_token_once
    pending --> committing: authorization approved
    pending --> cancelled: cancel
    pending --> expired: deadline reached
    pending --> failed: provider or transport failure
    committing --> authorized: vault persistence succeeds
    committing --> failed: token_store_failed
    authorized --> [*]
    cancelled --> [*]
    expired --> [*]
    failed --> [*]
Loading

Flow diagram for proposed owner-DM authorization and commit fencing

flowchart TD
    A[Login command received] --> B{Authenticated exact private DM?}
    B -- No --> R[Refuse with owner_only or private_dm_required]
    B -- Yes --> C{Fresh confirmation nonce?}
    C -- No --> R2[Refuse with confirmation_expired]
    C -- Yes --> D{Vault login lease available?}
    D -- No --> R3[Return login_busy]
    D -- Yes --> E[begin_device]
    E --> F[Poll device authorization]
    F --> G{Cancelled, expired, or failed?}
    G -- Yes --> H[Terminal outcome without persistence]
    G -- No --> I{Lease, owner binding, and sign-out generation valid?}
    I -- No --> J[Reject commit]
    I -- Yes --> K[Persist credential in encrypted vault]
    K --> L[Report sanitized terminal outcome]
Loading

File-Level Changes

Change Details Files
Added a source-backed draft RFC defining a future owner-only KAS sign-in flow initiated from Telegram and Slack private messages.
  • Documents current Telegram, Slack, dashboard, authentication-service, vault, polling, and route-resolution integration points at a pinned upstream commit.
  • Defines proposed commands, owner/private-DM verification, immutable attempt binding, shared cross-entry-point coordination, fencing and commit rules, replay protection, polling, cancellation, timeout, disclosure, audit, and history-exclusion requirements.
  • Compares direct device-code delivery with an authenticated UI handoff and records blocking maintainer decisions, phased implementation work, and future acceptance tests.
  • Explicitly keeps the feature unimplemented, opt-in, and subject to owner-binding and disclosure decisions.
docs/request-for-change/rfc-kas-owner-dm-sign-in.md
Linked the draft RFC from the contributor documentation index.
  • Adds a direct link to the owner-only KAS sign-in proposal in the request-for-change section of the documentation README.
docs/README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 3, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant