Repository navigation
feat(core): re-vendor /v2 with sync and key operations, and RFC 9470 step-up in the account client - #4616
Merged
Conversation
…step-up in the account client The /v2 document is tablepro-cloud integ/server at 9b86ad9d.
…read the DPoP nonce challenge
… started for; regenerate the Windows bindings
…error code, never the body
…2-step-up # Conflicts: # windows/src/TablePro.Interop/Generated/tablepro_ffi.cs
…2-step-up # Conflicts: # windows/src/TablePro.Interop/Generated/tablepro_ffi.cs
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.
Summary
/v2document from tablepro-cloudinteg/serverat 9b86ad9d withcore/scripts/update-cloud-api.sh: the/v2/syncscopes, pull, push, key-device and stop operations, and theDPoPheader onDELETE /v2/devices/{id}.cloud-api:poll_sync_scopessendsIf-None-Matchand reads a 304 asNotModified; a 304 to a poll that named no ETag is refused.cloud-api: a 401 with RFC 9470'sinsufficient_user_authenticationchallenge isApiError::StepUpRequired { acr_values, max_age_secs }, and one with RFC 9449'suse_dpop_nonceisApiError::UseDpopNonce { nonce }.cloud-api: theWWW-Authenticateparser follows RFC 9110's challenge grammar; a repeated parameter or amax_agethat is not whole seconds asks for nothing.account:Account::step_upopens the authorization endpoint as sign-in does (ADR 0047's browser or web authenticator) withacr_values,max_ageand PKCE.account: the step-up's tokens are taken only for the same account (sub), API (aud, company servers) and sign-in session; otherwise they are revoked.account: taken tokens replace the old family, which is revoked; the device registers again (200 for its machine) and the token is refreshed before the retry (ADR 0051, Step-up; api.md, OAuth).account:Account::stepped_upruns a call, steps up once on its challenge and runs it again; a second challenge goes back to the caller.account: new codesaccount.step_up_requiredandaccount.step_up_other_account.account: a device registration keeps the held entitlement inaccount.json.account: a refused revocation keeps only a standard OAuth error code, never the response body, which callers log.StepUpChallengeInfo,AccountService::step_up(challenge, cancel), andErrorInfo.step_uponaccount.step_up_required. A host passesSyncFailureInfo::StepUpfromsync.step_up_requiredthe same way.Test plan
cloud-api: challenge parsing, the 401 mappings, and a fake server for the scopes poll (304 on the current ETag, the body otherwise, a 304 withoutIf-None-Matchrefused).account, against a fake tablepro-cloud: each challenge form; the Mac web authenticator and the Linux loopback browser; a second challenge; another account; a closed browser; a sign-out or an earlier sign-in committing during the step-up; signed out; a company server's issuer found again and its tokens for another API refused; a refused revocation that echoes the token.ffi: the step-up error carries its challenge intoErrorInfo.verify.sh --platform windows --jobs 4bindings, build, test (2507 tests); core (tablepro-ffi, 385 tests) before the merge of main.cargo testand clippy for tablepro-cloud-api and tablepro-account.verify.sh --jobs 4 package TableProFFI(9 tests).verify.sh --platform linux lint(rustfmt, clippy with and without default features), andtest tablepro error_text::account(16 tests) on the merged head, in the dev container.