Expand description
Login with single sign-on: enroll this device with the approval of an enrolled one, then sign in with the credentials it hands over.
ModulesΒ§
- cpace π
- The CPace exchange that hands the credentials of an enrolled device to a new one, reverse engineered from 1Passwordβs WASM module: the local crypto, and the requests that carry it.
- enrollment π
- Enrolling this device as a trusted one: ask the server to start an enrollment, wait for the user to approve it on an enrolled device, then take the credentials that device shares.
- ui
- Public callback contracts the SSO login flow drives.
StructsΒ§
- SsoAccount π
- What an SSO login needs from the login info of the account.
- Timing π
- The timing knobs of the SSO network flows, grouped so the tests can shrink them.
ConstantsΒ§
- DEVICE_
NOT_ πENROLLED - SSO_
START_ πENDPOINT - SSO_
VERIFY_ πENDPOINT
FunctionsΒ§
- complete_
auth π - has_
allowed_ πscheme - Requests to a server supplied URL carry credentials and the user opens one in a browser, so only https will do. The fake servers of the tests have no TLS, hence http under test.
- is_
redirect_ πuri - The identity provider sends the user back here. For the desktop client 1Password picks its own
app scheme,
onepassword://, which the UI catches before anything opens it. - is_
web_ πurl - login π
- Signs in with the sign-in token the SSO login earned, proving knowledge of the SRP x from the credential bundle. Returns the session key and a client that signs its requests with it.
- non_
empty π - perform_
sso_ πlogin - Has the user log in with the identity provider, and returns the authorization code and the state it redirects back with.
- require_
sso π - Checks that the account signs in with SSO and that its login info says who the user is and where the SSO endpoints are.
- sso_
login π - Signs in with single sign-on. Returns the signed session and the account unlock key that opens the accountβs keysets.
- start_
auth π - start_
sso_ πlogin - Asks for the URL of the identity provider login.
- url_
parameter π - The form-decoded value of the first parameter called
namein the query or the fragment ofurl, as OAuth encodes the redirect. A missing or empty value isNone. - validate_
sign_ πin_ address - The server picks this address and every SSO request goes to it, so it has to be a plain https address the API path can be appended to. The address is not echoed in the error: it can carry credentials.
- verify_
sso_ πlogin - Exchanges the authorization code for an SSO session.