<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/index.php?action=history&amp;feed=atom&amp;title=4.7.7_Tester_l%27expiration_de_session_%28OTG-SESS-007%29</id>
		<title>4.7.7 Tester l'expiration de session (OTG-SESS-007) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/index.php?action=history&amp;feed=atom&amp;title=4.7.7_Tester_l%27expiration_de_session_%28OTG-SESS-007%29"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=4.7.7_Tester_l%27expiration_de_session_(OTG-SESS-007)&amp;action=history"/>
		<updated>2026-04-29T11:02:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=4.7.7_Tester_l%27expiration_de_session_(OTG-SESS-007)&amp;diff=197008&amp;oldid=prev</id>
		<title>Jcpraud: Corrections</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=4.7.7_Tester_l%27expiration_de_session_(OTG-SESS-007)&amp;diff=197008&amp;oldid=prev"/>
				<updated>2015-07-05T15:15:57Z</updated>
		
		<summary type="html">&lt;p&gt;Corrections&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:15, 5 July 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Sommaire ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Sommaire ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dans cette phase, les testeurs vont vérifier que l'application déconnecte automatiquement une utilisateur qui a été inactif depuis un certain temps, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;assurant &lt;/del&gt;ainsi qu'il n'est pas possible de &amp;quot;réutiliser&amp;quot; la même session, et qu'aucune donnée sensible &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;de &lt;/del&gt;reste stockée dans le cache du navigateur.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dans cette phase, les testeurs vont vérifier que l'application déconnecte automatiquement une utilisateur qui a été inactif depuis un certain temps, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;garantissant &lt;/ins&gt;ainsi qu'il n'est pas possible de &amp;quot;réutiliser&amp;quot; la même session, et qu'aucune donnée sensible &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ne &lt;/ins&gt;reste stockée dans le cache du navigateur.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Toutes les applications devraient implémenter une limite d'inactivité sur les sessions. Cette limite définit le &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;temps qu'&lt;/del&gt;une session restera active alors qu'il n'y a pas d'activité de l'utilisateur, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;après &lt;/del&gt;ce &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;temps &lt;/del&gt;d'inactivité &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(depuis &lt;/del&gt;la dernière requête HTTP &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;de la session considérée), la &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;sera fermée et invalidée&lt;/del&gt;. La limite la plus appropriée doit être un compromis entre la sécurité (limite plus courte) et le confort d'utilisation (limite plus longue), et dépend fortement du niveau de sensibilité des données manipulées par l'application. Par exemple, une limite de 60 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;minute &lt;/del&gt;peut être acceptable pour un forum public, mais pas pour une application bancaire (dans ce cas, un maximum de 15 minutes est recommandé). Dans tous les cas, une application qui ne force pas de déconnexion en cas d'inactivité doit être considérée comme non sécurisée, sauf si un tel comportement est spécifiquement requis fonctionnellement.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Toutes les applications devraient implémenter une limite d'inactivité sur les sessions. Cette limite définit le &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;délai pendant lequel &lt;/ins&gt;une session restera active alors qu'il n'y a pas d'activité de l'utilisateur, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;et la session sera fermée et invalidée passé &lt;/ins&gt;ce &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;délai &lt;/ins&gt;d'inactivité &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;après &lt;/ins&gt;la dernière requête HTTP &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;reçue par l’application web pour une &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;donnée&lt;/ins&gt;. La limite la plus appropriée doit être un compromis entre la sécurité (limite plus courte) et le confort d'utilisation (limite plus longue), et dépend fortement du niveau de sensibilité des données manipulées par l'application. Par exemple, une limite de 60 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;minutes &lt;/ins&gt;peut être acceptable pour un forum public, mais pas pour une application bancaire (dans ce cas, un maximum de 15 minutes est recommandé). Dans tous les cas, une application qui ne force pas de déconnexion en cas d'inactivité doit être considérée comme non sécurisée, sauf si un tel comportement est spécifiquement requis fonctionnellement.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;L'expiration de session limite les chances qu'un attaquant puisse deviner et utiliser un identifiant de session appartenant à un autre utilisateur, et dans certaines circonstances, peut protéger les ordinateurs publics contre la réutilisation de session. Cependant, si l'attaquant peut détourner une session donnée, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;l&lt;/del&gt;'expiration ne pourra rien pour limiter ses actions, puisqu'il peut générer périodiquement de l'activité sur la session afin de la garder active plus longtemps.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;L'expiration de session limite les chances qu'un attaquant puisse deviner et utiliser un identifiant de session appartenant à un autre utilisateur, et dans certaines circonstances, peut protéger les ordinateurs publics contre la réutilisation de session. Cependant, si l'attaquant peut détourner une session donnée, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;le délai d&lt;/ins&gt;'expiration ne pourra rien pour limiter ses actions, puisqu'il peut générer périodiquement de l'activité sur la session afin de la garder active plus longtemps.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Le management &lt;/del&gt;des expirations de sessions doit être fait côté serveur. si certaines données contrôlées par le client sont utilisées pour imposer l'expiration de session, par exemple les valeurs de cookie ou &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;autre &lt;/del&gt;paramètres client pour mesurer des références temporelles (par exemple, le nombre de minutes depuis la connexion), un attaquant pourrait manipuler ces données pour étendre la durée d'une session. L'application doit donc suivre la durée d'inactivité côté serveur et, une fois la limite atteinte, invalider automatiquement la session courante de l'utilisateur puis supprimer toutes les données stockées côté client.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;La gestion &lt;/ins&gt;des expirations de sessions doit être fait côté serveur. si certaines données contrôlées par le client sont utilisées pour imposer l'expiration de session, par exemple les valeurs de cookie ou &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;autres &lt;/ins&gt;paramètres client pour mesurer des références temporelles (par exemple, le nombre de minutes depuis la connexion), un attaquant pourrait manipuler ces données pour étendre la durée d'une session. L'application doit donc suivre la durée d'inactivité côté serveur et, une fois la limite atteinte, invalider automatiquement la session courante de l'utilisateur puis supprimer toutes les données stockées côté client.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ces deux actions doivent être implémentées avec précaution, afin de d'&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;aviter &lt;/del&gt;d'introduire des faiblesses qui pourraient être exploitée par un attaquant pour obtenir un accès si l'utilisateur oublie de se déconnecter de l'application. Plus &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;précisémment&lt;/del&gt;, comme pour la fonction de déconnexion, il est important &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;d&lt;/del&gt;'assurer que tous les jetons de &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ssion &lt;/del&gt;(par exemple les cookies) sont correctement détruits ou rendus inutilisables, et que des contrôles corrects sont appliqués côté serveur pour empêcher &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;la &lt;/del&gt;réutilisation &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;de jetons de session&lt;/del&gt;. Si de telles actions ne sont pas appliquées correctement, un attaquant pourrait rejouer ces jetons de session afin de &amp;quot;ressuciter&amp;quot; la session d'un utilisateur légitime et usurper son identité (cette attaque est communément nommée 'cookie replay'). Le fait que l'attaquant &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ait besoin &lt;/del&gt;d'accéder à ces jetons de session (stockés sur le PC de la victime) est bien sûr un facteur &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;limitant&lt;/del&gt;, mais dans certains cas, cela n'a rien de particulièrement difficile.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ces deux actions doivent être implémentées avec précaution, afin de d'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;éviter &lt;/ins&gt;d'introduire des faiblesses qui pourraient être exploitée par un attaquant pour obtenir un accès si l'utilisateur oublie de se déconnecter de l'application. Plus &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;précisément&lt;/ins&gt;, comme pour la fonction de déconnexion, il est important &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;de s&lt;/ins&gt;'assurer que tous les jetons de &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;session &lt;/ins&gt;(par exemple les cookies) sont correctement détruits ou rendus inutilisables, et que des contrôles corrects sont appliqués côté serveur pour empêcher &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;leur &lt;/ins&gt;réutilisation. Si de telles actions ne sont pas appliquées correctement, un attaquant pourrait rejouer ces jetons de session afin de &amp;quot;ressuciter&amp;quot; la session d'un utilisateur légitime et usurper son identité (cette attaque est communément nommée 'cookie replay' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: rejeu de cookie&lt;/ins&gt;). Le fait que l'attaquant &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;doit être capable &lt;/ins&gt;d'accéder à ces jetons de session (stockés sur le PC de la victime) est bien sûr un facteur &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;atténuant&lt;/ins&gt;, mais dans certains cas, cela n'a rien de particulièrement difficile.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le scénario le plus &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;commun &lt;/del&gt;pour ce genre d'attaques &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;met en jeu &lt;/del&gt;un ordinateur public &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;utilisé &lt;/del&gt;pour accéder à des informations privées (par exemple : webmail, compte bancaire en ligne). Si l'utilisateur laisse l'ordinateur sans se déconnecter explicitement, et qu'aucune expiration de session n'est implémentée par l'application, alors un attaquant peut accéder au même compte en &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pressant &lt;/del&gt;simplement le bouton &amp;quot;retour&amp;quot; du navigateur.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le scénario le plus &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;courrant &lt;/ins&gt;pour ce genre d'attaques &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;est l'utilisation d'&lt;/ins&gt;un ordinateur public pour accéder à des informations privées (par exemple : webmail, compte bancaire en ligne). Si l'utilisateur laisse l'ordinateur sans se déconnecter explicitement, et qu'aucune expiration de session n'est implémentée par l'application, alors un attaquant peut accéder au même compte en simplement &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;appuyant sur &lt;/ins&gt;le bouton &amp;quot;retour&amp;quot; du navigateur.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Comment tester==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Comment tester==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Test en boite noire ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Test en boite noire ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;La même approche que dans la section [[4.7.6 Tester les fonctionnalités de déconnexion (OTG-SESS-006)]] peut être utilisée pour mesurer les déconnexions par expiration.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;La même approche que dans la section [[4.7.6 Tester les fonctionnalités de déconnexion (OTG-SESS-006)]] peut être utilisée pour mesurer les déconnexions par expiration &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;de délai&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;La méthodologie de test est très similaire. D'abord le &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tester &lt;/del&gt;doit vérifier qu'un expiration existe, par exemple en se connectant et en attendant que la déconnexion automatique soit déclenchée. Comme pour la fonction de déconnexion, après expiration, tous les jetons de session doivent être détruits ou inutilisables.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;La méthodologie de test est très similaire. D'abord le &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;testeur &lt;/ins&gt;doit vérifier qu'un &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;délai d'&lt;/ins&gt;expiration existe, par exemple en se connectant et en attendant que la déconnexion automatique soit déclenchée. Comme pour la fonction de déconnexion, après expiration &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;du délai&lt;/ins&gt;, tous les jetons de session doivent être détruits ou &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;rendus &lt;/ins&gt;inutilisables.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ensuite, si &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;l&lt;/del&gt;'expiration est &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;configurée&lt;/del&gt;, le &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tester &lt;/del&gt;doit comprendre si &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;elle &lt;/del&gt;est &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;imposée &lt;/del&gt;par le client ou par le serveur (ou par les deux). Si le cookie de session est non-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;persistent &lt;/del&gt;(ou , plus généralement, le cookie de session ne contient pas de données temporelles), le &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tester &lt;/del&gt;peut considérer que l'expiration est imposée par le serveur. Si le cookie de session contient des données liées au temps (par exemple heure de connexion, date d'expiration d'un cookie persistant), alors il est possible que le client soit impliqué dans la gestion de l'expiration. Dans ce cas, le &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tester &lt;/del&gt;peut essayer de modifier le cookie (s'il n'est pas protégé cryptographiquement) et voir ce qui arrive à la session. Par exemple, le &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tester &lt;/del&gt;peut configurer une date d'expiration éloignée dans le futur et regarder si la session a pu être prolongée.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ensuite, si &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;un délai d&lt;/ins&gt;'expiration est &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;configuré&lt;/ins&gt;, le &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;testeur &lt;/ins&gt;doit comprendre si &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;il &lt;/ins&gt;est &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;imposé &lt;/ins&gt;par le client ou par le serveur (ou par les deux). Si le cookie de session est non-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;persistant &lt;/ins&gt;(ou , plus généralement, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;si &lt;/ins&gt;le cookie de session ne contient pas de données temporelles), le &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;testeur &lt;/ins&gt;peut considérer que l'expiration &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;du délai &lt;/ins&gt;est imposée par le serveur. Si le cookie de session contient des données liées au temps (par exemple heure de connexion, date d'expiration d'un cookie persistant), alors il est possible que le client soit impliqué dans la gestion de l'expiration &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;du délai&lt;/ins&gt;. Dans ce cas, le &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;testeur &lt;/ins&gt;peut essayer de modifier le cookie (s'il n'est pas protégé cryptographiquement) et voir ce qui arrive à la session. Par exemple, le &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;testeur &lt;/ins&gt;peut configurer une date d'expiration éloignée dans le futur et regarder si la session a pu être prolongée.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;En règle générale, tout devrait être vérifié côté serveur, et il ne devrait pas être possible d'accéder &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;de &lt;/del&gt;nouveau à l'application en restaurant les anciennes valeurs de cookies de session.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;En règle générale, tout devrait être vérifié côté serveur, et il ne devrait pas être possible d'accéder &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;à &lt;/ins&gt;nouveau à l'application en restaurant les anciennes valeurs de cookies de session.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot; &gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le testeur doit vérifier que :&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le testeur doit vérifier que :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;LA &lt;/del&gt;fonction de déconnexion détruit tous les jetons de session, ou au moins les rend inutilisables.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;La &lt;/ins&gt;fonction de déconnexion détruit tous les jetons de session, ou au moins les rend inutilisables.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Le serveur vérifie correctement l'état des &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;sessoins&lt;/del&gt;, empêchant un attaquant de rejouer des identifiants de sessions détruits.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Le serveur vérifie correctement l'état des &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sessions&lt;/ins&gt;, empêchant un attaquant de rejouer des identifiants de sessions détruits.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;une &lt;/del&gt;expiration est &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;imposée &lt;/del&gt;correctement par le serveur. Si le serveur utilise &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;une limite &lt;/del&gt;d'expiration qui est &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lue &lt;/del&gt;depuis un jeton de session envoyé par le client (ce qui n'est pas conseillé), alors ce jeton doit être cryptographiquement protégé contre les manipulations.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;un délai d'&lt;/ins&gt;expiration est &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;imposé &lt;/ins&gt;correctement par le serveur. Si le serveur utilise &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;un délai &lt;/ins&gt;d'expiration qui est &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;lu &lt;/ins&gt;depuis un jeton de session envoyé par le client (ce qui n'est pas conseillé), alors ce jeton doit être cryptographiquement protégé contre les manipulations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A noter que le plus important pour l'application est d'invalider les session côté serveur. Généralement cela signifie que le code doit invoquer les méthodes appropriées, par exemple HttpSession.invalidate() en Java et Session.abandon() en .NET. Supprimer les cookies du navigateur est conseillé, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;mas &lt;/del&gt;pas &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;stricement &lt;/del&gt;nécessaire; puisque si la session est &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;connrectement &lt;/del&gt;invalidée sur &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;la &lt;/del&gt;serveur, la possession des cookies n'aidera pas l'attaquant.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A noter que le plus important pour l'application est d'invalider les session côté serveur. Généralement cela signifie que le code doit invoquer les méthodes appropriées, par exemple HttpSession.invalidate() en Java et Session.abandon() en .NET. Supprimer les cookies du navigateur est conseillé, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mais &lt;/ins&gt;pas &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;strictement &lt;/ins&gt;nécessaire; puisque si la session est &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;conrrectement &lt;/ins&gt;invalidée sur &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;le &lt;/ins&gt;serveur, la possession des cookies n'aidera pas l'attaquant.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== References ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''OWASP Resources'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''OWASP Resources'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Session Management Cheat Sheet]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Session Management Cheat Sheet]] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;: aide-mémoire sur la gestion de session&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jcpraud</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=4.7.7_Tester_l%27expiration_de_session_(OTG-SESS-007)&amp;diff=186091&amp;oldid=prev</id>
		<title>Jcpraud at 17:54, 26 November 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=4.7.7_Tester_l%27expiration_de_session_(OTG-SESS-007)&amp;diff=186091&amp;oldid=prev"/>
				<updated>2014-11-26T17:54:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:54, 26 November 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot; &gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;La &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;L'expiration de session limite les &lt;/ins&gt;chances &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qu'un attaquant puisse deviner et utiliser un identifiant de &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;appartenant à un autre utilisateur&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;et dans certaines circonstances, peut protéger les ordinateurs publics contre la réutilisation de &lt;/ins&gt;session. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Cependant&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;si l'attaquant peut détourner une &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;donnée&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;l'expiration ne pourra rien pour limiter ses &lt;/ins&gt;actions, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;puisqu'il peut générer périodiquement de l'activité sur la &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;afin de la garder &lt;/ins&gt;active &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;plus longtemps&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The idle timeout limits the &lt;/del&gt;chances &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that an attacker has to guess and use a valid &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ID from another user&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and under certain circumstances could protect public computers from &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;reuse&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;However&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;if the attacker is able to hijack a given &lt;/del&gt;session, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the idle timeout does not limit the attacker’s &lt;/del&gt;actions, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;as he can generate activity on the session periodically to keep the &lt;/del&gt;session active &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for longer periods of time&lt;/del&gt;. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Session timeout &lt;/del&gt;management &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and expiration must be enforced server-side&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If some data under the control of the &lt;/del&gt;client &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is used to enforce the &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;timeout&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for example using &lt;/del&gt;cookie &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;values or other &lt;/del&gt;client &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;parameters to track time references &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;e.g. number of &lt;/del&gt;minutes &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;since log in time&lt;/del&gt;), &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;an attacker could manipulate these to extend the &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;duration&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;So the &lt;/del&gt;application &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;has to track the inactivity time on the server side and&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;after the timeout is expired&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;automatically invalidate the current user&lt;/del&gt;'&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;s session and delete every data stored on the &lt;/del&gt;client. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Le &lt;/ins&gt;management &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;des expirations de sessions doit être fait côté serveur&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;si certaines données contrôlées par le &lt;/ins&gt;client &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sont utilisées pour imposer l'expiration de &lt;/ins&gt;session, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;par exemple les valeurs de &lt;/ins&gt;cookie &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ou autre paramètres &lt;/ins&gt;client &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pour mesurer des références temporelles &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;par exemple, le nombre de &lt;/ins&gt;minutes &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;depuis la connexion&lt;/ins&gt;), &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;un attaquant pourrait manipuler ces données pour étendre la durée d'une &lt;/ins&gt;session. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;L'&lt;/ins&gt;application &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;doit donc suivre la durée d'inactivité côté serveur et&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;une fois la limite atteinte&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;invalider automatiquement la session courante de l&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;utilisateur puis supprimer toutes les données stockées côté &lt;/ins&gt;client.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Both &lt;/del&gt;actions &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;must be implemented carefully&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in order to avoid introducing weaknesses that could be exploited by an attacker to gain unauthorized access if the user forgot to log out from the &lt;/del&gt;application. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;More specifically&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;as for the log out function&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it is &lt;/del&gt;important &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to ensure that all session tokens &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;e.g. &lt;/del&gt;cookies) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;are properly destroyed or made unusable&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and that proper controls are enforced at the server side to prevent the reuse of &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tokens&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If such &lt;/del&gt;actions &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;are not properly carried out&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;an attacker could replay these &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tokens in order to “resurrect” the &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;of a legitimate user and impersonate him/her &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;this attack is usually known as &lt;/del&gt;'cookie replay'). &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Of course, a mitigating factor is that the attacker needs to be able to access those tokens &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which are stored on the victim's &lt;/del&gt;PC), &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;variety of cases, this may not be impossible or particularly difficult&lt;/del&gt;. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ces deux &lt;/ins&gt;actions &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;doivent être implémentées avec précaution&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;afin de d'aviter d'introduire des faiblesses qui pourraient être exploitée par un attaquant pour obtenir un accès si l'utilisateur oublie de se déconnecter de l'&lt;/ins&gt;application. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Plus précisémment&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;comme pour la fonction de déconnexion&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;il est &lt;/ins&gt;important &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;d'assurer que tous les jetons de ssion &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;par exemple les &lt;/ins&gt;cookies) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sont correctement détruits ou rendus inutilisables&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;et que des contrôles corrects sont appliqués côté serveur pour empêcher la réutilisation de jetons de &lt;/ins&gt;session. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Si de telles &lt;/ins&gt;actions &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ne sont pas appliquées correctement&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;un attaquant pourrait rejouer ces jetons de &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;afin de &amp;quot;ressuciter&amp;quot; la &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;d'un utilisateur légitime et usurper son identité &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;cette attaque est communément nommée &lt;/ins&gt;'cookie replay'). &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Le fait que l'attaquant ait besoin d'accéder à ces jetons de session &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;stockés sur le &lt;/ins&gt;PC &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;de la victime&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;est bien sûr un facteur limitant&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mais dans certains cas&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;cela n'&lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;rien de particulièrement difficile&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The most common scenario for this kind of attack is a &lt;/del&gt;public &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;computer that is used to access some private information &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;e.g., web mail&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;online bank account&lt;/del&gt;). &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If the user moves away from the computer without explicitly logging out and the &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;timeout is not implemented on the &lt;/del&gt;application, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;then an attacker could access to the same account by simply pressing the “back” button of the browser&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Le scénario le plus commun pour ce genre d'attaques met en jeu un ordinateur &lt;/ins&gt;public &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;utilisé pour accéder à des informations privées &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;par exemple : webmail&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;compte bancaire en ligne&lt;/ins&gt;). &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Si l'utilisateur laisse l'ordinateur sans se déconnecter explicitement, et qu'aucune expiration de &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;n'est implémentée par l'&lt;/ins&gt;application, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;alors un attaquant peut accéder au même compte en pressant simplement le bouton &amp;quot;retour&amp;quot; du navigateur&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;How to Test&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Comment tester&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Black Box testing &lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Test en boite noire &lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The same approach seen in the &lt;/del&gt;[[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Testing for logout functionality &lt;/del&gt;(OTG-SESS-006)]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;section can be applied when measuring the timeout log out&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;La même approche que dans la section &lt;/ins&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;4.7.6 Tester les fonctionnalités de déconnexion &lt;/ins&gt;(OTG-SESS-006)]] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;peut être utilisée pour mesurer les déconnexions par expiration&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The testing methodology is very similar&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;First&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;testers have to check whether a timeout exists, for instance, by logging in and waiting for the timeout log out to be triggered&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;As in the log out function&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;after the timeout has passed&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;all &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tokens should be destroyed or be unusable&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;La méthodologie de test est très similaire&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;D'abord le tester doit vérifier qu'un expiration existe&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;par exemple en se connectant et en attendant que la déconnexion automatique soit déclenchée&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Comme pour la fonction de déconnexion&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;après expiration&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tous les jetons de &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;doivent être détruits ou inutilisables&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ensuite, si l'expiration est configurée, le tester doit comprendre si elle est imposée par le client ou par le serveur (ou par les deux). Si le cookie de session est non-persistent (ou , plus généralement, le cookie de session ne contient pas de données temporelles), le tester peut considérer que l'expiration est imposée par le serveur. Si le cookie de session contient des données liées au temps (par exemple heure de connexion, date d'expiration d'un cookie persistant), alors il est possible que le client soit impliqué dans la gestion de l'expiration. Dans ce cas, le tester peut essayer de modifier le cookie (s'il n'est pas protégé cryptographiquement) et voir ce qui arrive à la session. Par exemple, le tester peut configurer une date d'expiration éloignée dans le futur et regarder si la session a pu être prolongée.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Then, if the timeout is configured, testers need to understand whether the timeout is enforced by the client or by the server (or both). If the session cookie is non-persistent (or, more in general, the session cookie does not store any data about the time), testers can assume that the timeout is enforced by the server. If the session cookie contains some time related data (e.g., log in time, or last access time, or expiration date for a persistent cookie), then it's possible that the client is involved in the timeout enforcing. In this case, testers could try to modify the cookie (if it's not cryptographically protected) and see what happens to the session. For instance, testers can set the cookie expiration date far in the future and see whether the session can be prolonged. &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;En règle générale&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tout devrait être vérifié côté serveur, et il ne devrait pas être &lt;/ins&gt;possible &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;d'accéder de nouveau à l'application en restaurant les anciennes valeurs de cookies de &lt;/ins&gt;session.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;As a general rule&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;everything should be checked server-side and it should not be &lt;/del&gt;possible&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, by re-setting the &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cookies to previous values, to access the application again&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Gray Box Testing &lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Test en boite grise &lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The tester needs to check that&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Le testeur doit vérifier que &lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The log out function effectively destroys all &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;token, or at least renders them unusable&lt;/del&gt;,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;LA fonction de déconnexion détruit tous les jetons de &lt;/ins&gt;session, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ou au moins les rend inutilisables.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The server performs proper checks on the session state&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;disallowing an attacker to replay previously destroyed session identifiers&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Le serveur vérifie correctement l'état des sessoins&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;empêchant un attaquant de rejouer des identifiants de sessions détruits.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A timeout is enforced and it is properly enforced by the server&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If the server uses an &lt;/del&gt;expiration &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;time that is read from a &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;token that is sent by the &lt;/del&gt;client (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but this is not advisable&lt;/del&gt;), &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;then the token must be cryptographically protected from tampering&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;une expiration est imposée correctement par le serveur&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Si le serveur utilise une limite d'&lt;/ins&gt;expiration &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qui est lue depuis un jeton de &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;envoyé par le &lt;/ins&gt;client (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ce qui n'est pas conseillé&lt;/ins&gt;), &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;alors ce jeton doit être cryptographiquement protégé contre les manipulations&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Note that the most &lt;/del&gt;important &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;thing is for the &lt;/del&gt;application &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to invalidate the &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;on the server side&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Generally this means that the &lt;/del&gt;code &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;must invoke the appropriate methods&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;e.g. &lt;/del&gt;HttpSession.invalidate() &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in &lt;/del&gt;Java &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;Session.abandon() &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in &lt;/del&gt;.NET. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Clearing the &lt;/del&gt;cookies &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;from the browser is advisable&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but is not strictly necessary, since if the &lt;/del&gt;session &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is properly invalidated on the server&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;having the cookie in the browser will not help an attacker&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;A noter que le plus &lt;/ins&gt;important &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pour l'&lt;/ins&gt;application &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;est d'invalider les &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;côté serveur&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Généralement cela signifie que le &lt;/ins&gt;code &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;doit invoquer les méthodes appropriées&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;par exemple &lt;/ins&gt;HttpSession.invalidate() &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;en &lt;/ins&gt;Java &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;et &lt;/ins&gt;Session.abandon() &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;en &lt;/ins&gt;.NET. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Supprimer les &lt;/ins&gt;cookies &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;du navigateur est conseillé&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mas pas stricement nécessaire; puisque si la &lt;/ins&gt;session &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;est connrectement invalidée sur la serveur&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;la possession des cookies n'aidera pas l'attaquant&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jcpraud</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=4.7.7_Tester_l%27expiration_de_session_(OTG-SESS-007)&amp;diff=186090&amp;oldid=prev</id>
		<title>Jcpraud: Created page with &quot;{{Template:OWASP Testing Guide v4}}   == Sommaire == Dans cette phase, les testeurs vont vérifier que l'application déconnecte automatiquement une utilisateur qui a été in...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=4.7.7_Tester_l%27expiration_de_session_(OTG-SESS-007)&amp;diff=186090&amp;oldid=prev"/>
				<updated>2014-11-26T17:13:34Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Template:OWASP Testing Guide v4}}   == Sommaire == Dans cette phase, les testeurs vont vérifier que l&amp;#039;application déconnecte automatiquement une utilisateur qui a été in...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:OWASP Testing Guide v4}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sommaire ==&lt;br /&gt;
