{"id":328871,"date":"2022-01-31T15:01:19","date_gmt":"2022-01-31T15:01:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328871"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328871","title":{"rendered":"<span>\u041e\u0441\u043d\u043e\u0432\u044b WebAuthn\/FIDO2 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u044b<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0430\u043c WebAuthn API \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437. <\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 FIDO2 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u043e\u044e \u0441\u0442\u0430\u0442\u044c: <a href=\"https:\/\/habr.com\/ru\/post\/354638\/\" rel=\"noopener noreferrer nofollow\">&#171;FIDO2 \u2014 \u041f\u0430\u0440\u043e\u043b\u0438 must die&#187;<\/a><\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043c \u044d\u0442\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \/ Attestation &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0432\u0435\u0436\u0435\u0438\u0441\u043f\u0435\u0447\u0435\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c, \u0438 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \/ Assertion &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c, \u0447\u0435\u0439 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u043d\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a969abb378f6450d1be0\" data-style=\"\" id=\"61f6a969abb378f6450d1be0\" width=\"\"><\/div>\n<ul>\n<li>\n<p><strong>id\/rawId<\/strong> &#8212; \u042d\u0442\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. <strong>id<\/strong> \u044d\u0442\u043e base64url \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 <strong>rawId<\/strong>. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0431\u0430, <strong>id<\/strong> \u0438 <strong>rawId<\/strong> base64url \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0440\u0435-\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442. \u042d\u0442\u043e\u0442 <strong>id<\/strong> \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <strong>excludeCredentials<\/strong>, \u0442\u0430\u043a \u0438 \u0432 <strong>allowList<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>type<\/strong> &#8212; \u042d\u0442\u043e \u0442\u0438\u043f, \u043a\u043e\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <strong>\u201cpublic-key\u201d<\/strong>. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0438\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043d\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>response<\/strong> &#8212; \u042d\u0442\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c \u043e\u0442\u0432\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>response.clientDataJSON<\/strong> &#8212;  \u042d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0435\u0441\u0441\u0438\u0438. \u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u044f \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0434\u043e\u043c\u0435\u043d \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0432\u0438\u0434\u0435\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f <strong>origin<\/strong>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044f <strong>challenge<\/strong> \u0441 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c, \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u043b\u0438 \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0430 MITM \u0430\u0442\u0430\u043a\u0430. <strong>clientDataJSON<\/strong> \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0449\u0438\u0449\u0435\u043d, \u0442\u0430\u043a \u0447\u0442\u043e \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0438\u0439 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0435\u0441\u0441\u0438\u0438, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0444\u0438\u0448\u0438\u043d\u0433 \u0430\u0442\u0430\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f base64url \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u201c<a href=\"https:\/\/www.npmjs.com\/package\/base64url\" rel=\"noopener noreferrer nofollow\">base64url<\/a>\u201d \u0432 npm.<\/p>\n<\/li>\n<\/ul>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a984abb378f6450d1be1\" data-style=\"\" id=\"61f6a984abb378f6450d1be1\" width=\"\"><\/div>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a98b122cc8f6386969a4\" data-style=\"\" id=\"61f6a98b122cc8f6386969a4\" width=\"\"><\/div>\n<ul>\n<li>\n<p><strong>type<\/strong> &#8212; \u0422\u0438\u043f \u043e\u0442\u0432\u0435\u0442\u0430. <strong>webauthn.create<\/strong> \u0434\u043b\u044f \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u0438, \u0438 <strong>webauthn.get<\/strong> \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>challenge<\/strong> &#8212; Base64url \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432(challenge) \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0437\u043e\u0432\u0430 navigator.credentials.create\/get.<\/p>\n<\/li>\n<li>\n<p><strong>origin<\/strong> &#8212; \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b + \u0434\u043e\u043c\u0435\u043d \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0432\u044b\u0437\u043e\u0432 WebAuthn API. \u0422\u0430\u043a \u0436\u0435 \u0432 \u0441\u0435\u0431\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u043e\u0440\u0442 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439. <strong>origin<\/strong> \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0444\u0438\u0448\u0438\u043d\u0433 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043b\u044e\u0431\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0444\u0438\u0448\u0438\u043d\u0433 \u0430\u0442\u0430\u043a\u0430. \u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 WebAuthn API \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 W3C WebAppSec, \u201c\u043b\u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0439 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u044b\u201d. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u0440\u043e\u0433\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 origin, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f. <a href=\"https:\/\/example.com\" rel=\"noopener noreferrer nofollow\">https:\/\/example.com<\/a> \u043d\u0435 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0447\u0442\u043e <a href=\"https:\/\/example.com:8181\" rel=\"noopener noreferrer nofollow\">https:\/\/example.com:8181<\/a>. \u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>crossOrigin<\/strong> &#8212; \u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435, \u0434\u0430\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0442\u044c \u0438\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u0431\u044b\u043b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d \u0447\u0435\u0440\u0435\u0437 iframe. \u0418\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u0432\u0438\u0434\u0443 \u0447\u0442\u043e ClientDataJSON \u043c\u043e\u0436\u0435\u0442 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0438\u0448\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<p><strong>response<\/strong> \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432: \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439.<\/p>\n<ul>\n<li>\n<p>\u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0447\u0435\u0442 \u0437\u0430\u0439\u0442\u0438 \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \/ Attestation result<\/h2>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a99dedd610f626b80e8a\" data-style=\"\" id=\"61f6a99dedd610f626b80e8a\" width=\"\"><\/div>\n<p>\u0423 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 <strong>response.attestationObject<\/strong> &#8212; \u044d\u0442\u043e CBOR \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u0414\u043b\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f base64url \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u201c<a href=\"https:\/\/www.npmjs.com\/package\/base64url\" rel=\"noopener noreferrer nofollow\">base64url<\/a>\u201d \u0432 npm. \u0414\u043b\u044f CBOR \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u201c<a href=\"https:\/\/www.npmjs.com\/package\/cbor\" rel=\"noopener noreferrer nofollow\">node-cbor<\/a>\u201d.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a9a94615593b75e24856\" data-style=\"\" id=\"61f6a9a94615593b75e24856\" width=\"\"><\/div>\n<p>\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0432 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a9b5abb378f6450d1be2\" data-style=\"\" id=\"61f6a9b5abb378f6450d1be2\" width=\"\"><\/div>\n<ul>\n<li>\n<p><strong>fmt<\/strong> &#8212; \u0424\u043e\u0440\u043c\u0430\u0442 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u0438. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0435\u0441\u0442\u044c \u0441\u0435\u043c\u044c \u0432\u0438\u0434\u043e\u0432 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u0438: \u201c<strong>packed<\/strong>\u201d, \u201c<strong>fido-u2f<\/strong>\u201d, \u201c<strong>none<\/strong>\u201d, \u201c<strong>android-key<\/strong>\u201d, \u201c<strong>android-safetynet<\/strong>\u201d, \u201c<strong>tpm<\/strong>\u201d \u0438 \u201c<strong>apple<\/strong>\u201d.<\/p>\n<\/li>\n<li>\n<p><strong>attStmt<\/strong> &#8212; \u041e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0430\u043c\u0443 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044e. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0443\u0441\u0442\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>authData<\/strong> &#8212; \u0411\u0443\u0444\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u043e\u0432\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0438\u0445 \u044f \u0442\u043e\u0436\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0443:<\/p>\n<ul>\n<li>\n<p>Packed:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido2-packed-attestation-a067a9b2facd\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido2-packed-attestation-a067a9b2facd<\/a><\/p>\n<\/li>\n<li>\n<p>FIDO-U2F:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido-u2f-attestations-in-fido2-f83fab80c355\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido-u2f-attestations-in-fido2-f83fab80c355<\/a><\/p>\n<\/li>\n<li>\n<p>Android Keystore:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-android-keystore-attestation-4a8835b33e9d\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-android-keystore-attestation-4a8835b33e9d<\/a><\/p>\n<\/li>\n<li>\n<p>Android SafetyNet:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido2-safetynet-attestation-bd261ce1978d\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido2-safetynet-attestation-bd261ce1978d<\/a><\/p>\n<\/li>\n<li>\n<p>TPM:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido-tpm2-0-attestation-fc7243847498\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido-tpm2-0-attestation-fc7243847498<\/a><\/p>\n<\/li>\n<li>\n<p>Apple Anonymous Attestation:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-apple-anonymous-attestation-5eaff334c849\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-apple-anonymous-attestation-5eaff334c849<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u043d\u0443\u0436\u043d\u0430. \u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0439  \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0431\u0430\u043d\u043a\u0430\u043c, \u0433\u043e\u0441 \u0443\u0441\u043b\u0443\u0433\u0430\u043c \u0438 \u0442.\u0434. WebAuthn API \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044e \u0447\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u043d\u0430\u043c \u0436\u0438\u0437\u043d\u044c. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0437\u0430\u0447\u0435\u043c \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u0438 \u043a\u0430\u043a \u0435\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u043e\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c &#171;<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651\" rel=\"noopener noreferrer nofollow\">Demystifying attestation and MDS<\/a>\u201d.<\/p>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a <strong>authData<\/strong>. <strong>AuthData<\/strong> \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043b\u0435\u0435\u043d\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" height=\"398\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/daf\/e3c\/ebc\/dafe3cebcb7babf1c3100f6c7f642ef9.png\" data-width=\"786\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0443\u0442 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><strong>RPID hash<\/strong> &#8212; \u042d\u0442\u043e 32\u0445 \u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 SHA256 \u0445\u0435\u0448 RPID<\/p>\n<\/li>\n<li>\n<p><strong>Flags<\/strong> &#8212; \u042d\u0442\u043e \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0438\u0442\u043d\u044b\u0439 \u0431\u0438\u0442\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0438. \u041d\u0443\u043b\u0435\u0432\u043e\u0439 \u0431\u0438\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>UP<\/strong>. \u0412\u0442\u043e\u0440\u043e\u0439 \u0431\u0438\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>UV<\/strong>. \u0428\u0435\u0441\u0442\u043e\u0439(<strong>AT<\/strong>) \u0438 \u0441\u0435\u0434\u044c\u043c\u043e\u0439(<strong>ED<\/strong>) \u0431\u0438\u0442\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>Counter<\/strong> &#8212; uint32 \u0441\u0447\u0435\u0442\u0447\u0438\u043a. \u042d\u0442\u043e\u0442 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u0430\u0442\u0430\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u043c. \u0421\u0435\u0440\u0432\u0435\u0440 \u0445\u0440\u0430\u043d\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430, \u0438 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u0430\u0442\u0430\u043a\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u0435\u0448 RPID, \u0444\u043b\u0430\u0433\u0438, \u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u0434\u043b\u044f \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432. \u0412 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u0435\u0449\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u043e\u0432\u0430\u044f \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, Attested Credential Data, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0448\u0435\u0441\u0442\u043e\u0439 \u0431\u0438\u0442 \u0432 \u0444\u043b\u0430\u0433\u0430\u0445 AT \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0438\u043b\u0438 1.<\/p>\n<ul>\n<li>\n<p><strong>AAGUID<\/strong> &#8212; \u042d\u0442\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0412\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 AAGUID. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044e, \u0442\u043e AAGUID \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 GUID, \u0438\u043b\u0438 00000000-0000-0000-0000-000000000000. \u0421\u0430\u043c \u0436\u0435 AAGUID \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>CredId length<\/strong> &#8212; uint16 \u0434\u043b\u0438\u043d\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, credId.<\/p>\n<\/li>\n<li>\n<p><strong>COSE Public Key<\/strong> &#8212; \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc8152\" rel=\"noopener noreferrer nofollow\">COSE<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 AuthData \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0440\u0435\u0437\u043a\u043e\u0439 \u0431\u0443\u0444\u0435\u0440\u0430:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a9ccf61f533babdf3082\" data-style=\"\" id=\"61f6a9ccf61f533babdf3082\" width=\"\"><\/div>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e \u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432 WebAuthn\/FIDO2<\/h2>\n<p>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 WebAuthn\/FIDO2 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u043d\u044f\u0442\u0438\u044f: origin \u0438 rpid, \u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p><strong>RPID<\/strong> \u0436\u0435 \u044d\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u043c\u0435\u043d \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f: \u201c<a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\">example.com<\/a>\u201d. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u0442 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0443 \u0441\u0435\u0431\u044f \u043f\u0430\u0440\u043e\u0439: id + \u0445\u0435\u0448 RPID. \u042d\u0442\u043e \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0442 \u043d\u0435\u0441\u0430\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432. <a href=\"http:\/\/pupkin.com\" rel=\"noopener noreferrer nofollow\">pupkin.com<\/a> \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 <a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\">example.com<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u0436\u0435 \u0437\u043d\u0430\u044f id, \u0445\u0435\u0448 RPID \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u0442.<\/p>\n<p><strong>Origin<\/strong> \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e URL \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0434\u0438\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u201c<a href=\"https:\/\/example.com\" rel=\"noopener noreferrer nofollow\">https:\/\/example.com<\/a>\u201d, \u043d\u043e \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0443\u0442\u0435\u043c. \u0415\u0449\u0435 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0440\u0442 \u0435\u0441\u043b\u0438 \u0442\u043e\u0442 \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 80 \u0438\u043b\u0438 443. <strong>Origin<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u0444\u0438\u0448\u0438\u043d\u0433\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u043b\u0438 <strong>origin<\/strong> \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0441\u0442\u0440\u043e\u0433\u0438\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 \u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u0444\u0438\u0448\u0438\u043d\u0433 \u0430\u0442\u0430\u043a\u0430.<\/p>\n<p>\u0414\u043e\u043c\u0435\u043d \u0432 <strong>origin<\/strong> \u0438 <strong>RPID<\/strong> \u043c\u043e\u0433\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0447\u0435\u0442 \u0437\u0430\u0439\u0442\u0438 \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442: <a href=\"http:\/\/auth.example.com\" rel=\"noopener noreferrer nofollow\"><strong>auth.example.com<\/strong><\/a><strong>,<\/strong> \u043f\u043e\u0442\u043e\u043c \u0441\u0442\u0430\u043d\u0435\u0442 <a href=\"http:\/\/login.example.com\" rel=\"noopener noreferrer nofollow\"><strong>login.example.com<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0435\u0437\u0436\u0430\u0435\u0442 \u043d\u0430 <a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a>. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0435\u0441\u0442\u044c <strong>RPID<\/strong>. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>RPID<\/strong> \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435: <a href=\"https:\/\/login.example.com\" rel=\"noopener noreferrer nofollow\"><strong>https:\/\/login.example.com<\/strong><\/a> \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c <strong>RPID <\/strong><a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a><strong>.<\/strong> \u042d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430. \u0420\u0435\u0431\u0435\u043d\u043e\u043a \u0432\u044b\u0448\u0435. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d <a href=\"http:\/\/login.example.com\" rel=\"noopener noreferrer nofollow\"><strong>login.example.com<\/strong><\/a> \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c <a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a><strong>,<\/strong> \u043d\u043e \u043d\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043b\u043e\u0433\u0438\u043d\u0430, \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 WebAuthn API \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 <strong>RPID \u201c<\/strong><a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a><strong>\u201d<\/strong> \u0438 \u0442\u0430\u043a\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0443 \u0441\u0435\u0431\u044f \u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0430\u0434\u0440\u0435\u0441 <strong>\u201c<\/strong><a href=\"https:\/\/login.example.com\" rel=\"noopener noreferrer nofollow\"><strong>https:\/\/login.example.com<\/strong><\/a><strong>\u201d<\/strong> \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441 <strong>\u201c<\/strong><a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a><strong>\u201d.<\/strong> \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u043e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e.<\/p>\n<h2>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \/ Assertion result<\/h2>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6aa11ad041b3b9bfdc930\" data-style=\"\" id=\"61f6aa11ad041b3b9bfdc930\" width=\"\"><\/div>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u044d\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 <strong>attestationObject<\/strong>, \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p><strong>AuthenticatorData<\/strong> &#8212; \u042d\u0442\u043e \u0442\u043e\u0442 \u0436\u0435 attestationObject.authData, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0437 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u043e\u0432\u043e\u0439 \u0443\u0447\u0435\u0442\u043a\u0435<\/p>\n<\/li>\n<li>\n<p><strong>Signature<\/strong> &#8212; \u041f\u043e\u0434\u043f\u0438\u0441\u044c<\/p>\n<\/li>\n<li>\n<p><strong>UserHandle<\/strong> &#8212; \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c <a href=\"http:\/\/user.id\" rel=\"noopener noreferrer nofollow\">user.id<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:<\/h4>\n<ol>\n<li>\n<p>\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c ClientDataJSON<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u043e\u0432, challenge, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 \u0442\u0435\u043c \u0447\u0442\u043e \u043c\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0442\u043e \u044d\u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u044b\u043b\u0430 MITM \u0430\u0442\u0430\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b origin \u0431\u044b\u043b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0442\u043e \u043c\u044b \u0441\u043b\u043e\u0432\u0438\u043b\u0438 \u0444\u0438\u0448\u0438\u043d\u0433 \u0430\u0442\u0430\u043a\u0443!<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b ClientDataJSON \u0442\u0438\u043f \u0431\u044b\u043b \u201c<strong>webauthn.create<\/strong>\u201d \u0438\u043b\u0438 \u201c<strong>webauthn.get<\/strong>\u201d<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043c <strong>attestationObject<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c <strong>attestationObject.authData<\/strong> \u0438\u043b\u0438 <strong>authenticatorData<\/strong>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b UP \u0438 UV \u0431\u0438\u0442 \u0444\u043b\u0430\u0433\u0438 \u0431\u044b\u043b\u044b \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438. \u0415\u0441\u043b\u0438 UV \u043d\u0438\u0437\u043a\u0438\u0439, \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u043a\u0442\u043e\u0440(\u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c) \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0443\u0436\u0435\u043d \u0435\u0449\u0435 \u0438 \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0440\u0435\u043c RPID \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438. \u0415\u0441\u043b\u0438 <a href=\"http:\/\/rp.id\" rel=\"noopener noreferrer nofollow\">rp.id<\/a> \u043d\u0435 \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0430\u0448 RPID \u044d\u0442\u043e \u0432\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430: <a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\">example.com<\/a>. \u0425\u0435\u0448\u0438\u0440\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SHA256 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b \u0445\u0435\u0448 RPID \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 authData.RPIDHash.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e webauthn.create:<\/h4>\n<ol>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442, <strong>fmt<\/strong>, \u0443 \u043d\u0430\u0441 \u201cnone\u201d, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u043c\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044e, \u0442\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0435\u0451 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443:<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>Packed:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido2-packed-attestation-a067a9b2facd\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido2-packed-attestation-a067a9b2facd<\/a><\/p>\n<\/li>\n<li>\n<p>FIDO-U2F:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido-u2f-attestations-in-fido2-f83fab80c355\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido-u2f-attestations-in-fido2-f83fab80c355<\/a><\/p>\n<\/li>\n<li>\n<p>Android Keystore:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-android-keystore-attestation-4a8835b33e9d\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-android-keystore-attestation-4a8835b33e9d<\/a><\/p>\n<\/li>\n<li>\n<p>Android SafetyNet:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido2-safetynet-attestation-bd261ce1978d\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido2-safetynet-attestation-bd261ce1978d<\/a><\/p>\n<\/li>\n<li>\n<p>TPM:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido-tpm2-0-attestation-fc7243847498\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido-tpm2-0-attestation-fc7243847498<\/a><\/p>\n<\/li>\n<li>\n<p>Apple Anonymous Attestation:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-apple-anonymous-attestation-5eaff334c849\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-apple-anonymous-attestation-5eaff334c849<\/a><\/p>\n<\/li>\n<\/ul>\n<h4>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e webauthn.get<\/h4>\n<ul>\n<li>\n<p>\u0425\u0435\u0448\u0438\u0440\u0443\u0435\u043c ClientDataJSON \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SHA256<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u0435\u043c authData\/authenticatorData \u0441 \u0445\u0435\u0448\u0435\u043c clientDataJSON \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u044c<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a: \u0435\u0441\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0431\u044b\u043b\u043e \u043d\u043e\u043b\u044c, \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u0442\u043e\u0436\u0435 \u043d\u043e\u043b\u044c, \u0437\u043d\u0430\u0447\u0438\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0447\u0435\u0442\u0447\u0438\u043a, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043d\u043e\u043b\u044c, \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043d\u0435 \u043d\u043e\u043b\u044c, \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/h2>\n<ul>\n<li>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u043e WebAuthn API \u0438 FIDO2 &#8212; <a href=\"https:\/\/github.com\/herrjemand\/awesome-webauthn\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/herrjemand\/awesome-webauthn<\/a><\/p>\n<\/li>\n<li>\n<p>WebAuthn API \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f &#8212; <a href=\"https:\/\/w3c.github.io\/webauthn\/\" rel=\"noopener noreferrer nofollow\">https:\/\/w3c.github.io\/webauthn\/<\/a><\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 COSE  &#8212; <a href=\"https:\/\/github.com\/WebauthnWorks\/webauthn-cose\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/WebauthnWorks\/webauthn-cose<\/a><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e API \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e FIDO Alliance &#8212; <a href=\"https:\/\/github.com\/fido-alliance\/conformance-test-tools-resources\/blob\/master\/docs\/FIDO2\/Server\/Conformance-Test-API.md\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/fido-alliance\/conformance-test-tools-resources\/blob\/master\/docs\/FIDO2\/Server\/Conformance-Test-API.md<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/648745\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0420\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043b\u0438 \u0432\u044b \u0441 WebAuthn API?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0414\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             100%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 WebAuthn API?<\/span> <span class=\"tm-article-poll__answer-votes\">             1           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:100%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.          \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.      <\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/648745\/\"> https:\/\/habr.com\/ru\/post\/648745\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0430\u043c WebAuthn API \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437. <\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 FIDO2 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u043e\u044e \u0441\u0442\u0430\u0442\u044c: <a href=\"https:\/\/habr.com\/ru\/post\/354638\/\" rel=\"noopener noreferrer nofollow\">&#171;FIDO2 \u2014 \u041f\u0430\u0440\u043e\u043b\u0438 must die&#187;<\/a><\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043c \u044d\u0442\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \/ Attestation &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0432\u0435\u0436\u0435\u0438\u0441\u043f\u0435\u0447\u0435\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c, \u0438 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \/ Assertion &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c, \u0447\u0435\u0439 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u043d\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a969abb378f6450d1be0\" data-style=\"\" id=\"61f6a969abb378f6450d1be0\" width=\"\"><\/div>\n<ul>\n<li>\n<p><strong>id\/rawId<\/strong> &#8212; \u042d\u0442\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. <strong>id<\/strong> \u044d\u0442\u043e base64url \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 <strong>rawId<\/strong>. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0431\u0430, <strong>id<\/strong> \u0438 <strong>rawId<\/strong> base64url \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0440\u0435-\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442. \u042d\u0442\u043e\u0442 <strong>id<\/strong> \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <strong>excludeCredentials<\/strong>, \u0442\u0430\u043a \u0438 \u0432 <strong>allowList<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>type<\/strong> &#8212; \u042d\u0442\u043e \u0442\u0438\u043f, \u043a\u043e\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <strong>\u201cpublic-key\u201d<\/strong>. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0438\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043d\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>response<\/strong> &#8212; \u042d\u0442\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c \u043e\u0442\u0432\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>response.clientDataJSON<\/strong> &#8212;  \u042d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0435\u0441\u0441\u0438\u0438. \u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u044f \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0434\u043e\u043c\u0435\u043d \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0432\u0438\u0434\u0435\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f <strong>origin<\/strong>. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044f <strong>challenge<\/strong> \u0441 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c, \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u043b\u0438 \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0430 MITM \u0430\u0442\u0430\u043a\u0430. <strong>clientDataJSON<\/strong> \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0449\u0438\u0449\u0435\u043d, \u0442\u0430\u043a \u0447\u0442\u043e \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0438\u0439 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0435\u0441\u0441\u0438\u0438, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0444\u0438\u0448\u0438\u043d\u0433 \u0430\u0442\u0430\u043a\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f base64url \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u201c<a href=\"https:\/\/www.npmjs.com\/package\/base64url\" rel=\"noopener noreferrer nofollow\">base64url<\/a>\u201d \u0432 npm.<\/p>\n<\/li>\n<\/ul>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a984abb378f6450d1be1\" data-style=\"\" id=\"61f6a984abb378f6450d1be1\" width=\"\"><\/div>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a98b122cc8f6386969a4\" data-style=\"\" id=\"61f6a98b122cc8f6386969a4\" width=\"\"><\/div>\n<ul>\n<li>\n<p><strong>type<\/strong> &#8212; \u0422\u0438\u043f \u043e\u0442\u0432\u0435\u0442\u0430. <strong>webauthn.create<\/strong> \u0434\u043b\u044f \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u0438, \u0438 <strong>webauthn.get<\/strong> \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>challenge<\/strong> &#8212; Base64url \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432(challenge) \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0437\u043e\u0432\u0430 navigator.credentials.create\/get.<\/p>\n<\/li>\n<li>\n<p><strong>origin<\/strong> &#8212; \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b + \u0434\u043e\u043c\u0435\u043d \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0432\u044b\u0437\u043e\u0432 WebAuthn API. \u0422\u0430\u043a \u0436\u0435 \u0432 \u0441\u0435\u0431\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u043e\u0440\u0442 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439. <strong>origin<\/strong> \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0444\u0438\u0448\u0438\u043d\u0433 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043b\u044e\u0431\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0444\u0438\u0448\u0438\u043d\u0433 \u0430\u0442\u0430\u043a\u0430. \u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 WebAuthn API \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 W3C WebAppSec, \u201c\u043b\u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0439 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u044b\u201d. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u0440\u043e\u0433\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 origin, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f. <a href=\"https:\/\/example.com\" rel=\"noopener noreferrer nofollow\">https:\/\/example.com<\/a> \u043d\u0435 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0447\u0442\u043e <a href=\"https:\/\/example.com:8181\" rel=\"noopener noreferrer nofollow\">https:\/\/example.com:8181<\/a>. \u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>crossOrigin<\/strong> &#8212; \u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435, \u0434\u0430\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0442\u044c \u0438\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u0431\u044b\u043b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d \u0447\u0435\u0440\u0435\u0437 iframe. \u0418\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u0432\u0438\u0434\u0443 \u0447\u0442\u043e ClientDataJSON \u043c\u043e\u0436\u0435\u0442 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0438\u0448\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<p><strong>response<\/strong> \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432: \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439.<\/p>\n<ul>\n<li>\n<p>\u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0447\u0435\u0442 \u0437\u0430\u0439\u0442\u0438 \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \/ Attestation result<\/h2>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a99dedd610f626b80e8a\" data-style=\"\" id=\"61f6a99dedd610f626b80e8a\" width=\"\"><\/div>\n<p>\u0423 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 <strong>response.attestationObject<\/strong> &#8212; \u044d\u0442\u043e CBOR \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u0414\u043b\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f base64url \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u201c<a href=\"https:\/\/www.npmjs.com\/package\/base64url\" rel=\"noopener noreferrer nofollow\">base64url<\/a>\u201d \u0432 npm. \u0414\u043b\u044f CBOR \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u201c<a href=\"https:\/\/www.npmjs.com\/package\/cbor\" rel=\"noopener noreferrer nofollow\">node-cbor<\/a>\u201d.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a9a94615593b75e24856\" data-style=\"\" id=\"61f6a9a94615593b75e24856\" width=\"\"><\/div>\n<p>\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0432 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a9b5abb378f6450d1be2\" data-style=\"\" id=\"61f6a9b5abb378f6450d1be2\" width=\"\"><\/div>\n<ul>\n<li>\n<p><strong>fmt<\/strong> &#8212; \u0424\u043e\u0440\u043c\u0430\u0442 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u0438. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0435\u0441\u0442\u044c \u0441\u0435\u043c\u044c \u0432\u0438\u0434\u043e\u0432 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u0438: \u201c<strong>packed<\/strong>\u201d, \u201c<strong>fido-u2f<\/strong>\u201d, \u201c<strong>none<\/strong>\u201d, \u201c<strong>android-key<\/strong>\u201d, \u201c<strong>android-safetynet<\/strong>\u201d, \u201c<strong>tpm<\/strong>\u201d \u0438 \u201c<strong>apple<\/strong>\u201d.<\/p>\n<\/li>\n<li>\n<p><strong>attStmt<\/strong> &#8212; \u041e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0430\u043c\u0443 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044e. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0443\u0441\u0442\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>authData<\/strong> &#8212; \u0411\u0443\u0444\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u043e\u0432\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0438\u0445 \u044f \u0442\u043e\u0436\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0443:<\/p>\n<ul>\n<li>\n<p>Packed:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido2-packed-attestation-a067a9b2facd\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido2-packed-attestation-a067a9b2facd<\/a><\/p>\n<\/li>\n<li>\n<p>FIDO-U2F:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido-u2f-attestations-in-fido2-f83fab80c355\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido-u2f-attestations-in-fido2-f83fab80c355<\/a><\/p>\n<\/li>\n<li>\n<p>Android Keystore:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-android-keystore-attestation-4a8835b33e9d\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-android-keystore-attestation-4a8835b33e9d<\/a><\/p>\n<\/li>\n<li>\n<p>Android SafetyNet:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido2-safetynet-attestation-bd261ce1978d\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido2-safetynet-attestation-bd261ce1978d<\/a><\/p>\n<\/li>\n<li>\n<p>TPM:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido-tpm2-0-attestation-fc7243847498\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido-tpm2-0-attestation-fc7243847498<\/a><\/p>\n<\/li>\n<li>\n<p>Apple Anonymous Attestation:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-apple-anonymous-attestation-5eaff334c849\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-apple-anonymous-attestation-5eaff334c849<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u043d\u0443\u0436\u043d\u0430. \u0410\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0439  \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0431\u0430\u043d\u043a\u0430\u043c, \u0433\u043e\u0441 \u0443\u0441\u043b\u0443\u0433\u0430\u043c \u0438 \u0442.\u0434. WebAuthn API \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044e \u0447\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u043d\u0430\u043c \u0436\u0438\u0437\u043d\u044c. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0437\u0430\u0447\u0435\u043c \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044f \u0438 \u043a\u0430\u043a \u0435\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u043e\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c &#171;<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651\" rel=\"noopener noreferrer nofollow\">Demystifying attestation and MDS<\/a>\u201d.<\/p>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a <strong>authData<\/strong>. <strong>AuthData<\/strong> \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043b\u0435\u0435\u043d\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0443\u0442 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><strong>RPID hash<\/strong> &#8212; \u042d\u0442\u043e 32\u0445 \u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 SHA256 \u0445\u0435\u0448 RPID<\/p>\n<\/li>\n<li>\n<p><strong>Flags<\/strong> &#8212; \u042d\u0442\u043e \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0438\u0442\u043d\u044b\u0439 \u0431\u0438\u0442\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0438. \u041d\u0443\u043b\u0435\u0432\u043e\u0439 \u0431\u0438\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>UP<\/strong>. \u0412\u0442\u043e\u0440\u043e\u0439 \u0431\u0438\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>UV<\/strong>. \u0428\u0435\u0441\u0442\u043e\u0439(<strong>AT<\/strong>) \u0438 \u0441\u0435\u0434\u044c\u043c\u043e\u0439(<strong>ED<\/strong>) \u0431\u0438\u0442\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>Counter<\/strong> &#8212; uint32 \u0441\u0447\u0435\u0442\u0447\u0438\u043a. \u042d\u0442\u043e\u0442 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u0430\u0442\u0430\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u043c. \u0421\u0435\u0440\u0432\u0435\u0440 \u0445\u0440\u0430\u043d\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430, \u0438 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u0430\u0442\u0430\u043a\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u0435\u0448 RPID, \u0444\u043b\u0430\u0433\u0438, \u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u0434\u043b\u044f \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432. \u0412 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u0435\u0449\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u043e\u0432\u0430\u044f \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, Attested Credential Data, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0448\u0435\u0441\u0442\u043e\u0439 \u0431\u0438\u0442 \u0432 \u0444\u043b\u0430\u0433\u0430\u0445 AT \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0438\u043b\u0438 1.<\/p>\n<ul>\n<li>\n<p><strong>AAGUID<\/strong> &#8212; \u042d\u0442\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0412\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 AAGUID. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044e, \u0442\u043e AAGUID \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 GUID, \u0438\u043b\u0438 00000000-0000-0000-0000-000000000000. \u0421\u0430\u043c \u0436\u0435 AAGUID \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>CredId length<\/strong> &#8212; uint16 \u0434\u043b\u0438\u043d\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, credId.<\/p>\n<\/li>\n<li>\n<p><strong>COSE Public Key<\/strong> &#8212; \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc8152\" rel=\"noopener noreferrer nofollow\">COSE<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 AuthData \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0440\u0435\u0437\u043a\u043e\u0439 \u0431\u0443\u0444\u0435\u0440\u0430:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6a9ccf61f533babdf3082\" data-style=\"\" id=\"61f6a9ccf61f533babdf3082\" width=\"\"><\/div>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e \u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432 WebAuthn\/FIDO2<\/h2>\n<p>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 WebAuthn\/FIDO2 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u043d\u044f\u0442\u0438\u044f: origin \u0438 rpid, \u0438\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p><strong>RPID<\/strong> \u0436\u0435 \u044d\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u043c\u0435\u043d \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f: \u201c<a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\">example.com<\/a>\u201d. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u0442 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0443 \u0441\u0435\u0431\u044f \u043f\u0430\u0440\u043e\u0439: id + \u0445\u0435\u0448 RPID. \u042d\u0442\u043e \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u0442 \u043d\u0435\u0441\u0430\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432. <a href=\"http:\/\/pupkin.com\" rel=\"noopener noreferrer nofollow\">pupkin.com<\/a> \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 <a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\">example.com<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u0436\u0435 \u0437\u043d\u0430\u044f id, \u0445\u0435\u0448 RPID \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u0442.<\/p>\n<p><strong>Origin<\/strong> \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e URL \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0434\u0438\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u201c<a href=\"https:\/\/example.com\" rel=\"noopener noreferrer nofollow\">https:\/\/example.com<\/a>\u201d, \u043d\u043e \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0443\u0442\u0435\u043c. \u0415\u0449\u0435 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0440\u0442 \u0435\u0441\u043b\u0438 \u0442\u043e\u0442 \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 80 \u0438\u043b\u0438 443. <strong>Origin<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u0444\u0438\u0448\u0438\u043d\u0433\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u043b\u0438 <strong>origin<\/strong> \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0441\u0442\u0440\u043e\u0433\u0438\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 \u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u0444\u0438\u0448\u0438\u043d\u0433 \u0430\u0442\u0430\u043a\u0430.<\/p>\n<p>\u0414\u043e\u043c\u0435\u043d \u0432 <strong>origin<\/strong> \u0438 <strong>RPID<\/strong> \u043c\u043e\u0433\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0447\u0435\u0442 \u0437\u0430\u0439\u0442\u0438 \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442: <a href=\"http:\/\/auth.example.com\" rel=\"noopener noreferrer nofollow\"><strong>auth.example.com<\/strong><\/a><strong>,<\/strong> \u043f\u043e\u0442\u043e\u043c \u0441\u0442\u0430\u043d\u0435\u0442 <a href=\"http:\/\/login.example.com\" rel=\"noopener noreferrer nofollow\"><strong>login.example.com<\/strong><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0435\u0437\u0436\u0430\u0435\u0442 \u043d\u0430 <a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a>. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0435\u0441\u0442\u044c <strong>RPID<\/strong>. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>RPID<\/strong> \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435: <a href=\"https:\/\/login.example.com\" rel=\"noopener noreferrer nofollow\"><strong>https:\/\/login.example.com<\/strong><\/a> \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c <strong>RPID <\/strong><a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a><strong>.<\/strong> \u042d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430. \u0420\u0435\u0431\u0435\u043d\u043e\u043a \u0432\u044b\u0448\u0435. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d <a href=\"http:\/\/login.example.com\" rel=\"noopener noreferrer nofollow\"><strong>login.example.com<\/strong><\/a> \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c <a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a><strong>,<\/strong> \u043d\u043e \u043d\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043b\u043e\u0433\u0438\u043d\u0430, \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 WebAuthn API \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 <strong>RPID \u201c<\/strong><a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a><strong>\u201d<\/strong> \u0438 \u0442\u0430\u043a\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0443 \u0441\u0435\u0431\u044f \u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0430\u0434\u0440\u0435\u0441 <strong>\u201c<\/strong><a href=\"https:\/\/login.example.com\" rel=\"noopener noreferrer nofollow\"><strong>https:\/\/login.example.com<\/strong><\/a><strong>\u201d<\/strong> \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441 <strong>\u201c<\/strong><a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\"><strong>example.com<\/strong><\/a><strong>\u201d.<\/strong> \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u043e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e.<\/p>\n<h2>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \/ Assertion result<\/h2>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/61f6aa11ad041b3b9bfdc930\" data-style=\"\" id=\"61f6aa11ad041b3b9bfdc930\" width=\"\"><\/div>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u044d\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 <strong>attestationObject<\/strong>, \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p><strong>AuthenticatorData<\/strong> &#8212; \u042d\u0442\u043e \u0442\u043e\u0442 \u0436\u0435 attestationObject.authData, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0437 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u043e\u0432\u043e\u0439 \u0443\u0447\u0435\u0442\u043a\u0435<\/p>\n<\/li>\n<li>\n<p><strong>Signature<\/strong> &#8212; \u041f\u043e\u0434\u043f\u0438\u0441\u044c<\/p>\n<\/li>\n<li>\n<p><strong>UserHandle<\/strong> &#8212; \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c <a href=\"http:\/\/user.id\" rel=\"noopener noreferrer nofollow\">user.id<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:<\/h4>\n<ol>\n<li>\n<p>\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c ClientDataJSON<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u043e\u0432, challenge, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 \u0442\u0435\u043c \u0447\u0442\u043e \u043c\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0442\u043e \u044d\u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u044b\u043b\u0430 MITM \u0430\u0442\u0430\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b origin \u0431\u044b\u043b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0442\u043e \u043c\u044b \u0441\u043b\u043e\u0432\u0438\u043b\u0438 \u0444\u0438\u0448\u0438\u043d\u0433 \u0430\u0442\u0430\u043a\u0443!<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b ClientDataJSON \u0442\u0438\u043f \u0431\u044b\u043b \u201c<strong>webauthn.create<\/strong>\u201d \u0438\u043b\u0438 \u201c<strong>webauthn.get<\/strong>\u201d<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043c <strong>attestationObject<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c <strong>attestationObject.authData<\/strong> \u0438\u043b\u0438 <strong>authenticatorData<\/strong>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b UP \u0438 UV \u0431\u0438\u0442 \u0444\u043b\u0430\u0433\u0438 \u0431\u044b\u043b\u044b \u0432\u044b\u0441\u043e\u043a\u0438\u043c\u0438. \u0415\u0441\u043b\u0438 UV \u043d\u0438\u0437\u043a\u0438\u0439, \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u043a\u0442\u043e\u0440(\u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c) \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0443\u0436\u0435\u043d \u0435\u0449\u0435 \u0438 \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0440\u0435\u043c RPID \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438. \u0415\u0441\u043b\u0438 <a href=\"http:\/\/rp.id\" rel=\"noopener noreferrer nofollow\">rp.id<\/a> \u043d\u0435 \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0430\u0448 RPID \u044d\u0442\u043e \u0432\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430: <a href=\"http:\/\/example.com\" rel=\"noopener noreferrer nofollow\">example.com<\/a>. \u0425\u0435\u0448\u0438\u0440\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SHA256 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e\u0431\u044b \u0445\u0435\u0448 RPID \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 authData.RPIDHash.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e webauthn.create:<\/h4>\n<ol>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442, <strong>fmt<\/strong>, \u0443 \u043d\u0430\u0441 \u201cnone\u201d, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u043c\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0430\u0442\u0442\u0435\u0441\u0442\u0430\u0446\u0438\u044e, \u0442\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0435\u0451 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443:<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>Packed:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido2-packed-attestation-a067a9b2facd\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido2-packed-attestation-a067a9b2facd<\/a><\/p>\n<\/li>\n<li>\n<p>FIDO-U2F:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido-u2f-attestations-in-fido2-f83fab80c355\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido-u2f-attestations-in-fido2-f83fab80c355<\/a><\/p>\n<\/li>\n<li>\n<p>Android Keystore:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-android-keystore-attestation-4a8835b33e9d\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-android-keystore-attestation-4a8835b33e9d<\/a><\/p>\n<\/li>\n<li>\n<p>Android SafetyNet:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido2-safetynet-attestation-bd261ce1978d\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido2-safetynet-attestation-bd261ce1978d<\/a><\/p>\n<\/li>\n<li>\n<p>TPM:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/verifying-fido-tpm2-0-attestation-fc7243847498\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/verifying-fido-tpm2-0-attestation-fc7243847498<\/a><\/p>\n<\/li>\n<li>\n<p>Apple Anonymous Attestation:\u00a0<a href=\"https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-apple-anonymous-attestation-5eaff334c849\" rel=\"noopener noreferrer nofollow\">https:\/\/medium.com\/webauthnworks\/webauthn-fido2-verifying-apple-<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-328871","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=328871"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328871\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}