<?xml 
version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
>

<channel xml:lang="en">
	<title>OpenID Connect OAuth Server d&#233;di&#233; </title>
	<link>https://oa.dnc.global/</link>
	<description>OAuth Server by DnC (OAuthSD) est un serveur d'authentification qui impl&#233;mente OAuth 2.0 et OpenID Connect.
Avec la connexion unique, une entit&#233; permet aux utilisateurs de ses applications de naviguer de l'une &#224; l'autre de fa&#231;on trans-parente. En centralisant l'authentification des applications et des utilisateurs, un serveur OpenID Connect permet de contr&#244;ler parfaitement l'acc&#232;s des applications et des utilisateurs aux informations sensibles.</description>
	<language>en</language>
	<generator>SPIP - www.spip.net</generator>

	<image>
		<title>&lt;small&gt;OpenID Connect&lt;/small&gt; OAuth Server &lt;small&gt; d&#233;di&#233; &lt;/small&gt;</title>
		<url>https://static.oa.dnc.global/local/cache-vignettes/L144xH126/siteon0-a21bf.png?1793821223</url>
		<link>https://oa.dnc.global/</link>
		<height>126</height>
		<width>144</width>
	</image>



<item xml:lang="en">
		<title>OIDC session management: Features</title>
		<link>https://static.oa.dnc.global/-OpenID-Connect-SSO-session-management-etc-.html#oidcsessionmanagementfeatures</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-OpenID-Connect-SSO-session-management-etc-.html#oidcsessionmanagementfeatures</guid>
		<dc:date>2024-04-28T11:51:24Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;SSO, SLI, SLO, SRA: These features offered by OAuthSD simplify session and connection management for users, ensuring a smooth and secure experience when using multiple applications compatible with OpenID Connect. &lt;br class='autobr' /&gt;
Before detailing how OAuthSD implements these features, let's make sure to distinguish them: &lt;br class='autobr' /&gt; SSO (Single Sign-On): This is a mechanism that allows a user to log in once to access multiple applications, without having to log in again each time. With OAuthSD, SSO is set up to (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-OpenID-Connect-SSO-session-management-etc-.html" rel="directory"&gt;OpenID Connect : SSO, session management etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;SSO, SLI, SLO, SRA: These features offered by OAuthSD simplify session and connection management for users, ensuring a smooth and secure experience when using multiple applications compatible with OpenID Connect.&lt;/p&gt;
&lt;p&gt;Before detailing how OAuthSD implements these features, let's make sure to distinguish them:&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;&lt;strong&gt;SSO (Single Sign-On)&lt;/strong&gt;: This is a mechanism that allows a user to log in once to access multiple applications, without having to log in again each time. With OAuthSD, SSO is set up to offer single authentication for a group of applications, thus preventing the same Internet user from having to authenticate several times to access different applications.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;SLI (Single Login In)&lt;/strong&gt;: SLI is a similar concept to SSO, but it focuses on the fact that once logged in, a user can access multiple applications without having to log in again. OAuthSD uses SLI to facilitate navigation and data exchange within a multiple application.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;SLO (Single Log-Out) &lt;/strong&gt;: SLO is the counterpart of SSO, but for disconnection. It allows a user to log out just once to log out of all applications they are logged in to. This guarantees a global disconnection and reinforces security in the event of the user leaving their workstation.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;SRA (Single Re-Authentication)&lt;/strong&gt;: SRA is a mechanism that allows a user to seamlessly re-authenticate when an authentication cookie is no longer valid. This ensures enhanced security in the event of a need for re-authentication.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;This article was written using &lt;a href=&#034;https://chat.i-tego.com&#034; class='spip_out' rel='external'&gt;i-Tego ChatBot&lt;/a&gt;, in response to the question: &#034;Dans le contexte d'OAuthSD, expliquer SSO, SLI, SLO, SRA.&#034;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Q: is authorization flow as good for native/mobile ?</title>
		<link>https://static.oa.dnc.global/-Discover-.html#qisauthorizationflowasgoodfornativemobile</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-Discover-.html#qisauthorizationflowasgoodfornativemobile</guid>
		<dc:date>2024-03-14T09:21:34Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;i-Tego masters generative AI using your company's data. We can therefore provide you with advanced search tools on a very large number of documents of all types, explore your databases, your emails, etc. All with automatic translation! &lt;br class='autobr' /&gt;
