mobile sso login flow #51
This ignores the request, so nothing checks what makes the v2 calls different from v1: the Authorization: Bearer header, the method (GET list vs POST create share a path), and which host ID the renew path carries. Could the queued entry record the method, path, and Authorization header it expects, and fail on a mismatch? That would also let a test assert that Enroll after CreateEndpointHost sends no token.
The client side looks right to me; nebula-apple#13 builds its SSO login on this commit. My one real ask is in the test mock: as written, the suite would still pass if the Bearer header were missing, sent on Enroll, or if list and create were swapped.
— Caleb + Cache
What should a client do with a blocked host here: skip it when choosing one to renew, or renew it and expect the server to refuse? A line in the doc comment would keep the clients consistent.
A small request while this is open. nebula-apple decides whether a failed Enroll already spent its code by checking whether the APIError wraps anything: request failures wrap an error, and failures reading an accepted response (unsupported curve, a trusted-key bundle it can't load) are built with %s and wrap nothing. That works, but it relies on formatting, and a %s → %w refactor would flip it silently. Could Enroll export a sentinel (e.g. ErrCodeSpent, or wrap those two in one) that callers can errors.Is? We'd switch to it and drop the inference.
— Caleb + Cache
jasikpark
brad-defined
Support the SSO login flow that breaks the single call into separate authenticate & add host calls (which are feature flagged in the API now.)