Dans cette phase, les testeurs vont vérifier que l'application déconnecte automatiquement une utilisateur qui a été inactif depuis un certain temps, assurant ainsi qu'il n'est pas possible de &amp;quot;réutiliser&amp;quot; la même session, et qu'aucune donnée sensible de reste stockée dans le cache du navigateur.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Toutes les applications devraient implémenter une limite d'inactivité sur les sessions. Cette limite définit le temps qu'une session restera active alors qu'il n'y a pas d'activité de l'utilisateur, après ce temps d'inactivité (depuis la dernière requête HTTP de la session considérée), la session sera fermée et invalidée. La limite la plus appropriée doit être un compromis entre la sécurité (limite plus courte) et le confort d'utilisation (limite plus longue), et dépend fortement du niveau de sensibilité des données manipulées par l'application. Par exemple, une limite de 60 minute peut être acceptable pour un forum public, mais pas pour une application bancaire (dans ce cas, un maximum de 15 minutes est recommandé). Dans tous les cas, une application qui ne force pas de déconnexion en cas d'inactivité doit être considérée comme non sécurisée, sauf si un tel comportement est spécifiquement requis fonctionnellement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
La &lt;br /&gt;
The idle timeout limits the chances that an attacker has to guess and use a valid session ID from another user, and under certain circumstances could protect public computers from session reuse. However, if the attacker is able to hijack a given session, the idle timeout does not limit the attacker’s actions, as he can generate activity on the session periodically to keep the session active for longer periods of time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Session timeout management and expiration must be enforced server-side. If some data under the control of the client is used to enforce the session timeout, for example using cookie values or other client parameters to track time references (e.g. number of minutes since log in time), an attacker could manipulate these to extend the session duration. So the application has to track the inactivity time on the server side and, after the timeout is expired, automatically invalidate the current user's session and delete every data stored on the client. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Both actions must be implemented carefully, in order to avoid introducing weaknesses that could be exploited by an attacker to gain unauthorized access if the user forgot to log out from the application. More specifically, as for the log out function, it is important to ensure that all session tokens (e.g. cookies) are properly destroyed or made unusable, and that proper controls are enforced at the server side to prevent the reuse of session tokens. If such actions are not properly carried out, an attacker could replay these session tokens in order to “resurrect” the session of a legitimate user and impersonate him/her (this attack is usually known as 'cookie replay'). Of course, a mitigating factor is that the attacker needs to be able to access those tokens (which are stored on the victim's PC), but, in a variety of cases, this may not be impossible or particularly difficult. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The most common scenario for this kind of attack is a public computer that is used to access some private information (e.g., web mail, online bank account). If the user moves away from the computer without explicitly logging out and the session timeout is not implemented on the application, then an attacker could access to the same account by simply pressing the “back” button of the browser.   &lt;br /&gt;
&lt;br /&gt;
==How to Test==&lt;br /&gt;
&lt;br /&gt;
=== Black Box testing ===&lt;br /&gt;
The same approach seen in the [[Testing for logout functionality (OTG-SESS-006)]] section can be applied when measuring the timeout log out.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The testing methodology is very similar. First, testers have to check whether a timeout exists, for instance, by logging in and waiting for the timeout log out to be triggered. As in the log out function, after the timeout has passed, all session tokens should be destroyed or be unusable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, if the timeout is configured, testers need to understand whether the timeout is enforced by the client or by the server (or both). If the session cookie is non-persistent (or, more in general, the session cookie does not store any data about the time), testers can assume that the timeout is enforced by the server. If the session cookie contains some time related data (e.g., log in time, or last access time, or expiration date for a persistent cookie), then it's possible that the client is involved in the timeout enforcing. In this case, testers could try to modify the cookie (if it's not cryptographically protected) and see what happens to the session. For instance, testers can set the cookie expiration date far in the future and see whether the session can be prolonged. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a general rule, everything should be checked server-side and it should not be possible, by re-setting the session cookies to previous values, to access the application again. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gray Box Testing ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The tester needs to check that:&lt;br /&gt;
* The log out function effectively destroys all session token, or at least renders them unusable,&lt;br /&gt;
* The server performs proper checks on the session state, disallowing an attacker to replay previously destroyed session identifiers&lt;br /&gt;
* A timeout is enforced and it is properly enforced by the server. If the server uses an expiration time that is read from a session token that is sent by the client (but this is not advisable), then the token must be cryptographically protected from tampering.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the most important thing is for the application to invalidate the session on the server side. Generally this means that the code must invoke the appropriate methods, e.g. HttpSession.invalidate() in Java and Session.abandon() in .NET. Clearing the cookies from the browser is advisable, but is not strictly necessary, since if the session is properly invalidated on the server, having the cookie in the browser will not help an attacker.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''OWASP Resources'''&lt;br /&gt;
* [[Session Management Cheat Sheet]]&lt;/div&gt;</summary>
		<author><name>Jcpraud</name></author>	</entry>

	</feed>