Repository navigation
Conversation
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
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. CodeRabbit Verify
|
Reviewer's GuideThis 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-insequenceDiagram
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
State diagram for proposed KAS device sign-in attemptstateDiagram-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 --> [*]
Flow diagram for proposed owner-DM authorization and commit fencingflowchart 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]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:T3andparked. 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
What changed (motivation → approach → change)
Added
docs/request-for-change/rfc-kas-owner-dm-sign-in.mdwith the upstream front matter (status: draft), an explicit unimplemented status, and source references pinned to8b9aeceeef98a03a491d3547f2b71632d06c1765.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.mdso 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-dmbranch had no unique changes (45 commits behind the audit snapshot) and was fast-forwarded from037a89c872b839c9f83772d6dbc7043f9ce0289bto the audited upstream commit before this standalone documentation commit. No write performed for this work targeted the fork'smain.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 branchdocs/rfc-kas-owner-dm-baseis 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 remainskirodotdev/KiroCrew:main, with headknowlet: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:
docs/README.mdsource reconstructed and verified against its Git blob SHA84606a325a0ed90e153bbb02ec1b0a4d4b608711before the focused index addition.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.mdindex 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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)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:
Documentation:
Tests:
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.