CLI command
skarbiec sites
Say which sites one login is for, so autofill offers it there, without rewriting its payload through set; login list lists the logins that name none.
Invocation#
skarbiec sites <login-id> [--set <domain[,domain...]> | --add <domain[,domain...]> | --remove <domain[,domain...]> | --add-related | --change-pages]Purpose#
Say which sites one login is for, so autofill offers it there, without rewriting its payload through set; login list lists the logins that name none.
Required inputs and options#
- The login id, then optionally one of --set with the whole new list of domains, --add with domains to offer it on as well, --remove with domains to stop offering it on, each comma separated, --add-related or --change-pages. Each is a bare lowercase host such as example.com; a login for example.com is also offered on its subdomains. An empty --set clears the list. --add-related reads Password Manager Resources' list of sites that share one sign-in, https://raw.githubusercontent.com/apple/password-manager-resources/main/quirks/shared-credentials.json, and --change-pages its list of change-password pages, https://raw.githubusercontent.com/apple/password-manager-resources/main/quirks/change-password-URLs.json, each downloaded whole with curl so no site name leaves.
Output and state effects#
- Without a flag prints ok, item, domains (its sites as login list reads them: context.domains and context.domain, or for a login that states no list the hosts of its imported addresses) and change_password, each site's well-known change-password address (https://<site>/.well-known/change-password) in the same order, and writes nothing. --change-pages writes nothing either and prints ok, item and pages: each site with change_password, the page the list names for it — a listed site matching its subdomains too — or else the well-known address, and source, the list's address or well-known. With --set it stores context.domains as given, duplicates dropped; --add stores the current sites with the new ones appended where missing, and --remove the current sites without the ones named. --add-related adds every member of a shared group one of the login's sites belongs to, and the new sites a move takes sign-in to from one of them — a move only goes forward, so a login on the new site gains nothing from the old one — and adds related_added and source to the answer. Each write removes a single context.domain so the list is the one answer (imported addresses stay in the context but no longer decide), writes a new revision to the same recipients and tags, appends a sites-set audit entry and prints ok, item, before and domains. POST /v1/operator/items/sites takes id; POST /v1/operator/items/sites/change-pages takes id; POST /v1/operator/items/sites/set takes id and domains, a list, empty to clear; POST /v1/operator/items/sites/change takes id and add, remove or add-related, as the flags do. Desktop shows it as the Sites editor in a login's inspector, with Add sites sharing this sign-in and Find the sites' own pages, and as Offer it on <host> under Logins for a site.
Refusals#
- A missing id exits 2 with the usage, and more than one of --set, --add, --remove, --add-related and --change-pages with `name one of --set, --add, --remove, --add-related or --change-pages`. A domain that is not a bare host (an address, a port, upper case or a space) exits 2 with `--<flag> <domain> is not a bare host; name it as <host>`. --remove naming a site the login is not offered on is refused with `<id> is not offered on <domain>; its sites are: <domains>`. --add-related and --change-pages refuse a login naming no site; --add-related refuses a login whose sites share a sign-in with none with `Password Manager Resources lists no site sharing a sign-in with <sites>; nothing was added to <id>`, and either refuses a list that cannot be reached with curl's reason. An item that is not a login is refused with `<id> is a <kind> item; only a login is offered on sites`, an item a lifecycle controls is refused as every owner write is, and an item that will not open fails with its decryption error.