"use strict";
var adace_load_686e2881a7e1e = function(){
var viewport = $(window).width();
var tabletStart = 601;
var landscapeStart = 801;
var tabletEnd = 961;
var content = '%3Cdiv%20class%3D%22adace_adsense_686e2881a7de9%20adace-hide-on-phone%20adace-hide-on-landscape%22%3E%3Cscript%20async%20src%3D%22%2F%2Fpagead2.googlesyndication.com%2Fpagead%2Fjs%2Fadsbygoogle.js%22%3E%3C%2Fscript%3E%0A%09%09%3Cins%20class%3D%22adsbygoogle%22%0A%09%09style%3D%22display%3Ablock%3B%22%0A%09%09data-ad-client%3D%22ca-pub-2933510995499028%22%0A%09%09data-ad-slot%3D%226037521357%22%0A%09%09data-ad-format%3D%22auto%22%0A%09%09%3E%3C%2Fins%3E%0A%09%09%3Cscript%3E%28adsbygoogle%20%3D%20window.adsbygoogle%20%7C%7C%20%5B%5D%29.push%28%7B%7D%29%3B%3C%2Fscript%3E%3C%2Fdiv%3E';
var unpack = true;
if(viewport=tabletStart && viewport=landscapeStart && viewport=tabletStart && viewport=tabletEnd){
if ($wrapper.hasClass('.adace-hide-on-desktop')){
$wrapper.remove();
}
}
if(unpack) {
$self.replaceWith(decodeURIComponent(content));
}
}
if($wrapper.css('visibility') === 'visible' ) {
adace_load_686e2881a7e1e();
} else {
//fire when visible.
var refreshIntervalId = setInterval(function(){
if($wrapper.css('visibility') === 'visible' ) {
adace_load_686e2881a7e1e();
clearInterval(refreshIntervalId);
}
}, 999);
}
})(jQuery);
Curious how Twitch Identity services addresses scalability and performance challenges related to authentication?
Last Tuesday, the Twitch Identity team — which helps Twitch users create and manage their digital identity and owns the services that provide authentication, authorization, and user metadata management — hosted a Meetup.com event to explain just that. But we’re recapping here just for you!
First challenge: Login form load
The goal of authentication is to verify who the user is. In a typical login flow, the user supplies a password along with a username and the service validates the credentials.
Login user interface
The Twitch Login form used to load very slowly, as long as 10 seconds in some Asian and Pacific countries. The browser had to make a DNS request for the authentication backend, initiate a TLS connection to authentication service, make a request to load the page, and then make additional requests for more assets. Altogether, there were five round trips and over 150 KB of data transfer.
To improve load latency, the team considered a few options: prefetching, connection reuse, inlining, and lazy loading.
Ultimately, the solution relies mostly on prefetching by making the login modal part of the main page, but it employs lazy load for fetching heavy assets. As a result, the median load latency dropped as much as20x from 4.1 sec to 0.2 sec.
Second challenge: User session validation
At the end of the login flow, the browser obtains a long-lived OAuth 2.0 access token and stores it in a cookie. This token is required for subsequent requests to the Twitch API and the corresponding downstream services.
– Werbung –
If each service had to validate the OAuth token directly against the token dispensary, the latter would need to handle calls from multiple services for every API request. To reduce the workload, the Identity team implemented an approach that employs self-contained JSON Web Tokens (JWT).
Login and request flow
In this approach, before forwarding the request to downstream services, the API calls a JWT Authority service, which validates the OAuth token and generates a short-lived JWT token. The latter contains a user id, scopes, and a digital signature. The API includes a JWT token in calls to all downstream services instead of an OAuth token. The services validate the digital signature in the JWT token and read the payload. This design dramatically reduces the number of requests to the token dispensary.
Check out the VOD now for the whole talk.
Future projects
The Identity team has a roadmap that extends into 2020, which includes improvements in the detection and prevention of malicious behavior, security enhancements, federated identity, service re-architecture, etc.
If you are interested in joining the team, we are currently hiring in San Francisco.
Du musst angemeldet sein, um einen Kommentar abzugeben.
Einwilligung verwalten
Um dir ein optimales Erlebnis zu bieten, verwenden wir Technologien wie Cookies, um Geräteinformationen zu speichern und/oder darauf zuzugreifen. Wenn du diesen Technologien zustimmst, können wir Daten wie das Surfverhalten oder eindeutige IDs auf dieser Website verarbeiten. Wenn du deine Einwillligung nicht erteilst oder zurückziehst, können bestimmte Merkmale und Funktionen beeinträchtigt werden.
Funktional
Immer aktiv
Die technische Speicherung oder der Zugang ist unbedingt erforderlich für den rechtmäßigen Zweck, die Nutzung eines bestimmten Dienstes zu ermöglichen, der vom Teilnehmer oder Nutzer ausdrücklich gewünscht wird, oder für den alleinigen Zweck, die Übertragung einer Nachricht über ein elektronisches Kommunikationsnetz durchzuführen.
Vorlieben
Die technische Speicherung oder der Zugriff ist für den rechtmäßigen Zweck der Speicherung von Präferenzen erforderlich, die nicht vom Abonnenten oder Benutzer angefordert wurden.
Statistiken
Die technische Speicherung oder der Zugriff, der ausschließlich zu statistischen Zwecken erfolgt.Die technische Speicherung oder der Zugriff, der ausschließlich zu anonymen statistischen Zwecken verwendet wird. Ohne eine Vorladung, die freiwillige Zustimmung deines Internetdienstanbieters oder zusätzliche Aufzeichnungen von Dritten können die zu diesem Zweck gespeicherten oder abgerufenen Informationen allein in der Regel nicht dazu verwendet werden, dich zu identifizieren.
Marketing
Die technische Speicherung oder der Zugriff ist erforderlich, um Nutzerprofile zu erstellen, um Werbung zu versenden oder um den Nutzer auf einer Website oder über mehrere Websites hinweg zu ähnlichen Marketingzwecken zu verfolgen.
Schreibe einen Kommentar
Du musst angemeldet sein, um einen Kommentar abzugeben.