This is an example built on i-Tego's documents : &lt;br class='autobr' /&gt;
Q: what are key points to consider when using authorization code flow with native/mobile application ? &lt;br class='autobr' /&gt;
R: When using the authorization code flow with native/mobile applications, there are several key points to (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-Discover-.html" rel="directory"&gt;Discover&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L76xH150/arton803-70b47.png?1793881898' width='76' height='150' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;i-Tego masters generative AI using your company's data. We can therefore provide you with advanced search tools on a very large number of documents of all types, explore your databases, your emails, etc. All with automatic translation!&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;dl class='spip_document_111 spip_documents spip_documents_left' style='float:left;'&gt;
&lt;dt&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L309xH612/itego_chat_smartphone-717a0.png?1793821224' width='309' height='612' alt='' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-111 spip_doc_titre' style='width:309px;'&gt;&lt;strong&gt;i-Tego chat bot&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-111 spip_doc_descriptif' style='width:309px;'&gt;i-Tego offers businesses a chatbot whose document database includes their own data: &lt;a href=&#034;https://chat.i-tego.com/&#034; class='spip_url spip_out auto' rel='nofollow external'&gt;https://chat.i-tego.com/&lt;/a&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;This is an example built on i-Tego's documents :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q: what are key points to consider when using authorization code flow with native/mobile application ?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;R: When using the authorization code flow with native/mobile applications, there are several key points to consider:&lt;/p&gt;
&lt;p&gt; Security: Native/mobile applications cannot securely store the client secret, which could be exposed through reverse-engineering. Therefore, additional security measures such as Proof Key for Code Exchange (PKCE) should be implemented to mitigate this risk.&lt;/p&gt;
&lt;p&gt; Client Type: Native/mobile applications should be registered as &#034;public&#034; clients on the server, meaning they have a null secret.&lt;/p&gt;
&lt;p&gt; Code Challenge: Instead of the client secret, the application should generate a random code verifier and send its hash as the code challenge parameter during the authorization request.&lt;/p&gt;
&lt;p&gt; Token Exchange: After the user authentication and receiving the authorization code, the application exchanges it for tokens, including the code verifier parameter.&lt;/p&gt;
&lt;p&gt; Code Challenge Creation: The code challenge is created by hashing the code verifier with SHA256 and encoding it in base64 URL format. The code challenge method should be set to 'S256'.&lt;/p&gt;
&lt;p&gt; Additional Security Measures: Implementing methods like PKCE enhances the security of the token issuance process and helps prevent interception or misuse of authorization codes by malicious applications residing on the same user-agent.&lt;/p&gt;
&lt;p&gt;These considerations help ensure the security and integrity of the authorization process for native/mobile applications using the authorization code flow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q: what says OAuthSD about this : is authorization flow as god for native/mobile application as for web application?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;R: OAuthSD emphasizes the importance of using the Authorization Code flow for web applications due to its ability to provide a secure way to handle authorization. This flow is particularly well-suited for web applications that require a constant connection to the server and deal with sensitive data. However, OAuthSD also mentions that certain systems may find the simplicity of OAuth 2.0 flows, such as the Client Credentials Grant, more suitable for their needs, especially in trusted environments where user identification is not a priority.&lt;/p&gt;
&lt;p&gt;In summary, while the Authorization Code flow is highly recommended for web applications, OAuthSD acknowledges that different application types may have varying requirements and security considerations when it comes to authorization flows.&lt;/p&gt;
&lt;p&gt;Sources:&lt;/p&gt;
&lt;p&gt; D&#233;couvrir - OpenID Connect OAuth Server d&#233;di&#233;.pdf (page 22)&lt;br class='autobr' /&gt; Authentifier l'application - OpenID Connect OAuth Server d&#233;di&#233;.pdf (page 1)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q: what says OAuthSD about security of authaurization code flow for native/mobile applications?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;R: OAuthSD emphasizes the importance of security when using the Authorization Code Flow for native/mobile applications. The Authorization Code Flow is considered safe when applied to web applications with a back-end, as it provides a secure way to authenticate and authorize access to protected resources. However, for native/mobile applications, additional considerations are needed to ensure the security of the authentication process.&lt;/p&gt;
&lt;p&gt;OAuthSD highlights the need to verify the origin of requests received by a resource server to prevent token theft by foreign applications. This strict security approach leads to the conclusion that the Authorization Code Flow is only considered safe for web applications with a back-end. This means that for native/mobile applications, there may be limitations or vulnerabilities that need to be addressed to ensure the security of the authentication process.&lt;/p&gt;
&lt;p&gt;In summary, while the Authorization Code Flow is a secure option for web applications with a back-end, additional security measures may be necessary when implementing this flow for native/mobile applications to prevent unauthorized access and protect sensitive data.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Verification Key for Code Exchange (PKCE)</title>
		<link>https://static.oa.dnc.global/-develop-.html#verificationkeyforcodeexchangepkce</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-develop-.html#verificationkeyforcodeexchangepkce</guid>
		<dc:date>2024-01-13T08:41:50Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;OAuthSD can implement the Authorization code + PKCE flow. The main difference between the Authorization code + PKCE flow and the standard flow is that the client does not provide the application secret, but a verification key. &lt;br class='autobr' /&gt;
On the other hand, since there is no longer a secret, there is no longer any identification of the application implemented by the client, which is therefore of the &#034;public&#034; type. The method avoids propagating a secret, but does not provide any new information on the (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-develop-.html" rel="directory"&gt;Develop&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;OAuthSD can implement the Authorization code + PKCE flow. The main difference between the Authorization code + PKCE flow and the standard flow is that the client does not provide the application secret, but a verification key.&lt;/p&gt;
&lt;p&gt;On the other hand, since there is no longer a secret, there is no longer any identification of the application implemented by the client, which is therefore of the &#034;public&#034; type.&lt;br class='autobr' /&gt;
The method avoids propagating a secret, but does not provide any new information on the identity of the application since it is a public instance that is thus identified. Conformity of the application to the original model is not guaranteed.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;PKCE (pronounced &#034;pixy&#034;) is an acronym for &#034;Proof Key for Code Exchange&#034;.&lt;br class='autobr' /&gt;
See &lt;a href=&#034;https://datatracker.ietf.org/doc/rfc7636/&#034; class='spip_out' rel='external'&gt;RFC 7636&lt;/a&gt;: Proof of Key for Code Exchange (PKCE)&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Usefulness of PKCE for mobile/native apps&lt;/h3&gt;
&lt;p&gt;When authenticating, mobile/native apps (&lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#typologiedesapplicationsauregarddelasecuritedesdonnees' class='spip_in' hreflang='fr'&gt;without a backend&lt;/a&gt;) can use the &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Authorization-Code-Grant-.html'&gt;authorization code flow&lt;/a&gt;, but they require additional security because they cannot Securely store the client secret that could be revealed by reverse-engineering (the client secret is tied to the application and is the same for all users and devices).&lt;br class='autobr' /&gt;
Apps without a backend can use a custom URL scheme to capture redirects (for example, MyApp://). This can be hijacked by a malicious application, residing on the same user-agent, to receive an authorization code.&lt;/p&gt;
&lt;p&gt;To address this issue, OAuth 2.0 and OpenID Connect provide a complement to the authorization code flow using a Verification Key for Code Exchange (PKCE).&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Authorization code flow + PKCE&lt;/h3&gt;
&lt;p&gt;A client application implementing the authorization code flow with PKCE must be of the &#034;public&#034; type, i.e. be registered on the server with a null secret.&lt;/p&gt;
&lt;p&gt;The public client application creates a random (unique and containing no information) string value, the &lt;strong&gt;code_verifier&lt;/strong&gt;. When the client application initiates the authorization code request, instead of the secret, it sends to the Authorize controller the code_verifier hash under the &lt;strong&gt;code_challenge parameter&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;After the user is authenticated and the authorization code is returned to the client application, the client application requests the tokens in exchange for the authorization code, including the code_verifier parameter.&lt;br class='autobr' /&gt;
If the codes match, authentication is complete and an access_token is returned.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Creation of the code_challenge&lt;/h3&gt;
&lt;p&gt;In the authorization code request, the application must transmit the code_challenge and the coding method &#034;code_challenge_method&#034;&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb1' class='spip_note' rel='appendix' title='code_challenge_method can take the values &#034;plain&#034; or &#034;S256&#034;.' id='nh1'&gt;1&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Starting from a random string 'code_verifier', we obtain the code_challenge by applying a SHA256 hash and base64 URL encoding. You must then pass code_challenge_method = 'S256'&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Prepare PKCE code_challenge&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$code_verifier&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/substr&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;a href=&#034;http://www.php.net/str_shuffle&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;str_shuffle&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;abcdefghijklmnopqrstuvwxyz0123456789ABCDEFabcdefghijklmnopqrstuvwxyz0123456789ABCDEFabcdefghijklmnopqrstuvwxyz0123456789ABCDEF&#034;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;0&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;50&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$code_challenge&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/strtr&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strtr&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&#034;http://www.php.net/rtrim&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;rtrim&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&#034;http://www.php.net/base64_encode&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;base64_encode&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&#034;http://www.php.net/hash&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;hash&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'sha256'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$code_verifier&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'='&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'+/'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'-_'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$_SESSION&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'code_verifier'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; encrypt&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$code_verifier&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #339933;&#034;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/d81aeff0dc06ab3b8c1e5e42e60239f9.txt'&gt;Download&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_javascript code&#034;&gt;&lt;div class=&#034;javascript&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000066; font-weight: bold;&#034;&gt;function&lt;/span&gt; base64URLEncode&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;str&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000066; font-weight: bold;&#034;&gt;return&lt;/span&gt; str.&lt;span style=&#034;color: #660066;&#034;&gt;toString&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;'base64'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; .&lt;span style=&#034;color: #660066;&#034;&gt;replace&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #009966; font-style: italic;&#034;&gt;/\+/g&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;'-'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; .&lt;span style=&#034;color: #660066;&#034;&gt;replace&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #009966; font-style: italic;&#034;&gt;/\//g&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;'_'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; .&lt;span style=&#034;color: #660066;&#034;&gt;replace&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #009966; font-style: italic;&#034;&gt;/=/g&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;''&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; code_verifier &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; crypto.&lt;span style=&#034;color: #660066;&#034;&gt;randomBytes&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #CC0000;&#034;&gt;50&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; code_challenge &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; base64URLEncode&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;code_verifier&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;...&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/df9b07fcbf12dde85c5082f8335c69da.txt'&gt;Download&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&#034;spip&#034;&gt;ENFORCE_PKCE configuration constant&lt;/h3&gt;
&lt;p&gt;If the ENFORCE_PKCE configuration constant is set to true, all clients must enforce PKCE.&lt;br class='autobr' /&gt;
If false, PKCE is applied only to clients querying Authorize with the code_challenge parameter.&lt;br class='autobr' /&gt;
This constant is set to False by default.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Error 'missing_code_challenge'&lt;/h3&gt;
&lt;p&gt;If the ENFORCE_PKCE configuration constant is set to true or if the client queries Authorize with the code_challenge parameter, and the client does not provide the challenge code and encoding method in the authorization code request, the Authorize controller responds with a code 400 and the message 'missing_code_challenge', 'This application requires you provide a PKCE code challenge'.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Call to Token controller&lt;/h3&gt;
&lt;p&gt;When the client application calls the Token controller to obtain the tokens, it passes the code_verifier parameter and the client ID in the body of the POST request (instead of passing the client ID and the secret in the header by the authentication method HTTP Basic).&lt;/p&gt;
&lt;p&gt;Example in &lt;strong&gt;PHP&lt;/strong&gt;:&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$code_verifier&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; decrypt&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;@&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$_SESSION&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'code_verifier'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'client_id'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$client_id&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'grant_type'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'authorization_code'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'code'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$code&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'code_verifier'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$code_verifier&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$token_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_TIMEOUT&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;10&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;//curl_setopt($h, CURLOPT_USERPWD, &#034;{$client_id}:{$client_secret}&#034;);&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POST&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_SSL_VERIFYPEER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;false&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POSTFIELDS&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_exec&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_exec&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #339933;&#034;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/6ee814fbd00d70ba3f841ef2d703c3d0.txt'&gt;Download&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&#034;spip&#034;&gt;Error 'code_verifier_missing'&lt;/h3&gt;
&lt;p&gt;If the client queried Authorize with a code_challenge (regardless of the value of the ENFORCE_PKCE configuration constant), and the client does not provide the 'code_verifier' parameter in the token request, the Token controller responds with a 400 code and the message 'code_verifier_missing', 'The PKCE code verifier parameter is required'.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;PKCE Security Discussion&lt;/h3&gt;
&lt;p&gt;First of all, let's remember that PKCE does not replace the secret of the application, and therefore does not provide any answer to the problem of identifying the client application.&lt;br class='autobr' /&gt;
The PKCE-enhanced authorization code flow introduces a random code &#034;code_verifier&#034;, obscure (containing no information), created by the calling application and can be verified by the authorization server. Additionally, the calling application creates a transformed code checker value called &#034;code_challenge&#034; and sends this value over HTTPS to retrieve an authorization code. In this way, a malicious attacker can only intercept the authorization code and cannot exchange it for a token without the code checker.&lt;/p&gt;
&lt;p&gt;However, after creating the verifier code in the first step of the authorization code flow, the client application must store it somewhere to provide it in the second step, when requesting the token. Even if this only lasts a very short time (of the order of a second), the code verifier is exposed to malware which clearly has everything it needs to try to obtain a token in place of the legitimate application. In principle, the legitimate application should have requested the token immediately, probably before the malware which will stumble on the ban on using the same verifier code twice. Unless the hacker is capable of changing execution priorities? Even if it seems difficult or improbable, there is perhaps an opportunity for exploit.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh1' class='spip_note' title='Footnotes 1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;code_challenge_method can take the values &#034;plain&#034; or &#034;S256&#034;.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>OIDC and Single Page Applications: Example of a Beautiful Masquerade!</title>
		<link>https://static.oa.dnc.global/-Discover-.html#oidcandsinglepageapplicationsexampleofabeautifulmasquerade</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-Discover-.html#oidcandsinglepageapplicationsexampleofabeautifulmasquerade</guid>
		<dc:date>2022-09-17T09:45:04Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;A Single Page Application (SPA) is a web application that loads a single HTML page from the web server and then dynamically updates it in response to user interaction and other events. &lt;br class='autobr' /&gt;
Arguing from advances in browsers allowing JavaScript to implement CORS rules and access encryption, some advocate implementing &#034;Authorization Code&#034; flow rather than &#034;Implicit flow&#034;. &lt;br class='autobr' /&gt;
The magic of the &#034;Authorization Code&#034; flow is then invoked to claim that data access is secure. It's just a masquerade! Bling (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-Discover-.html" rel="directory"&gt;Discover&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L150xH150/arton233-d5c40.png?1793881898' width='150' height='150' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;A Single Page Application (SPA) is a web application that loads a single HTML page from the web server and then dynamically updates it in response to user interaction and other events.&lt;/p&gt;
&lt;p&gt;Arguing from advances in browsers allowing JavaScript to implement CORS rules and access encryption, some advocate implementing &#034;Authorization Code&#034; flow rather than &#034;Implicit flow&#034;.&lt;/p&gt;
&lt;p&gt;The magic of the &#034;Authorization Code&#034; flow is then invoked to claim that data access is secure. It's just a masquerade! Bling bling bling...&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;A single-page application is a &#034;no back-end&#034; application&lt;/h3&gt;
&lt;p&gt;There are several architectures for creating single-page applications. The trend is the &#034;light server&#034; architecture, which installs on the user agent (usually the user's browser) the initial page containing Javascript code. This code will provide logic and state transitions for the application as it gets its RESTful API data protected by OAuth 2.0. In this configuration, the application resides on the user agent and not on the server: a single-page application is therefore a &#034;no back-end&#034; application.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;SPAs can (now?) implement Authorization Code Grant&lt;/h3&gt;
&lt;p&gt;There are many configurations in which the application hosts and the service endpoints are located on different servers: authentication server, protected resources (RS) or APIs.&lt;/p&gt;
&lt;p&gt;Single-page apps are a good example.&lt;/p&gt;
&lt;p&gt;In normal web usage, this multi-host or, more accurately, &#034;multi-origin&#034; approach is restricted for good security reasons. Declarations of cross-origin resource sharing ( Cross-Origin Resource Sharing, CORS ) make it possible to circumvent the constraint.&lt;/p&gt;
&lt;p&gt;Browsers have improved since the design of the implicit flow. The CORS implementation to allow token request from JavaScript is now available, along with the necessary cryptography APIs to validate the JWT token signature.&lt;br class='autobr' /&gt;
It is therefore technically possible to use the authorization code flow for the authentication and authorization of applications without a back-end, including for single-page applications.&lt;/p&gt;
&lt;p&gt;Does this mean that the use of this flow, in this configuration, guarantees data security?&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;With SPAs, authentication security issues remain&lt;/h3&gt;
&lt;p&gt;SPAs are &#034;no-back-end&#034; applications. Their code is on the user agent, so anywhere, unlike applications &#034;with back-end&#034; whose unique code is protected within a server. As such:&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Are exposed in the code, in a more or less accessible way to the public:&lt;br class='autobr' /&gt; - the identifier and the secret of the application,&lt;br class='autobr' /&gt; - access or identity tokens.&lt;/p&gt;
&lt;p&gt;With the identifier and the secret, a malicious application can obtain tokens. With the tokens, it could request data on behalf of the real application.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; The redirection URL is that of the application, therefore that of its host, ie the user-agent. It cannot be registered on the server and must be provided by the application.&lt;br class='autobr' /&gt;
If we are in the case of workstation user-agents ( desktops ) located in a trusted space (one or more known domains), it is still possible to compare this URL to a model saved on the server authorization. But even in this case, if the malicious application is on the same host&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-1' class='spip_note' rel='appendix' title='which is not only the common case but also the case ( worst case ) that one (...)' id='nh2-1'&gt;1&lt;/a&gt;]&lt;/span&gt;, the distinction is impossible. If we are dealing with a mobile application, it becomes really risky.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; In the case of a mobile application, the token request at the Token entry point and the response do not circulate in a connection from server ( that of the application ) to server ( the authentication server ) in which both ends are identified, but between different unidentified mobiles and the authentication server. &lt;strong&gt;Thus disappears one of the recognized qualities of the authorization code flow applied to customers with back-end&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; There are many &lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#typologiedesapplicationsauregarddelasecuritedesdonnees' class='spip_in' hreflang='fr'&gt;additional methods&lt;/a&gt; allowing the tokens to be linked to the user-agent or to the TLS connection identifier (TLS Token Binding). This makes it possible to prove that the user-agent (eg the end-user's browser) is the one with which the authentication was performed and the token created. But this does not make it possible to discriminate between the good application and malware running on the same TLS link. In the same vein, the proof of possession technique &lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#proofofpossessionpop' class='spip_in' hreflang='fr'&gt;Proof of Possession (PoP)&lt;/a&gt; seems to lead to the same conclusion.&lt;/p&gt;
&lt;p&gt;In particular, the &#034;&lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#cledeverificationpourlechangedecodepkce' class='spip_in' hreflang='fr'&gt;Proof Key for Code Exchange, PKCE&lt;/a&gt;&#034; method, applied to applications without a back-end as part of the Authorization Code flow, strengthens security by preventing authorization code hijacking. With this technique, the secret of the application is not used, which makes it possible not to disclose it. However, this prohibits identifying the application. PKCE makes it possible to ensure that the application which presents the authorization code is indeed the one in which the end user identification procedure was carried out, whatever this application may be.&lt;/p&gt;
&lt;p class=&#034;important&#034;&gt;In the case of a SPA as in that of any application without a back-end&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-2' class='spip_note' rel='appendix' title='Just as in the case of a native mobile application and any application (...)' id='nh2-2'&gt;2&lt;/a&gt;]&lt;/span&gt;, it is not possible to ensure that the application presenting the token is indeed the expected application, and not malware&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Encapsulate encrypted data in a Javascript class ???&lt;/h3&gt;
&lt;p&gt;With SPAs, it is not possible to store credentials using traditional methods, such as access tokens in cookies and session storage. Instead, we imagine keeping sensitive data in JavaScript variables.&lt;/p&gt;
&lt;p&gt;Some then recommend using a JavaScript class to store and provide these variables. This method receives the pretty name of &#034;encapsulation&#034; which gives a serious and innovative aspect to a method that is however very banal.&lt;/p&gt;
&lt;p&gt;However, this is only an obfuscation method whose effectiveness is insufficient against a determined attacker. A simple web debugger (all modern browsers include one) allows you to execute the code step by step and see the variables pass.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Why do the specs confirm questionable practice?&lt;/h3&gt;
&lt;p&gt;We can read in the document &lt;a href=&#034;https://openid.net/specs/openid-heart-oauth2-1_0.html#rfc.section.2.1.3&#034; class='spip_out' rel='external'&gt;Health Relationship Trust Profile for OAuth 2.0&lt;/a&gt;&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-3' class='spip_note' rel='appendix' title='Who can translate &#034; Health Relationship Trust Profile&#034;? Google Translator (...)' id='nh2-3'&gt;3&lt;/a&gt;]&lt;/span&gt;&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;
2.1.3. In-browser client with user delegation&lt;/p&gt;
&lt;p&gt;This client type applies to clients that act on behalf of a particular resource owner and require delegation of that user's rights to access the protected resource. Additionally, these clients are integrated with a web browser and effectively share an active session between systems.&lt;/p&gt;
&lt;p&gt;These clients use the implicit flow of OAuth 2 by sending a resource owner to the Authorize endpoint for authorization. The user MUST authenticate to the Authorize endpoint. The user's web browser is then redirected to a URI hosted by the client, from which the client can directly obtain an access token. Since &lt;strong&gt;the client itself never authenticates to the server and the token is made directly available to the browser&lt;/strong&gt;, this flow is only suitable for clients embedded in a web browser, such as a JavaScript client without a backend server component. Whenever possible, &lt;strong&gt;preferred to use authorization code flow due to its superior security properties&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This type of client MUST NOT request or receive a refresh token. Access tokens issued to this type of client MUST be short-lived and SHOULD be discarded when the user's authenticated session with the client expires.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;It is therefore well recognized that there is a problem that the authorization code flow will not solve. This flow is arguably &#034;higher security&#034;, but in the case of applications without a back-end it fails to authenticate the application, which may be overridden by malware located on the user agent.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Still, the wording of the paragraph suggests that the authorization code flow will do better than the implicit flow. And we avoid the exposure of the application's secret in a simple way, and for good reason: &#034;the client itself never authenticates with the server&#034;.&lt;/p&gt;
&lt;p&gt;In this context, talking about the security offered by the &#034;Authorization Code&#034; flow is a &lt;i&gt;masquerade: n.f. hypocritical comedy, deceptive staging&lt;/i&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;An article presenting the cons and concluding on the pros&lt;/h3&gt;
&lt;p&gt;Here is an interesting article for the analysis that is made: &lt;a href=&#034;https://medium.com/@robert.broeckelmann/securely-using-the-oidc -authorization-code-flow-and-a-public-client-with-single-page-applications-55e0a648ab3a&#034; class='spip_out' rel='external'&gt;SECURELY USING THE OIDC AUTHORIZATION CODE FLOW AND A PUBLIC CLIENT WITH SINGLE PAGE APPLICATIONS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The author advocates the use of authorization flow with code for public SPAs, but provides a detailed analysis that highlights the multiple shortcomings of the configuration. Contrary to the title &#034;Securely...&#034; and the conclusion of the article, here is another ambiguity.&lt;/p&gt;
&lt;p&gt;By titling on public apps, the author avoids at least disclosing the app's secrecy, since there is none. This will facilitate the work of malicious applications! we're not going to ask for protected data like that.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Incompetence or marketing lie?&lt;/h3&gt;
&lt;p&gt;Our article was motivated by reading this one: &lt;a href=&#034;https://www.ubisecure.com/single-sign-on/single-page-application-and-openid-connect/&#034; class='spip_url spip_out' rel='external'&gt;https://www.ubisecure.com/single-si...&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The red thread of this article is simple:&lt;/p&gt;
&lt;p&gt;1. Advances in browsers (CORS and cryptography) allow JavaScript to implement the authorization code flow.&lt;/p&gt;
&lt;p&gt;2. So we no longer need to implement the implicit flow with the SPAs, but the Authorization Code flow.&lt;br class='autobr' /&gt;
Understood: since you know that the Authorization Code flow is the one to use with OIDC, and that you were told that the implicit flow was of questionable security, you understand that everything is fine now.&lt;/p&gt;
&lt;p&gt;3. Of course, we have to store the tokens. You have to encapsulate them in a class, so they will be well hidden.&lt;/p&gt;
&lt;p&gt;So, incompetence or intox? Wouldn't it be a question of making people believe in a new system and thus crediting the existence of a comparative advantage over the competition?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why distort the truth?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;OpenID Connect has a good image, it sells well. Too bad if the data is only secure in the case of classic web applications (with back-end). Want to keep up with the mobile app trend? Then marketers will sell you OIDC without telling you about the limitations.&lt;br class='autobr' /&gt;
Better still: they will highlight complementary methods, such as PKCE or POP, suggesting that they provide the solution to the problem of authentication of a client application without a back-end.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;What about headless servers ?&lt;/h3&gt;
&lt;p&gt;The &#034;headless server&#034; configuration is an architecture that allows writers to produce and organize content, while providing developers with structured data that can be displayed using a separate system on the frontend of a site. web or app.&lt;/p&gt;
&lt;p&gt;We often end up, on the front-end, in an SPA.&lt;br class='autobr' /&gt;
But, since the data is served by an application with back-end, there is a way to ask the end user for OIDC authentication on this application, registered as a client of the OIDC server. If this gives a guarantee on the authorization of the user to access the data, it will not make it possible to identify the SPA and what it does with the data.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;So there is no hope of securing SPAs?&lt;/h3&gt;
&lt;p&gt;There is an interesting track with applications installed on mobile in Progressive Web App (PWA) mode. Under certain conditions, the code and data of PWAs are maintained, on the mobile side, identical to their model on the server side. Such a SPA - Headless Server architecture (see &lt;a href=&#034;https://degoy.com/nos-techniques/spip-cms-headless-gatsby.html&#034; class='spip_out' rel='external'&gt;SPIP CMS headless + Gatsby&lt;/a&gt;) could therefore be suitably secured with OIDC.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;i-Tego accompanies you&lt;/h3&gt;
&lt;p&gt;i-Tego (heiress of DnC) provides advice and assistance. We help our customers to implement their own OAuthSD server. We support Dev/Ops by transferring our skills to them, which results in using OIDC only in secure configurations.&lt;br class='autobr' /&gt;
And we fully recognize the work of IT to protect access to the network, and thus create the &#034;trusted space&#034; required for the correct application of OpenID Connect.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb2-1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2-1' class='spip_note' title='Footnotes 2-1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;which is not only the common case but also the case ( worst case ) that one must take into account for an analysis of security&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb2-2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2-2' class='spip_note' title='Footnotes 2-2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;Just as in the case of a native mobile application and any application without a back-end. This is the same problem, except perhaps for desktop applications in a trusted space&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb2-3'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2-3' class='spip_note' title='Footnotes 2-3' rev='appendix'&gt;3&lt;/a&gt;] &lt;/span&gt;Who can translate &#034; Health Relationship Trust Profile&#034;? Google Translator gives &#034;Health Relationship Trust Profile&#034;. Could this incomprehensible title be intended to give a pseudo-scientific aspect to an otherwise very obscure text?&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>SaaS and OIDC: a successful marriage thanks to OAuthSD!</title>
		<link>https://static.oa.dnc.global/-Discover-.html#saasandoidcasuccessfulmarriagethankstooauthsd</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-Discover-.html#saasandoidcasuccessfulmarriagethankstooauthsd</guid>
		<dc:date>2021-07-29T07:31:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;One of the features that DnC has developed to the highest level with its OAuthSD server is to transmit secure information using the JWT identity signed token (JWS). &lt;br class='autobr' /&gt;
We describe in this article the application i-Tego SaaS, a software as a service (SaaS) delivery system. In this application, OAuthSD provides OIDC authentication and securely transmits to SaaS applications the parameters relating to end-user' subscriptions. &lt;br class='autobr' /&gt;
Position of the problem &lt;br class='autobr' /&gt;
Most SaaS systems integrate the application (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-Discover-.html" rel="directory"&gt;Discover&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L120xH150/arton200-259e6.png?1793881898' width='120' height='150' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;One of the features that DnC has developed to the highest level with its OAuthSD server is to transmit secure information using the JWT identity signed token (JWS).&lt;/p&gt;
&lt;p&gt;We describe in this article the application &lt;a href=&#034;https://buy.dnc.global?lang=fr&#034; class='spip_out' rel='external'&gt;i-Tego SaaS&lt;/a&gt;, a software as a service (SaaS) delivery system. In this application, OAuthSD provides OIDC authentication and securely transmits to SaaS applications the parameters relating to end-user' subscriptions.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Position of the problem&lt;/h3&gt;
&lt;p&gt;Most SaaS systems integrate the application and the sales system in one software.&lt;/p&gt;
&lt;p&gt;If several web applications are to be distributed in SaaS mode by the same entity, the first problem to be solved consists in &lt;strong&gt;providing single sign-on service (SSO)&lt;/strong&gt; between the sales system and the different applications. No problem, that's the role of an OIDC server, OAuthSD does this very well.&lt;/p&gt;
&lt;p&gt;The second problem, more interesting, consists in &lt;strong&gt;transmitting information from the sales system to applications&lt;/strong&gt;.&lt;br class='autobr' /&gt;
Regarding the validity of the subscription and the (paying) options, this data must be secured, ie &lt;strong&gt;allow the recipient application to control:&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;integrity&lt;/strong&gt; (the data have not been falsified),
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; the &lt;strong&gt;authenticity&lt;/strong&gt; of their origin (they were indeed delivered by the SaaS system),
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; the &lt;strong&gt;actuality&lt;/strong&gt; (these are indeed data valid at the time considered),
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; the &lt;strong&gt;destination&lt;/strong&gt; (these are data relating to this application),
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; and of course the &lt;strong&gt;identity&lt;/strong&gt; of the end user (it is not an intruder who uses the application).&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;The solution: OAuthSD&lt;/h3&gt;
&lt;p&gt;OAuthSD allows integrating SaaS data as &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#incorporeraujetonjwtdesdeclarationssupplementaires' class='spip_in' hreflang='fr'&gt;additional declarations in JWT token payload&lt;/a&gt;. The recipient application (client of the OIDC server) will only need to &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectintrospectionintrospectionendpoint' class='spip_in' hreflang='fr'&gt;validate the identity token by introspection&lt;/a&gt; (and not locally to ensure the token validity at this time) to carry out the checks described above in a single operation.&lt;/p&gt;
&lt;p&gt;The system &lt;a href=&#034;https://buy.dnc.global?lang=en&#034; class='spip_out' rel='external'&gt;DnC SaaS&lt;/a&gt; and one of its applications &lt;a href=&#034;https://nss.dnc.global?lang=en&#034; class='spip_out' rel='external'&gt;NSS Lite&lt;/a&gt; perfectly illustrate this technical.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To achieve this we have:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; integrated in the same application the OIDC server and the sales system,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; developed OIDC-SaaS extension plugins, in particular for applications based on SPIP or Wordpress.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We would be happy to assist SMEs to allow them to develop their own SaaS system and adapt their web applications.&lt;br class='autobr' /&gt;
Our positioning of advice and assistance would allow our customers to developp their applications independently of expensive external providers. And third-party systems that are risky in terms of security: why feed big data to the benefit of your competitors?&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Definition of OIDC scopes and generalities on their use by applications</title>
		<link>https://static.oa.dnc.global/-OpenID-Connect-29-.html#definitionofoidcscopesandgeneralitiesontheirusebyapplications</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-OpenID-Connect-29-.html#definitionofoidcscopesandgeneralitiesontheirusebyapplications</guid>
		<dc:date>2020-10-05T11:50:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;The extent of the authorization is defined by the Scopes. This is probably the most open point of the standard and therefore a difficult concept to master for the developer of an application using OpenID Connect. &lt;br class='autobr' /&gt;
The ability to modulate authorization extent based on the client application and the end user is an exceptionally interesting feature of OAuthSD. &lt;br class='autobr' /&gt;
We often see in OIDC a simple SSO, but it misses all the power of the device: the JWT identity token combines inseparably and in a (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-OpenID-Connect-29-.html" rel="directory"&gt;OpenID Connect&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L150xH130/arton170-a0d2d.jpg?1793881898' width='150' height='130' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;The extent of the authorization is defined by the Scopes. This is probably the most open point of the standard and therefore a difficult concept to master for the developer of an application using OpenID Connect.&lt;/p&gt;
&lt;p&gt;The ability to modulate authorization extent based on the client application and the end user is an exceptionally interesting feature of OAuthSD.&lt;/p&gt;
&lt;p&gt;We often see in OIDC a simple SSO, but it misses all the power of the device: the JWT identity token combines inseparably and in a tamper-proof way the identity of the end user, that of the client application and the authorization extent.&lt;/p&gt;
&lt;p&gt;DnC gives an example of application of the transmission of authorization scopes with &lt;a href=&#034;https://buy.dnc.global/?lang=en&#034; class='spip_out' rel='external'&gt;i-Tego SaaS&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;OpenID Connect defines scopes in multiple places in the OAuth 2.0 documentation, yet does not give it the synthesis it deserves. The library OAuth2 Server Library for PHP developed by Brent Shaffer implements the scopes without the author presenting the philosophy. However, analyzing the code of this library makes it possible to complete the specification, to identify the main definitions and to propose a concept of use.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Four levels of scopes definition:&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;1. Scopes supported by the server (Supported scopes)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In addition to the reserved and non-reserved scopes defined by OpenID Connect, the developer defines the particular scopes used by the applications. They are registered in the server configuration file (variable $supportedScopes).&lt;/p&gt;
&lt;p&gt;The scope 'basic' is also included in the configuration as the default scope.&lt;/p&gt;
&lt;p&gt;Only these scopes can be used, the Authorize controller rejecting any request including a scope missing from this list.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Reserved Scopes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Reserved Scopes play a special role&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb3-1' class='spip_note' rel='appendix' title='So special that they have nothing to do with a scope of authorization, but (...)' id='nh3-1'&gt;1&lt;/a&gt;]&lt;/span&gt;. They are mainly used by the server to modify the flow behavior.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;openid&lt;/strong&gt;: This scope is required for the application to work with OpenID Connect. If it is the only scope requested, the identification of the end user will be reduced to the claim sub.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;&lt;a href='https://static.oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#offlineaccess' class='spip_in' hreflang='fr'&gt;offline_access&lt;/a&gt;&lt;/strong&gt;: OpenID Connect access requests include the refresh token only if the offline_access scope has been requested and granted.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;sli&lt;/strong&gt;: this scope is required for the application to accept &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-SSO-session-management-etc-.html#ssoandsingleloginidentificationsli' class='spip_in'&gt;one-time identification&lt;/a&gt; (Single Login Identification, SLI) and silent re-authentication (Silent Re-Authentication, SRA) as we we implemented them in OAuthSD.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;kerberos&lt;/strong&gt;: This scope authorizes the creation of an OAuthSD SLI session from &lt;a href='https://static.oa.dnc.global/-Identifier-l-utilisateur-final-.html#identificationparopenidconnectdesutilisateursidentifiesaveckerberos' class='spip_in' hreflang='fr'&gt;authentication with Kerberos&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes:&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; The first two scopes are defined by the OAuth 2.0 standard, while the last two are introduced by OAuthSD.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; The reserved scopes do not give rise to consent from the end user, with the exception of scope &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#offlineaccess' class='spip_in' hreflang='fr'&gt;offline_access&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Scopes available for an application (Available scopes)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;These scopes are defined at the time of &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointsdextremite' class='spip_in' hreflang='fr'&gt;application registration on the server&lt;/a&gt;. They include :
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; all or part of the reserved scopes,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;Non Reserved Scopes&lt;/strong&gt;, which are &lt;a href='https://static.oa.dnc.global/ web / -OpenID-Connect-UserInfo-.html # oidcscopesstd'&gt;defined by OpenID Connect&lt;/a&gt; or defined by the designer's initiative.&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb3-2' class='spip_note' rel='appendix' title='How much should we extend the definition of scopes? We discuss the issue (...)' id='nh3-2'&gt;2&lt;/a&gt;]&lt;/span&gt; We propose to call them &lt;strong&gt;private scopes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Subsequently, an application will NOT be able to use other scopes than those which have been registered thus. In particular, the Authorize controller verifies from the beginning of the process that the scopes requested in the request appear in the list of Scopes available for the application (Available scopes).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Granted scopes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An application transmits the scopes in the authorization request (call to Authorize endpoint). They must be in the list of Scopes available for an application.&lt;/p&gt;
&lt;p&gt;Some of these scopes are &lt;strong&gt;Requested Scopes&lt;/strong&gt;. A good understanding of the subject requires &lt;a href='https://static.oa.dnc.global/-Sujets-communs-a-Oauth-2-et-OpenID-Connect-.html#demandesdeconsentementsurlesporteesdautorisationscopes' class='spip_in' hreflang='fr'&gt;distinguishing two positions of the end user from the owner of the data&lt;/a&gt;, as defined by the OAuth 2.0 standard (see &lt;a href='https://static.oa.dnc.global/-Sujets-communs-a-Oauth-2-et-OpenID-Connect-.html#porteedelautorisationscope' class='spip_in' hreflang='fr'&gt;Port&#233;e de l'autorisation (Scope)&lt;/a&gt;). In summary, it is necessary to consider the scopes in two cases&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb3-3' class='spip_note' rel='appendix' title='As expected by the standard: see Port&#233;e de l'autorisation (Scope).' id='nh3-3'&gt;3&lt;/a&gt;]&lt;/span&gt;:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; either &lt;strong&gt;the protected data is the property of the user&lt;/strong&gt;, and the scopes must be understood as an access request of the application to this data: the application will have to obtain the consent of the user for to pursue,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; or &lt;strong&gt;the application (in the broad sense)&lt;/i&gt; &#034;owns&#034; the protected data&lt;/strong&gt;, and the scopes must be understood as an authorization granted by the application.&lt;/p&gt;
&lt;p&gt;In the second case (if the data belongs to the application) an application can modulate the privileges granted to the user according to the profile of the latter which is translated by the scopes.&lt;/p&gt;
&lt;p&gt;If the application does not provide for modulating granted privileges, the designer can use the allowed scopes or the default scope.&lt;/p&gt;
&lt;p&gt;Once the authentication has been performed (and, if necessary, the scopes have been accepted by the end user), the scopes become granted scopes.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Embed additional declarations into the identity token&lt;/h3&gt;
&lt;p&gt;Note that the authentication server is transparent with respect to non-reserved scopes and &#034;non-standard&#034; declarations (claims): it is up to the protected resource to define what must be done with it within the framework of a given application.&lt;/p&gt;
&lt;p&gt;OAuthSD offers three complementary approaches for incorporating additional declarations into the identification token:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. OAuthSD: scope &#034;privileges&#034;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This scope is unique to OAuthSD as part of the OpenID Connect flows.&lt;/p&gt;
&lt;p&gt;The scope &#034;privileges&#034; includes the claims &#034;scope&#034; and &#034;profil&#034;&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb3-4' class='spip_note' rel='appendix' title='Note that the claim &#034;profil&#034; and the scope &#034;profile&#034; must be distinguished. (...)' id='nh3-4'&gt;4&lt;/a&gt;]&lt;/span&gt; which correspond to the eponymous fields of the table users.&lt;/p&gt;
&lt;p&gt;It is up to a third party application to determine the values &#8203;&#8203;to be assigned to the &#034;scope&#034; claim. For this, OAuthSD offers two interface techniques:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;a href='https://static.oa.dnc.global/-Json-Web-Token-JWT-40-.html#addadditionalclaimstothejwttoken' class='spip_in'&gt;Add additional claims to the JWT token&lt;/a&gt;,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Use an &lt;a href='https://static.oa.dnc.global/-Techniques-et-code-du-serveur-OAuthSD-.html#apihttprest' class='spip_in' hreflang='fr'&gt;HTTP Rest service&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;If an application presents the &#034;privileges&#034; scope to the Authorize controller, the &#034;profile&#034; and &#034;scope&#034; declarations will be embedded in the UserInfos data. In this respect, it is a granted scope (Granted Scope) in the same way as the &#034;basic&#034;, &#034;email&#034; and so on. that control access to the data in the users table.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;In addition to this standard behavior, these statements will be embedded in the payload of the identity token.&lt;br class='autobr' /&gt;
Thus the identity of the application, the end user and its authorization staves is perfectly established by the signature of the JWT token.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Using the scope &#034;privileges&#034; claim &#034;scope&#034; for granting privileges in applications&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;OAuthSD groups the end user information in the users table. The field 'scope' is of the type text and can therefore accommodate any kind of data to describe the profile of the user or give the list of his privileges. For example, you can create a 'profiler' data object and store it in Json format.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. For developers: a technique to programmatically embed additional declarations in the JWT token&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In addition to the previous techniques, OAuthSD allows to incorporate additional declarations into the JWT token. Although we present this method last, it is arguably the one that will be of most interest to developers. DnC applies this technique to realize DnC SaaS.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;i-Tego SaaS: a system to deliver applications as a service&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#034;https://buy.dnc.global/?lang=en&#034; class='spip_out' rel='external'&gt;i-Tego SaaS&lt;/a&gt; couples an online sales system to an OIDC server (OAuthSD of course) in order to lease services online .&lt;/p&gt;
&lt;p&gt;The leased software is configured as a client application of the OIDC server.&lt;/p&gt;
&lt;p&gt;At the time of end-user authentication, the Authorize controller identification module calls the online sales system to verify that the user is up to date with their payments.&lt;/p&gt;
&lt;p&gt;This step also allows &lt;strong&gt;define end user privileges on the application&lt;/strong&gt;, for example:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; validation of any application options taken with the subscription,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; limited rights (consultation only ...) during a grace period after expiry,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; etc.&lt;br class='autobr' /&gt;
The privileges are incorporated into the payload of the ID Token in the form of additional declarations. The names of the declarations and the values &#8203;&#8203;transmitted are specific to the application in question.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb3-1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh3-1' class='spip_note' title='Footnotes 3-1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;So special that they have nothing to do with a scope of authorization, but appear rather as a way to tune the flow. Is there perhaps a semantic flaw in OpenID Connect? Note that IBM refers to this as &#034;client metadata&#034;, which seems relevant.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb3-2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh3-2' class='spip_note' title='Footnotes 3-2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;How much should we extend the definition of scopes? We discuss the issue here: &lt;a href=&#034;#tenderprofile&#034; class='spip_ancre'&gt;/web/-OpenID-Connect-UserInfo-.html&lt;/a&gt;. Facebook defines a hundred scopes! But, from the perspective of controlling access to web-services and APIs, the use of scopes can go much further than the mere modulation of Userinfo. Google makes extensive use of scopes to allow access to different APIs. GitHub uses scopes to modulate user access to different features. These are proprietary applications and therefore a very particular implementation of OpenID Connect that shows two things: OpenID connect is much more than an SSO; In contrast to the idea of &#8203;&#8203;a universal authentication system (allowing access to any application with a single identifier), control of access to applications and data can only be done in a corporate realm.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb3-3'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh3-3' class='spip_note' title='Footnotes 3-3' rev='appendix'&gt;3&lt;/a&gt;] &lt;/span&gt;As expected by the standard: see &lt;a href='https://static.oa.dnc.global/-Sujets-communs-a-Oauth-2-et-OpenID-Connect-.html#porteedelautorisationscope' class='spip_in' hreflang='fr'&gt;Port&#233;e de l'autorisation (Scope)&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb3-4'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh3-4' class='spip_note' title='Footnotes 3-4' rev='appendix'&gt;4&lt;/a&gt;] &lt;/span&gt;Note that the claim &#034;profil&#034; and the scope &#034;profile&#034; must be distinguished. The definition of the scopes is well entangled!&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Two-Factor Authentication (2FA)</title>
		<link>https://static.oa.dnc.global/-Discover-.html#twofactorauthentication2fa</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-Discover-.html#twofactorauthentication2fa</guid>
		<dc:date>2020-06-19T09:00:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;New EU regulation will require a two-factors authentication for payment, the 'Strong Customer Authentication' (SCA) which has come into force in September 2019. &lt;br class='autobr' /&gt;
The need for 2-steps validation is also felt for connecting users to sensitive applications. The principle of two-steps validation (Two Factors Authentication, 2FA) is well known for several years and implemented in different ways, the most common being the code sent by SMS. &lt;br class='autobr' /&gt;
OAuthSD Implements two-factors Authentication by SMS or (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-Discover-.html" rel="directory"&gt;Discover&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L150xH150/arton115-4ff9c.png?1793881898' width='150' height='150' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;New EU regulation will require a two-factors authentication for payment, the 'Strong Customer Authentication' (SCA) which has come into force in September 2019.&lt;/p&gt;
&lt;p&gt;The need for 2-steps validation is also felt for connecting users to sensitive applications. The principle of two-steps validation (Two Factors Authentication, 2FA) is well known for several years and implemented in different ways, the most common being the code sent by SMS.&lt;/p&gt;
&lt;p&gt;OAuthSD Implements two-factors Authentication by SMS or with Google Authenticator.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;&lt;strong&gt;What is 2FA ?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Two Factor Authentication, also known as 2FA, two step verification or TFA (as an acronym), is an extra layer of security that is known as &#8220;multi factor authentication&#8221; that requires not only a password and username but also something that the user owns, that is with them and that no one else owns or knows about.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;After login, give a second proof&lt;/h3&gt;
&lt;p&gt;The process begins as usual, the end-user giving his login and password :&lt;/p&gt;
&lt;p&gt;&lt;span class='spip_document_62 spip_documents spip_documents_center'&gt;
&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L467xH582/login_std_en-1f508.png?1793839162' width='467' height='582' alt=&#034;&#034; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;She/he is asked to provide a second proof of identity : OAuthSD offers the classic method : SMS or Google Authenticator. We add our own highly securised identification system : DnC's IdentMaster.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;2FA by SMS&lt;/h3&gt;
&lt;p&gt;If this first step ends successfully, OAuthSD continues on a request for code by SMS:&lt;/p&gt;
&lt;p&gt;&lt;span class='spip_document_76 spip_documents spip_documents_center'&gt;
&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L427xH252/2fa_sms_demande_code-da444.png?1793835387' width='427' height='252' alt=&#034;&#034; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The SMS is sent to the smartphone number registered with the user's profile&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb4-1' class='spip_note' rel='appendix' title='The SMS identification method will fail if no number has been registered (...)' id='nh4-1'&gt;1&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;After confirmation, consent is requested if necessary, as usual:&lt;/p&gt;
&lt;p&gt;&lt;span class='spip_document_67 spip_documents spip_documents_center'&gt;
&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L470xH533/consent_std_fr-b8e2d.png?1793835387' width='470' height='533' alt=&#034;&#034; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;2FA with Google Authenticator&lt;/h3&gt;
&lt;p&gt;Google Authenticator is a 2FA system that generates a TOTP.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is TOTP ?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;TOTP is a short form for Time-based One-time Password (usually called Token) which is password that can only be used once and is only valid to be used in a defined time range. Usually TOTP generators generate new passwords every defined tens of seconds.&lt;/p&gt;
&lt;p&gt;This necessitates to register OAuthSD as a Google Authenticator application&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb4-2' class='spip_note' rel='appendix' title='Note that OAuthSD is registered on Google Authenticator, not client (...)' id='nh4-2'&gt;2&lt;/a&gt;]&lt;/span&gt;. This is what the QRCode is used for. See many how-to on the Web. This is a one-time action for the smartphone life time: once it is done, GA will display a code every 30s : nothing to remember!&lt;/p&gt;
&lt;p&gt;&lt;span class='spip_document_63 spip_documents spip_documents_center'&gt;
&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L471xH618/login_2fa_ga_en-0f4a3.png?1793839162' width='471' height='618' alt=&#034;&#034; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After confirmation, Consent is asked if necessary, as usual.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why Google Authenticator ?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Google Authenticator has been provided by Google for several years and proved a user-friendly process. Many people have Google Authenticator (for free) on their smartphone, and would probably have difficulties adopting an other application.&lt;/p&gt;
&lt;p&gt;What about tracking? Applications delegate user identification to OAuthSD, this means Google see the OAuthSD server, not the applications. Google knows that a user is related to OAuthSD, but doesn't see the relation with the application ... provided there is no tracking leakage elsewhere in this application!&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;TFA with DnC's IdentMaster&lt;/h3&gt;
&lt;p&gt;We have developped &lt;a href='https://static.oa.dnc.global/-Identifier-l-utilisateur-final-.html#lafindesmotsdepassenopassconnect' class='spip_in' hreflang='fr'&gt;DnC's IdentMaster&lt;/a&gt;, a passwordless mobile application that can be used as first as well as second authentication method.&lt;/p&gt;
&lt;p&gt;With the DnC's IdentMaster application installed on your mobile, you just need to scan the QR-Code presented by the application to open your OpenID Connect session:&lt;/p&gt;
&lt;p&gt;&lt;span class='spip_document_100 spip_documents spip_documents_center'&gt;
&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L398xH497/smartconnect_login-f0cb6.png?1793814979' width='398' height='497' alt=&#034;Login SmartConnect - NopassConnect&#034; title=&#034;Login SmartConnect - NopassConnect&#034; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Configure 2FA on OAuthSD&lt;/h3&gt;
&lt;p&gt;A request for a second validation is presented to the end user:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; if the reserved scope &#034;tfa&#034; is present in the authorization request and if the application has been registered on the server with the scope 'tfa'.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; If the LOGIN_WITH_TFA configuration constant is set to true, the 2FA form will always be presented to the end user after the login form.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; the TFA_PROVIDER configuration constant is used to define the second mode of identification (&#034;gangsta&#034;, &#034;checkbysms &#034;, &#034; smartconnect &#034;...).&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;And then ?&lt;/h3&gt;
&lt;p&gt;In the current state of development, OAuthSD offers three methods for 2FA: TFA by SMS (the classic solution!), Google Authenticator and SmatConnect.&lt;/p&gt;
&lt;p&gt;Other ID providers will follow soon, including our own (= your private) for a top level security.&lt;/p&gt;
&lt;p&gt;We may develop any private system suited for the particular needs of our customers, as we did with the &lt;a href='https://static.oa.dnc.global/-Identifier-l-utilisateur-final-.html#identificationopenidconnectavecidcardaramis' class='spip_in' hreflang='fr'&gt;OpenID Connect Identification with ID Card : Aramis&lt;/a&gt; .&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb4-1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh4-1' class='spip_note' title='Footnotes 4-1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;The SMS identification method will fail if no number has been registered for the user trying to login.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb4-2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh4-2' class='spip_note' title='Footnotes 4-2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;Note that OAuthSD is registered on Google Authenticator, not client applications. The advantage of delegation of authentication is therefore retained to prohibit the tracking of end-user navigation.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>How does OIDC contribute to the ZTNA approach?</title>
		<link>https://static.oa.dnc.global/-Discover-.html#howdoesoidccontributetotheztnaapproach</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-Discover-.html#howdoesoidccontributetotheztnaapproach</guid>
		<dc:date>2020-03-27T09:03:48Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;ZTNA: &#034;Zero-trust&#034; access to the network. This concept formalized in 2010 by the research firm Forrester aims to give users the minimum necessary privileges (unlike access to the network by Virtual Private Network, VPN). OpenID Connect provides certain responses in this area, in particular for in-depth protection, beyond controlling access to the network. &lt;br class='autobr' /&gt;
In the context of COVID-19, telework leads many employees to access their company network by means of a VPN tunnel from the personal (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-Discover-.html" rel="directory"&gt;Discover&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L150xH79/arton197-48ab9.png?1793881898' width='150' height='79' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;ZTNA: &#034;Zero-trust&#034; access to the network. This concept formalized in 2010 by the research firm Forrester aims to give users the minimum necessary privileges (unlike access to the network by Virtual Private Network, VPN).&lt;br class='autobr' /&gt;
OpenID Connect provides certain responses in this area, in particular for in-depth protection, beyond controlling access to the network.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;In the context of COVID-19, telework leads many employees to access their company network by means of a VPN tunnel from the personal computer or - absolute horror - the family computer. Checks should be made at this level.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Principles of ZTNA&lt;/h3&gt;
&lt;p&gt;It is about protecting the information system (IS) and sensitive data based on the principle that nothing and no one should be trusted. From user equipment to application, there are three general principles to apply:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Control of the materials used to access the IS&lt;/strong&gt;: The sole control of the end user is not sufficient, it is also necessary to control the user agent by means of which she/he accesses the network and the applications, and his/her hardware also.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Multi-factor authentication&lt;/strong&gt;: Authentication (at least two factors, or Two Factors Authentication, TFA) requires multiple proofs of identity from the end user.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Minimum privilege&lt;/strong&gt;: Give users only access to the resources or data they need to perform their tasks.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;How is OpenID Connect compared to this principles?&lt;/h3&gt;
&lt;p&gt;1. OpenID Connect intervenes at the application level. OIDC cannot therefore replace the means of identifying and controlling the material layers. However, the Authorization Code Grant, when applied to &#034;back-end&#034; applications and services, provides a way to identify these components at the hardware level. On this subject, see: &lt;a href='https://static.oa.dnc.global/-Json-Web-Token-JWT-40-.html#verifyingtheoriginoftherequestreceivedbyaresourceserver' class='spip_in'&gt;Verifying the origin of the request received by a resource server&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;2. Multi-factor identification is not part of the OpenID Connect standard. The identification layer of the Authorize controller must implement several identification means, &lt;a href='https://static.oa.dnc.global/-Discover-.html#twofactorauthentication2fa' class='spip_in'&gt;OAuthSD provides multi-factor identification&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;3. By allowing identity tokens and privilege information to be conveyed by the identity token (ID Token) and guaranteeing its integrity by means of the token signature, OpenID Connect opens a means of controlling access to applications and data. &lt;a href='https://static.oa.dnc.global/-Json-Web-Token-JWT-40-.html#addadditionalclaimstothejwttoken' class='spip_in'&gt;OAuthSD allows the transmission of privileges&lt;/a&gt;.&lt;br class='autobr' /&gt;
However, it all depends on what the protected applications and resources will do with this information.&lt;/p&gt;
&lt;p&gt;&lt;span style = &#034;color: red;&#034;&gt; Disclaimer: It is important to note that OpenID Connect, like any other authentication system, does not ensure the security of applications or data services, but provides them with more complete and reliable information about the end user than simpler methods. On the one hand, security will depend on what applications and services do with this information, on the other hand, their intrinsic security as well as that of the network.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In conclusion :&lt;/p&gt;
&lt;p&gt;Applications of the ZTNA principles most often aim to replace access by VPN, and are therefore interested in the transport layer. Identification and control of hardware integrity is still the poor relation of security solutions, OIDC adds nothing.&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt; OpenID Connect extends security at the application level (in the upper layer of the OSI model) and therefore finds its place in a complete ZTNA approach.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;However, the difficulty of OIDC lies in the need to adapt applications and protected data resources by incorporating an OIDC module into them. See: &lt;a href='https://static.oa.dnc.global/-Ressources-pour-les-developpeurs-.html' class='spip_in' hreflang='fr'&gt;Adaptation des applications&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Prospects for the evolution of OAuthSD&lt;/h3&gt;
&lt;p&gt;Note that the OAuthSD server already integrates some security functionalities at the level of the hardware and transport layers, and will bring more and more as it is developed, the OIDC server becoming part of OAuthSD.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_ps'&gt;&lt;p&gt;In this perspective, the development effort will focus on:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; physical identification of the user's machine at the packet (IP address) and frame (MAC address) level,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; integrity check of the remote host.&lt;/p&gt;
&lt;p&gt;One solution would be to develop &lt;strong&gt;a specific user agent&lt;/strong&gt; which, seen from OIDC as an application, would collect physical information and communicate it to the OAuthSD server. This application should perform integrity checks, for example by uploading data collected from security software residing on the host.&lt;/p&gt;&lt;/div&gt;
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Verifying the origin of the request received by a resource server</title>
		<link>https://static.oa.dnc.global/-Json-Web-Token-JWT-40-.html#verifyingtheoriginoftherequestreceivedbyaresourceserver</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-Json-Web-Token-JWT-40-.html#verifyingtheoriginoftherequestreceivedbyaresourceserver</guid>
		<dc:date>2019-10-31T15:15:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;The transmission of tokens to protected resources implies that the latters are receptive to tokens of any origin. This presents an opportunity for an attacker (a foreign application) to exploit a compromised or stolen token. &lt;br class='autobr' /&gt;
Once more, the analysis reveals that we are only able to ensure data security in the case of the &#034;Authorization Code&#034; flow. &lt;br class='autobr' /&gt;
Consideration about the security of token transmission to resource servers (RS) &lt;br class='autobr' /&gt;
The proposed RFC 6749 standard is quite clear on the need to (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-Json-Web-Token-JWT-40-.html" rel="directory"&gt;Json Web Token (JWT)&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L93xH94/arton149-a6631.png?1793814390' width='93' height='94' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;The transmission of tokens to protected resources implies that the latters are receptive to tokens of any origin. This presents an opportunity for an attacker (a foreign application) to exploit a compromised or stolen token.&lt;/p&gt;
&lt;p&gt;Once more, the analysis reveals that we are only able to ensure data security in the case of the &#034;Authorization Code&#034; flow.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Consideration about the security of token transmission to resource servers (RS)&lt;/h3&gt;
&lt;p&gt;The proposed &lt;a href=&#034;https://datatracker.ietf.org/doc/rfc6749/&#034; class='spip_out' rel='external'&gt;RFC 6749&lt;/a&gt; standard is quite clear on the need to use access tokens only between authorized parties (&#167; 10.3.):&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;Access token credentials (as well as any confidential access token attributes) MUST be kept confidential in transit and storage, and only shared among the authorization server, the resource servers the access token is valid for, and the client to whom the access token is issued.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If all the resource servers (RS) to which the tokens are transmitted belong to the same organization (corporate realm), we can hope that the tokens will not be compromised, that is to say accessible to applications outside the organization. It can also be assumed that the resources are located in a subnet protected by a firewall that prohibits application requests from outside the subnet. It can then be assumed that any application directed to the resources is allowed to receive a response.&lt;/p&gt;
&lt;p&gt;This is called &#034;trusted applications&#034;. But note that, from the point of view of a resource server, trust does not result from a particular character of the application, but from the fact that it is located inside a &lt;i&gt;space of confidence that we assume inaccessible to other applications&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;However, even in this case, a well-crafted attack could lead to stealing the token and exploit it with a foreign application.&lt;/p&gt;
&lt;p&gt;In any case, the assumptions are never very good in terms of security.&lt;/p&gt;
&lt;p&gt;Of course, if you address a token to a foreign resource, you must consider the token as a compromise because it can be used by a foreign application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rather than rest on a notion of confidence area and trustable applications, the resource server must be able to verify the legitimacy of the token holder.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But how ?&lt;/p&gt;
&lt;p&gt;The specification clearly describes this limitation (section 10.3):&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;This specification does not provide any methods for the resource server to ensure that an access token presented to it by a give client was issued to that client by the authorization server.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Two &lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#typologiedesapplicationsauregarddelasecuritedesdonnees' class='spip_in' hreflang='fr'&gt;types of applications&lt;/a&gt; must be distinguished with regard to the origin of the request:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;applications &#034;with back-end&#034;&lt;/strong&gt;, ie sending their requests from a server: the request will be sent with the IP of the application server.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; The &lt;strong&gt;applications without back-end&lt;/strong&gt;, issuing their request from a user-agent (the browser of the end user, the operating system of the host computer of a native application etc. .): the request will be issued with the IP of the user-agent connection, possibly masked by a proxy.&lt;/p&gt;
&lt;p&gt;In the current state of development of OAuthSD, we will only consider &#034;back end applications&#034; whose IP is related to their identity. In other words, &lt;strong&gt;we are only able to ensure data security in the case of the &#034;Authorization Code&#034; flow&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;OAuthSD offers two ways to verify the legitimacy of a &#034;back-end&#034; application presenting the token based on the IP of origin:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; by introspection with the IP of the applicant,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; with the additional declarations of the JWT token 'cip_hash' or 'cip'.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;IP of the client application&lt;/strong&gt;, to which the IP of the applicant will be compared, are determined as follows:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; if the client application is registered with a non-empty 'ip' field of the 'clients' table, OAuthSD will use this value,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Otherwise, the IP (s) will be obtained by querying the DNS with the host name of the return URL (redirect URI) registered for the application&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb5-1' class='spip_note' rel='appendix' title='It is therefore important to ensure the integrity of the DNS. It would be (...)' id='nh5-1'&gt;1&lt;/a&gt;]&lt;/span&gt;&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb5-2' class='spip_note' rel='appendix' title='This method can introduce an unwanted response time of the resource, which (...)' id='nh5-2'&gt;2&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The general problem is developed here: &lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#typologiedesapplicationsauregarddelasecuritedesdonnees' class='spip_in' hreflang='fr'&gt;Typology of applications with regard to data security&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Check by introspection with the IP of the applicant&lt;/h3&gt;
&lt;p&gt;The draft &lt;a href=&#034;https://datatracker.ietf.org/doc/rfc7662/&#034; class='spip_out' rel='external'&gt;RFC 7662&lt;/a&gt; implicitly recognizes the question, but does not give a standardized answer. It is indeed indicated in section 2.1:&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;The introspection endpoint MAY accept other OPTIONAL parameters to provide further context to the query. For instance, an authorization server may desire to know the IP address of the client accessing the protected resource to determine if the correct client is likely to be presenting the token. The definition of this or any other parameters are outside the scope of this specification, ....&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;OAuthSD do the following:&lt;br class='autobr' /&gt;
If the RS calling the Introspection endpoint transmits the IP address of its own requestor using the 'requester_ip' parameter, introspection verifies that this IP address is in the same subnet as the client application identified by the 'aud' declaration.&lt;/p&gt;
&lt;p&gt;In order to avoid responding to a malware &lt;strong&gt;a protected resource receiving an identity token must validate it by passing the parameter 'requester_ip'&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;On OAuthSD, for this verification to be effective, it is necessary to:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; fill in the IP of the client applications when they are registered (otherwise the domain IP of the return URI will be used),
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; set to 'true' the configuration constant CHECK_CLIENT_IP.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes:&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; In general, the IP of the applications using the Introspect or UserInfo controllers is verified as indicated above, without being necessary to provide the 'requester_ip' parameter, in order to verify that it is well of the registered client application. It will be understood that in the case of a request made to a resource server that calls the Introspect controller, it is necessary to provide the IP of the applicant, otherwise it would be the IP of the resource server that would be monitored, not the one of the requester.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Note that there is also an optional verification of membership in the same domain or subdomain (see configuration constant CHECK_SAME_DOMAINS) performed by the Introspect controller.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Examples of calling introspection with the 'requester_ip' parameter&lt;/h3&gt;
&lt;p&gt;By header:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Method Bearer + parameters by Post&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data1&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'requester_ip'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$_SERVER&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'SERVER_ADDR'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$authorization&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;Authorization: Bearer &#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$res1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'id_token'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$introspection_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Authorization: Bearer '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$res1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'id_token'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POST&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POSTFIELDS&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_exec&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_exec&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #339933;&#034;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/0c91825be9734352f78262c0c3c99dae.txt'&gt;Download&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;By Post :&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Post Methode &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data1&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'token'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$res1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'id_token'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'requester_ip'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$_SERVER&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'SERVER_ADDR'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$trace&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$_SESSION&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'trace'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$trace&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'----- Step 3 : JWT Introspection -----'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;&lt;br /&gt;&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$trace&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'access token : '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$access_token&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;&lt;br /&gt;&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$trace&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'data : '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;a href=&#034;http://www.php.net/print_r&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;print_r&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data1&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;&lt;br /&gt;&lt;br /&gt;&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$_SESSION&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'trace'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$trace&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$introspection_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_TIMEOUT&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;100&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;//100 : DEBUG&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POST&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_SSL_VERIFYPEER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;false&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POSTFIELDS&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_exec&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_exec&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #339933;&#034;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/ca59113914b9b8da8220943fd5c3022c.txt'&gt;Download&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;See also:&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectintrospectionintrospectionendpoint' class='spip_in' hreflang='fr'&gt;API Open ID Connect : Introspection (Introspection Endpoint)&lt;/a&gt;,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;a href='https://static.oa.dnc.global/-Json-Web-Token-JWT-40-.html#moreaboutintrospection' class='spip_in'&gt;More about Introspection&lt;/a&gt;,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;a href='https://static.oa.dnc.global/-Sujets-communs-a-Oauth-2-et-OpenID-Connect-.html#envoidunerequeteaunserveurderessourcers' class='spip_in' hreflang='fr'&gt;Envoi d'une requ&#234;te &#224; un serveur de ressource (RS)&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Check with the JWT token 'cip_hash' or 'cip' additional claim&lt;/h3&gt;
&lt;p&gt;OAuthSD introduces a 'cip' or 'cip_hash' claim into the payload of the JWT token to enable verification of the IP of the applicant&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb5-3' class='spip_note' rel='appendix' title='We extol the interest of the signed JWT identity token to link the identity (...)' id='nh5-3'&gt;3&lt;/a&gt;]&lt;/span&gt;&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb5-4' class='spip_note' rel='appendix' title='Can the 'aud' declaration be used to transmit this URL? This seems to be the (...)' id='nh5-4'&gt;4&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This verification can be done locally, or by introspection called as described above with the parameter 'requester_ip'.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; 'cip_hash'&lt;/strong&gt;&lt;br class='autobr' /&gt;
In the general case, an application has only one IP. In this case, it is this claim that will be generated, and not 'cip', with the advantage of hiding the IP of the client application by transmitting it in the form of a hash. If the application has multiple IPs, and the FORCE_CIP_HASH configuration constant is true, the first IP in the list will be used to generate the declaration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; 'cip'&lt;/strong&gt;&lt;br class='autobr' /&gt;
The 'cip' claim is generated when the IPs of the client application are multiple. Its value is a suite of space-separated IPv4.&lt;br class='autobr' /&gt;
However, if the FORCE_CIP_HASH configuration constant is true, the 'cip_hash' claim will still be issued instead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes:&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; One of these additional claims will always be added to the JWT identity token payload of the OpenID Connect Authorization Code stream, but not in its OAuth 2.0 counterpart.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; This method has the advantage of allowing verification by the protected resource (remember that the payload of the JWT token is simply URL64-encoded ). This is useful for blocking an attack without introspection, or when validation of the JWT token is done locally without introspection.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; The Introspect controller will also perform IP verification with these claims. In the case of a resource server, it is necessary to transmit the parameter 'requester_ip'.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; In principle, there should not be a proxy in front of an authentication server, which must have access to the network (including its own router-firewall). Any proxy located between the network and the authentication server must faithfully relay the IPs. Of course, reverse proxies are prohibited in front of an authentication server.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Alternate method: with JWT token audience claim&lt;/h3&gt;
&lt;p&gt; The oauth2-server-php library reduces &#034;aud&#034; to the client_id client id.&lt;/p&gt;
&lt;p&gt;Yet the specification provides:&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;
It MAY also contain identifiers for other audiences. In the general case, the aud value is an array of case sensitive strings.&#034;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Some implementations of OpenID Connect consider that the audience claim is application-level, which means that its value is a convention established within the same organization (corporate realm) between the application and the resource server.&lt;/p&gt;
&lt;p&gt;With this in mind, the &#034;aud&#034; claim is a table of strings that can contain the IPs of the applications authorized to present the token. This will allow the resource server to directly check the IP and thus block some malware without having to issue an introspection request.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Since the audience claim is defined in the oauth2-server-php library, we must modify it to integrate the IP of the client application (provided when the application was registered on the server) in the &#034;aud&#034; claim. This development is underway.&lt;/i&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Taking into account a &#034;trusted proxy&#034;&lt;/h3&gt;
&lt;p&gt;The question is whether one can trust the HTTP_X_FORWARDED_FOR declaration by which a proxy retransmits the IP of the original request.&lt;/p&gt;
&lt;p&gt;Any proxy located between the Internet and the authentication server is controlled by the organization and can be considered trusted.&lt;br class='autobr' /&gt;
OAuthSD allows to designate these proxies by their IP in the configuration constant TRUSTED_PROXIES. If the USE_PROXY configuration constant is true, OAuthSD will replace for IP verification these IPs by the one provided by the HTTP_X_FORWARDED_FOR declaration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes:&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Among the trusted proxies we can find the reverse proxies whose function is to provide a cache system. The very principle of authentication excludes the use of cache.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Among the trusted proxies are also load balancers. Some of these proxies do not have a fixed IP. In this case, it will be impossible to apply the client verification by IP.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; It will be necessary to verify that the trusted proxy only retransmits the real IP of the request by the declaration HTTP_X_FORWARDED_FOR, unless an identical mechanism makes it possible to recognize the trusted upstream proxies.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Note that this concept of trusted proxy is the opposite of what a large number of Internet users refer to as the proxy they expect to hide their IP address. Such proxies call themselves &#034;anonymous&#034; and are referred to as &#034;private proxy&#034;, which has nothing to do with the fact that they are private, but that they aim to ensure the anonymity (privacy) of the user.&lt;br class='autobr' /&gt;
OAuthSD has a &#034;SAFEIP&#034; feature to block questionable IP addresses, most of which are those of such proxies. We are in the presence of two complementary mechanisms: The taking into account of trusted proxies allows to authorize the proxies of the LAN / Web interface, while the &#034;SAFEIP&#034; function will block the suspicious proxies of the Web.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb5-1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh5-1' class='spip_note' title='Footnotes 5-1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;It is therefore important to ensure the integrity of the DNS. It would be best if the DNS of the applications and the DNS to which the server is accessing (preferably a local DNS) are in a trusted space, and / or protected by DNSSEC.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb5-2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh5-2' class='spip_note' title='Footnotes 5-2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;This method can introduce an unwanted response time of the resource, which is why OAuthSD offers the registration of the IP.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb5-3'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh5-3' class='spip_note' title='Footnotes 5-3' rev='appendix'&gt;3&lt;/a&gt;] &lt;/span&gt;We extol the interest of the signed JWT identity token to link the identity of the end user, the application and the authorization scopes. However, a HTTP resource server can only identify the origin of the request by its IP in the server-server relationship. The identifier of the client transmitted by the token is not convincing since the token may have been &#034;stolen&#034;. It is therefore essential to incorporate in the JWT token the IP of the legitimate application so that a resource server can check it.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb5-4'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh5-4' class='spip_note' title='Footnotes 5-4' rev='appendix'&gt;4&lt;/a&gt;] &lt;/span&gt;Can the 'aud' declaration be used to transmit this URL? This seems to be the case if we stick to the JWT specification for which 'aud' can be a list of URIs. But the &lt;a href=&#034;https://openid.net/specs/openid-connect-core-1_0.html specification&#034; class='spip_out' rel='external'&gt;OpenID Connect&lt;/a&gt; is more restrictive:&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;
aud&lt;br class='autobr' /&gt;
MANDATORY. Audience (s) for which this identifier token is intended. It MUST contain the client_id OAuth 2.0 of the trusted party as the audience value. It MAY also contain identifiers for other audiences. In the general case, the aud value is an array of case-sensitive strings. In the usual special case where there is an audience, the aud value MAY be a case-sensitive string.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As a result, the oauth2-server-php library sets the value of the 'aud' parameter to the identifier of the client application. The 'aud' declaration is not the right choice for OAuthSD to propagate client IP.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>OpenID Connect : Grant Type flows</title>
		<link>https://static.oa.dnc.global/-OpenID-Connect-29-.html#openidconnectgranttypeflows</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-OpenID-Connect-29-.html#openidconnectgranttypeflows</guid>
		<dc:date>2019-09-04T20:03:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;The Grant Type flows specifically defined for the OpenID Connect protocol are: Authorization Code Grant, Implicit Grant, Hybrid Flow. &lt;br class='autobr' /&gt; See also: OpenID Connect : Summary of all authorization flows. &lt;br class='autobr' /&gt;
Authorization Code Flow (spec. : Authorisation code flow) - the most commonly used stream for traditional web applications as well as native / mobile applications ( with security concerns ). Involves an initial redirection of the browser to the authentication server for authentication and user (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-OpenID-Connect-29-.html" rel="directory"&gt;OpenID Connect&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L150xH150/arton103-56bc0.png?1793881898' width='150' height='150' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;The Grant Type flows specifically defined for the OpenID Connect protocol are:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; Authorization Code Grant,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; Implicit Grant,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; Hybrid Flow.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;div style=&#034;clear:both;&#034;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;See also: &lt;a href='https://static.oa.dnc.global/-Discover-.html#openidconnectsummaryofallauthorizationflows' class='spip_in'&gt;OpenID Connect : Summary of all authorization flows&lt;/a&gt;.&lt;/p&gt;
&lt;div style=&#034;clear:both;&#034;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html' class='spip_in' hreflang='fr'&gt;Authorization Code Flow&lt;/a&gt;&lt;/strong&gt; (spec. : &lt;a href=&#034;http://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth&#034; class='spip_out' rel='external'&gt;Authorisation code flow&lt;/a&gt;) - the most commonly used stream for traditional web applications as well as native / mobile applications ( with security concerns ). Involves an initial redirection of the browser to the authentication server for authentication and user consent, and then a second request from the client application to retrieve the ID token.&lt;/p&gt;
&lt;p&gt;The flow diagram is identical to its counterpart of OAuth 2.0, the difference being the Token Token that accompanies the access token.&lt;/p&gt;
&lt;p&gt;The signing of this token provides protected resource servers (RS) with the opportunity to validate the token locally, provided that a key form is known to them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Authorization code flow provides optimal security because:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; the application secret, resident on the server, is protected,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; tokens are not revealed to the browser (only run in a server-server connection),
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; the client application can be authenticated, just like the end user,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; the signature of the token binds indissolubly: the identity of the end user, the identity of the application, the scope of the authorization.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The implementation of this flow within the framework of OAuthSD is detailed here: &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html' class='spip_in' hreflang='fr'&gt;OpenID Connect : Autorisation via un code (Authorization Code Flow)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href='https://static.oa.dnc.global/-Autorisation-implicite-.html' class='spip_in' hreflang='fr'&gt;Implicit Flow&lt;/a&gt;&lt;/strong&gt; (spec. : &lt;a href=&#034;http://openid.net/specs/openid-connect-core-1_0.html#ImplicitFlowAuth&#034; class='spip_out' rel='external'&gt;Implicit flow&lt;/a&gt;) - for browser-based applications that do not have a backend, such as a Javascript application. This stream is also used for single page applications (SPA). The identification token is received directly with the redirection response of the OP. No call to the return channel is required here. &lt;i&gt;Because of this, the client can not be authenticated&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;The implementation of this flow within the framework of OAuthSD is detailed here:&lt;a href='https://static.oa.dnc.global/-Autorisation-implicite-.html' class='spip_in' hreflang='fr'&gt;Autorisation implicite&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hybrid Flow&lt;/strong&gt; (spec. : &lt;a href=&#034;http://openid.net/specs/openid-connect-core-1_0.html#HybridFlowAuth&#034; class='spip_out' rel='external'&gt;Hybrid Flow&lt;/a&gt;) - Essentially a combination of code and implicit flows, rarely used. It reads: &#034;Allows the front-end and back-end application to receive tokens separately from each other&#034;. It seems more secure and just as easy to separately apply a flow of code and an implicit flow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Implicit and Hybrid flows are implemented by OAuthSD but their use is discouraged because they do not have the security advantages attached to OpenID Connect:
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; they compromise the application secret which is easily accessible to the public,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; they expose the tokens to the browser of the end user, which makes possible exploitation by a malware,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; they do not authenticate the client application.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes:&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; The features of OAuth 2.0 are integrated into the OpenID Connect protocol. All features of OAuth 2.0 and OpenID Connect can therefore be reached by OpenID Connect Endpoints, especially OAuth 2.0 Client / User Credentials. All flows are summarized here: &lt;a href='https://static.oa.dnc.global/-Decouvrir-.html#openidconnectetoauth20synthesedesfluxdautorisationgranttype' class='spip_in' hreflang='fr'&gt;OpenID Connect et OAuth 2.0 : Synth&#232;se des flux d'autorisation (Grant Type)&lt;/a&gt;.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1793811069' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; The Hybrid flow is only partially implemented by OAuthSD. This method is little used and can be advantageously replaced by a succession of calls to the first two.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>



</channel>

</rss>
