{"id":6662,"date":"2011-03-16T18:16:12","date_gmt":"2011-03-16T17:16:12","guid":{"rendered":"https:\/\/www.artera.net\/it\/blog\/?p=6662"},"modified":"2023-02-27T14:50:33","modified_gmt":"2023-02-27T14:50:33","slug":"autenticare-richieste-http-con-hmac","status":"publish","type":"post","link":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/","title":{"rendered":"Autenticare richieste HTTP con HMAC"},"content":{"rendered":"<p><a href=\"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png\"><img decoding=\"async\" class=\"alignleft size-full wp-image-6747\" title=\"ssl\" src=\"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png\" alt=\"\" width=\"100\" height=\"100\" \/><\/a>Tempo fa abbiamo realizzato un <a href=\"https:\/\/www.artera.net\/it\/blog\/programmazione\/pubblichiamo-un-servizio-tramite-json-rpc-con-zend-framework\">servizio per chiamare procedure remote tramite JSON-RPC<\/a>, ma il protocollo non prevede alcun metodo di autenticazione.<\/p>\n<p>Il compito di garantire l&#8217;autenticit\u00e0 del messaggio \u00e8 lasciato al programmatore, che pu\u00f2, ad esempio, scegliere uno dei metodi tradizionali che utilizzano il protocollo HTTP, come Basic access authentication o il poco pi\u00f9 sicuro Digest access authentication.<\/p>\n<p>Oggi vedremo come implementare il <strong>sistema di autenticazione HMAC<\/strong>.<\/p>\n<h3>HMAC<\/h3>\n<p>HMAC \u00e8 un metodo di autenticazione dei messaggi basato su una funzione di hash. L&#8217;algoritmo sfrutta una chiave segreta e parte del messaggio (o il messaggio per intero) per generare un codice &#8220;firma&#8221; che <strong>permette di verificare sia l&#8217;autenticit\u00e0 che l&#8217;integrit\u00e0 del messaggio<\/strong>.<\/p>\n<p>La <strong>robustezza del codice generato dipende direttamente dalla funzione di hash utilizzata<\/strong> e dalla dimensione della chiave segreta, ad esempio HMAC-MD5 sar\u00e0 meno sicuro di HMAC-SHA1 (MD5 e SHA-1 sono le funzioni di hash pi\u00f9 usate). Inoltre il rischio di collisione di un codice HMAC \u00e8 sostanzialmente inferiore rispetto al rischio di collisione della sua sola funzione di hash.<\/p>\n<h3>Quale funzione di hash usare?<\/h3>\n<p>A questo punto la prima cosa da decidere \u00e8 la funzione di hash da utilizzare, ma indipendentemente dalla scelta, il procedimento per generare il codice di autenticazione sar\u00e0 esattamente lo stesso.<\/p>\n<p>La funzione di hash va scelta in base alle richieste di sicurezza dell&#8217;applicazione in oggetto, e magari dalla disponibilit\u00e0 di librerie ad alto livello per la generazione dell&#8217;hash se si vuole facilitare il compito a sviluppatori esterni.<\/p>\n<p>La wikipedia inglese contiene un&#8217;interessante tabella di comparazione degli algoritmi di hashing e della loro robustezza.<\/p>\n<p>La funzione <strong>MD5 risulta un po&#8217; troppo debole<\/strong> per gli standard computazionali odierni, mentre la <strong>SHA-1 \u00e8 per ora ancora considerata sufficientemente sicura<\/strong>, anche se c&#8217;\u00e8 stato qualche raro caso di attacco riuscito a creare una collisione con un numero di operazioni molto inferiore rispetto a quelli che dovrebbero essere garantiti dalla lunghezza della chiave e <strong>sono presenti dei limiti teorici per i quali \u00e8 previsto che nei prossimi anni non sar\u00e0 troppo difficile bucare l&#8217;algoritmo<\/strong>.<\/p>\n<p>Sarebbe quindi lungimirante scegliere una funzione di hashing ancora pi\u00f9 robusta, come <a href=\"http:\/\/en.wikipedia.org\/wiki\/SHA-2\">SHA-256\/512<\/a> (SHA-2).<\/p>\n<h3>Implementazione<\/h3>\n<p>In PHP esiste gi\u00e0 una <a href=\"http:\/\/www.php.net\/manual\/en\/function.hash-hmac.php\">implementazione completa dell&#8217;algoritmo hmac<\/a>, che \u00e8 <a href=\"http:\/\/www.php.net\/manual\/en\/book.hash.php\">presente in php dalla versione 5.1.2<\/a>, mentre precedentemente era implementato in un <a href=\"http:\/\/pecl.php.net\/package\/hash\">modulo PECL<\/a>.<\/p>\n<p>Se il modulo non risulta presente, magari perch\u00e9 non abilitato nel php.ini, questa implementazione risulta completamente equivalente ma funziona solo con le funzioni md5 e sha1:<\/p>\n<p>[php]<br \/>\nif (!function_exists(&#8216;hash_hmac&#8217;)) {<br \/>\n\tfunction hash_hmac($hashfunc, $data, $key) {<br \/>\n\t\t$blocksize = 64;<br \/>\n\t\tif (strlen($key) &gt; $blocksize)<br \/>\n\t\t\t$key = pack(&#8216;H*&#8217;, $hashfunc($key));<br \/>\n\t\t$key = str_pad($key, $blocksize, chr(0x00));<br \/>\n\t\t$ipad = str_repeat(chr(0x36), $blocksize) ^ $key;<br \/>\n\t\t$opad = str_repeat(chr(0x5C), $blocksize) ^ $key;<\/p>\n<p>\t\t$hmac = pack(&#8216;H*&#8217;, $hashfunc( $opad.pack(&#8216;H*&#8217;, $hashfunc($ipad.$data)) ));<br \/>\n\t\treturn bin2hex($hmac);<br \/>\n\t}<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>Ora dobbiamo decidere quali sono i dati da firmare e, soprattutto, dove inserire la firma all&#8217;interno della richiesta.<br \/>\nQuesto metodo si pu\u00f2 utilizzare per qualsiasi richiesta HTTP ma riprendiamo l&#8217;esempio fatto nell&#8217;articolo su JSON-RPC e estendiamolo, firmando la richiesta.<\/p>\n<p>La funzione che generava la richiesta era:<\/p>\n<p>[php highlight=&#8221;8,11&#8243;]<br \/>\nfunction json_rpc_call($url, $method, $params=null) {<br \/>\n    $request = array(<br \/>\n        &#8216;method&#8217; =&gt; $method,<br \/>\n        &#8216;id&#8217; =&gt; 1<br \/>\n    );<br \/>\n    if (is_array($params))<br \/>\n        $request[&#8216;params&#8217;] = $params;<br \/>\n    $request = json_encode($request);<\/p>\n<p>    $ch = curl_init($url);<br \/>\n    curl_setopt($ch, CURLOPT_HTTPHEADER, array(<br \/>\n        &#8216;Content-Type: application\/json&#8217;,<br \/>\n        &#8216;Content-Length: &#8216; . strlen($request) . &#8220;\\\\r\\\\n&#8221;,<br \/>\n        $request<br \/>\n    ));<br \/>\n    curl_setopt($ch, CURLOPT_POST, true);<br \/>\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br \/>\n    $output = curl_exec($ch);<br \/>\n    curl_close($ch);<\/p>\n<p>    $output = json_decode($output, true);<\/p>\n<p>    if (!is_null($output[&#8216;error&#8217;]))<br \/>\n        throw new Exception($output[&#8216;error&#8217;][&#8216;message&#8217;]);<\/p>\n<p>    return $output[&#8216;result&#8217;];<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>I dati da firmare, sono ovviamente i parametri della richiesta, mentre per quanto riguarda il posizionamento della firma, utilizzeremo un header &#8220;Authorization: AuthHMAC CODICEBASE64&#8221;.<br \/>\nOpzionalmente potremmo inserirci anche l&#8217;identificativo utente corrispondente alla firma, in modo da utilizzare una diversa chiave segreta per ogni utente. In questo caso l&#8217;header sar\u00e0 &#8220;Authorization: AuthHMAC ID:CODICEBASE64&#8221;.<\/p>\n<p>[php highlight=&#8221;6,16,17,21&#8243;]<br \/>\n\/\/ Variabili d&#8217;esempio, queste normalmente arriverebbero da un database, dopo aver fatto il login<br \/>\n$user_id = 1337;<br \/>\n$user_secret = &#8216;mysecret&#8217;;<\/p>\n<p>function json_rpc_call($url, $method, $params=null) {<br \/>\n\tglobal $user_id, $user_secret;<\/p>\n<p>\t$request = array(<br \/>\n\t\t&#8216;method&#8217; =&gt; $method,<br \/>\n\t\t&#8216;id&#8217; =&gt; 1<br \/>\n\t);<br \/>\n\tif (is_array($params))<br \/>\n\t\t$request[&#8216;params&#8217;] = $params;<br \/>\n\t$request = json_encode($request);<\/p>\n<p>\t$hmac = hash_hmac(&#8216;sha1&#8217;, $request, $user_secret);<br \/>\n\t$hmac = base64_encode($hmac);<\/p>\n<p>\t$ch = curl_init($url);<br \/>\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(<br \/>\n\t\t&#8220;Authentication: AuthHMAC $user_id:$hmac&#8221;,<br \/>\n\t\t&#8216;Content-Type: application\/json&#8217;,<br \/>\n\t\t&#8216;Content-Length: &#8216; . strlen($request) . &#8220;\\r\\n&#8221;,<br \/>\n\t\t$request<br \/>\n\t));<br \/>\n\tcurl_setopt($ch, CURLOPT_POST, true);<br \/>\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br \/>\n\t$output = curl_exec($ch);<br \/>\n\tcurl_close($ch);<\/p>\n<p>\t$output = json_decode($output, true);<\/p>\n<p>\tif (!is_null($output[&#8216;error&#8217;]))<br \/>\n\t\tthrow new Exception($output[&#8216;error&#8217;][&#8216;message&#8217;]);<\/p>\n<p>\treturn $output[&#8216;result&#8217;];<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>Mentre lato server, dobbiamo verificare che la richiesta sia autorizzata, quindi prima di lasciare che Zend_Json_Server la elabori, aggiungiamo i dovuti controlli:<\/p>\n<p>[php]<br \/>\n\/\/ Header Authentication obbligatorio<br \/>\nif (empty($_SERVER[&#8216;HTTP_AUTHENTICATION&#8217;]) || strpos($_SERVER[&#8216;HTTP_AUTHENTICATION&#8217;], &#8216;AuthHMAC &#8216;) !== 0)<br \/>\n\tdie(&#8220;AUTHENTICATION FAILED&#8221;);<\/p>\n<p>\/\/ Separo l&#8217;id utente dal codice hmac e lo decodifico da base64<br \/>\nlist($user_id, $hmac) = explode(&#8216;:&#8217;, substr($_SERVER[&#8216;HTTP_AUTHENTICATION&#8217;], 9));<br \/>\n$hmac = base64_decode($hmac);<\/p>\n<p>function get_secret_by_user($user_id) {<br \/>\n\t\/\/ normalmente interrogherebbe il database, ma saltiamo l&#8217;implementazione che non ci interessa<br \/>\n\tif ($user_id == &#8216;1337&#8217;)<br \/>\n\t\treturn &#8216;mysecret&#8217;;<br \/>\n\telse<br \/>\n\t\treturn &#8221;;<br \/>\n}<\/p>\n<p>\/\/ Ricalcolo l&#8217;hmac e lo confronto con quello associato alla richiesta<br \/>\nif ( hash_hmac(&#8216;sha1&#8217;, file_get_contents(&#8220;php:\/\/input&#8221;), get_secret_by_user($user_id)) != $hmac )<br \/>\n\tdie(&#8220;AUTHENTICATION FAILED&#8221;);<\/p>\n<p>\/\/ Elabora richiesta JSON-RPC<br \/>\n$server-&gt;handle();<br \/>\n[\/php]<\/p>\n<p>Ora la richiesta pu\u00f2 essere effettuata solo da un client che conosce la chiave segreta. In un&#8217;implementazione completa potrebbe essere furbo fare in modo che la chiave venga auto-generata dal server al momento dell&#8217;autenticazione dell&#8217;utente e salvata in sessione dopo averla comunicata al client. In questo modo ad <strong>ogni sessione corrisponde una nuova chiave usa e getta<\/strong> rendendo il tutto ancora pi\u00f9 sicuro.<\/p>\n<p>Il sorgente \u00e8 disponibile per il download.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png\"><img decoding=\"async\" class=\"alignleft size-full wp-image-6747\" title=\"ssl\" src=\"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png\" alt=\"\" width=\"100\" height=\"100\" \/><\/a>Tempo fa abbiamo realizzato un <a href=\"https:\/\/www.artera.net\/it\/blog\/programmazione\/pubblichiamo-un-servizio-tramite-json-rpc-con-zend-framework\">servizio per chiamare procedure remote tramite JSON-RPC<\/a>, ma il protocollo non prevede alcun metodo di autenticazione.<br \/>\nIl compito di garantire l&#8217;autenticit\u00e0 del messaggio \u00e8 lasciato al programmatore, che pu\u00f2, ad esempio, scegliere uno dei metodi tradizionali che utilizzano il protocollo HTTP, come <a href=\"http:\/\/en.wikipedia.org\/wiki\/Basic_access_authentication\">Basic access authentication<\/a> o il poco pi\u00f9 sicuro <a href=\"http:\/\/en.wikipedia.org\/wiki\/Digest_access_authentication\">Digest access authentication<\/a>.<br \/>\nOggi vedremo come implementare il <strong>sistema di autenticazione HMAC<\/strong>.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[108],"tags":[210,63,55],"class_list":["post-6662","post","type-post","status-publish","format-standard","hentry","category-sviluppo","tag-json-rpc","tag-php","tag-sicurezza"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u2022 Autenticare richieste HTTP con HMAC - Artera<\/title>\n<meta name=\"description\" content=\"Leggi dal blog: Autenticare richieste HTTP con HMAC. Contattaci per una partnership! Artera Swiss Premium Hosting news, articoli e notizie interessanti dal mondo digitale.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u2022 Autenticare richieste HTTP con HMAC - Artera\" \/>\n<meta property=\"og:description\" content=\"Leggi dal blog: Autenticare richieste HTTP con HMAC. Contattaci per una partnership! Artera Swiss Premium Hosting news, articoli e notizie interessanti dal mondo digitale.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/\" \/>\n<meta property=\"og:site_name\" content=\"Artera\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/artera.net\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-03-16T17:16:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-27T14:50:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png\" \/>\n<meta name=\"author\" content=\"Sergio Ravera\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Scritto da\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sergio Ravera\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo di lettura stimato\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minuti\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/\"},\"author\":{\"name\":\"Sergio Ravera\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#\\\/schema\\\/person\\\/48ffb6b3727677643fbfd3ecf0a10aa0\"},\"headline\":\"Autenticare richieste HTTP con HMAC\",\"datePublished\":\"2011-03-16T17:16:12+00:00\",\"dateModified\":\"2023-02-27T14:50:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/\"},\"wordCount\":985,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.artera.net\\\/wp-content\\\/uploads\\\/2011\\\/03\\\/ssl.png\",\"keywords\":[\"JSON-RPC\",\"PHP\",\"sicurezza\"],\"articleSection\":[\"Sviluppo\"],\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/\",\"url\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/\",\"name\":\"\u2022 Autenticare richieste HTTP con HMAC - Artera\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.artera.net\\\/wp-content\\\/uploads\\\/2011\\\/03\\\/ssl.png\",\"datePublished\":\"2011-03-16T17:16:12+00:00\",\"dateModified\":\"2023-02-27T14:50:33+00:00\",\"description\":\"Leggi dal blog: Autenticare richieste HTTP con HMAC. Contattaci per una partnership! Artera Swiss Premium Hosting news, articoli e notizie interessanti dal mondo digitale.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.artera.net\\\/wp-content\\\/uploads\\\/2011\\\/03\\\/ssl.png\",\"contentUrl\":\"https:\\\/\\\/www.artera.net\\\/wp-content\\\/uploads\\\/2011\\\/03\\\/ssl.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/sviluppo\\\/autenticare-richieste-http-con-hmac\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.artera.net\\\/it\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Autenticare richieste HTTP con HMAC\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#website\",\"url\":\"https:\\\/\\\/www.artera.net\\\/it\\\/\",\"name\":\"Artera\",\"description\":\"Swiss Premium Hosting\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.artera.net\\\/it\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#organization\",\"name\":\"Artera\",\"url\":\"https:\\\/\\\/www.artera.net\\\/it\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.artera.net\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/artera-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.artera.net\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/artera-logo.png\",\"width\":300,\"height\":77,\"caption\":\"Artera\"},\"image\":{\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/artera.net\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/artera\\\/\",\"https:\\\/\\\/www.instagram.com\\\/artera_swiss\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.artera.net\\\/it\\\/#\\\/schema\\\/person\\\/48ffb6b3727677643fbfd3ecf0a10aa0\",\"name\":\"Sergio Ravera\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/618f2c20338bb422bd317eae8d6c9c097ba85d3f5a1da18e21ecf5da5ee3a448?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/618f2c20338bb422bd317eae8d6c9c097ba85d3f5a1da18e21ecf5da5ee3a448?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/618f2c20338bb422bd317eae8d6c9c097ba85d3f5a1da18e21ecf5da5ee3a448?s=96&d=mm&r=g\",\"caption\":\"Sergio Ravera\"},\"description\":\"Raised in a family tradition of merchants, my entrepreneurial spirit drove me to launch my first e-commerce venture in 1998. My vision and dedication led, in 2002, to the founding of Artera, now a leading brand in premium managed cloud hosting services. As Chief Executive Officer, I lead DHH Switzerland SA, part of the international DHH S.p.A. group, listed on the Milan Stock Exchange with the reference code (AIM \u2013 ISIN: IT0005203622). It is under this brand that the Artera brand continues to grow and thrive. In addition to my commitment to the business world, I am an active researcher in the field of new technologies, always fascinated by cutting-edge innovations in the industry.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sergioravera\\\/\"],\"url\":\"https:\\\/\\\/www.artera.net\\\/it\\\/author\\\/sergio-ravera\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u2022 Autenticare richieste HTTP con HMAC - Artera","description":"Leggi dal blog: Autenticare richieste HTTP con HMAC. Contattaci per una partnership! Artera Swiss Premium Hosting news, articoli e notizie interessanti dal mondo digitale.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/","og_locale":"it_IT","og_type":"article","og_title":"\u2022 Autenticare richieste HTTP con HMAC - Artera","og_description":"Leggi dal blog: Autenticare richieste HTTP con HMAC. Contattaci per una partnership! Artera Swiss Premium Hosting news, articoli e notizie interessanti dal mondo digitale.","og_url":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/","og_site_name":"Artera","article_publisher":"https:\/\/www.facebook.com\/artera.net\/","article_published_time":"2011-03-16T17:16:12+00:00","article_modified_time":"2023-02-27T14:50:33+00:00","og_image":[{"url":"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png","type":"","width":"","height":""}],"author":"Sergio Ravera","twitter_card":"summary_large_image","twitter_misc":{"Scritto da":"Sergio Ravera","Tempo di lettura stimato":"5 minuti"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/#article","isPartOf":{"@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/"},"author":{"name":"Sergio Ravera","@id":"https:\/\/www.artera.net\/it\/#\/schema\/person\/48ffb6b3727677643fbfd3ecf0a10aa0"},"headline":"Autenticare richieste HTTP con HMAC","datePublished":"2011-03-16T17:16:12+00:00","dateModified":"2023-02-27T14:50:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/"},"wordCount":985,"commentCount":1,"publisher":{"@id":"https:\/\/www.artera.net\/it\/#organization"},"image":{"@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/#primaryimage"},"thumbnailUrl":"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png","keywords":["JSON-RPC","PHP","sicurezza"],"articleSection":["Sviluppo"],"inLanguage":"it-IT","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/","url":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/","name":"\u2022 Autenticare richieste HTTP con HMAC - Artera","isPartOf":{"@id":"https:\/\/www.artera.net\/it\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/#primaryimage"},"image":{"@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/#primaryimage"},"thumbnailUrl":"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png","datePublished":"2011-03-16T17:16:12+00:00","dateModified":"2023-02-27T14:50:33+00:00","description":"Leggi dal blog: Autenticare richieste HTTP con HMAC. Contattaci per una partnership! Artera Swiss Premium Hosting news, articoli e notizie interessanti dal mondo digitale.","breadcrumb":{"@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/#primaryimage","url":"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png","contentUrl":"https:\/\/www.artera.net\/wp-content\/uploads\/2011\/03\/ssl.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.artera.net\/it\/sviluppo\/autenticare-richieste-http-con-hmac\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.artera.net\/it\/"},{"@type":"ListItem","position":2,"name":"Autenticare richieste HTTP con HMAC"}]},{"@type":"WebSite","@id":"https:\/\/www.artera.net\/it\/#website","url":"https:\/\/www.artera.net\/it\/","name":"Artera","description":"Swiss Premium Hosting","publisher":{"@id":"https:\/\/www.artera.net\/it\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.artera.net\/it\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":"Organization","@id":"https:\/\/www.artera.net\/it\/#organization","name":"Artera","url":"https:\/\/www.artera.net\/it\/","logo":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/www.artera.net\/it\/#\/schema\/logo\/image\/","url":"https:\/\/www.artera.net\/wp-content\/uploads\/2019\/09\/artera-logo.png","contentUrl":"https:\/\/www.artera.net\/wp-content\/uploads\/2019\/09\/artera-logo.png","width":300,"height":77,"caption":"Artera"},"image":{"@id":"https:\/\/www.artera.net\/it\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/artera.net\/","https:\/\/www.linkedin.com\/company\/artera\/","https:\/\/www.instagram.com\/artera_swiss\/"]},{"@type":"Person","@id":"https:\/\/www.artera.net\/it\/#\/schema\/person\/48ffb6b3727677643fbfd3ecf0a10aa0","name":"Sergio Ravera","image":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/secure.gravatar.com\/avatar\/618f2c20338bb422bd317eae8d6c9c097ba85d3f5a1da18e21ecf5da5ee3a448?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/618f2c20338bb422bd317eae8d6c9c097ba85d3f5a1da18e21ecf5da5ee3a448?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/618f2c20338bb422bd317eae8d6c9c097ba85d3f5a1da18e21ecf5da5ee3a448?s=96&d=mm&r=g","caption":"Sergio Ravera"},"description":"Raised in a family tradition of merchants, my entrepreneurial spirit drove me to launch my first e-commerce venture in 1998. My vision and dedication led, in 2002, to the founding of Artera, now a leading brand in premium managed cloud hosting services. As Chief Executive Officer, I lead DHH Switzerland SA, part of the international DHH S.p.A. group, listed on the Milan Stock Exchange with the reference code (AIM \u2013 ISIN: IT0005203622). It is under this brand that the Artera brand continues to grow and thrive. In addition to my commitment to the business world, I am an active researcher in the field of new technologies, always fascinated by cutting-edge innovations in the industry.","sameAs":["https:\/\/www.linkedin.com\/in\/sergioravera\/"],"url":"https:\/\/www.artera.net\/it\/author\/sergio-ravera\/"}]}},"_links":{"self":[{"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/posts\/6662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/comments?post=6662"}],"version-history":[{"count":8,"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/posts\/6662\/revisions"}],"predecessor-version":[{"id":216604,"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/posts\/6662\/revisions\/216604"}],"wp:attachment":[{"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/media?parent=6662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/categories?post=6662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.artera.net\/it\/wp-json\/wp\/v2\/tags?post=6662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}