<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anvay Srivastava on Medium]]></title>
        <description><![CDATA[Stories by Anvay Srivastava on Medium]]></description>
        <link>https://medium.com/@anvaysrivastava?source=rss-475da5f405c2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*oMzDyikY-UqpY2LY.</url>
            <title>Stories by Anvay Srivastava on Medium</title>
            <link>https://medium.com/@anvaysrivastava?source=rss-475da5f405c2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:58:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anvaysrivastava/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JWT for quick validation of 2 entities in wild.]]></title>
            <link>https://medium.com/@anvaysrivastava/jwt-for-quick-validation-of-2-entities-in-wild-2541adc25785?source=rss-475da5f405c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2541adc25785</guid>
            <category><![CDATA[jwt]]></category>
            <dc:creator><![CDATA[Anvay Srivastava]]></dc:creator>
            <pubDate>Tue, 07 Nov 2017 17:15:50 GMT</pubDate>
            <atom:updated>2017-11-07T17:21:57.901Z</atom:updated>
            <content:encoded><![CDATA[<p>Lets say there is a service A, exposed over internet. Now B ( a client) wants to call some API of A over the internet. I want only the calls of B to be entertained.</p><p>One way to solve this is using <a href="http://jwt.io/">jwt.io</a>. There are other ways of solving it like 2 way SSL/IP whitelisting/etc but for now lets stick to JWT.</p><p>JWT is a signed and encoded token that can be passed from B to A. If the signature of token matches to B, A can entertain that particular request.</p><p>Now the token can be signed and verified in two ways:</p><ol><li>Shared Secret : Useless for me, because sharing and maintenance of secret is the worst problem (as per me) to have at API level.</li><li>RSA Key pair. This looks amazing, Client will have private key by itself and broadcast public key to everyone including A. When A receives the API call, it can validate the API call using the public key and move ahead.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*UE4HvdMkQp3B9ZpvAQ8Vcw.png" /><figcaption>In a gist, This is how client authenticates itself.</figcaption></figure><p>I have used auth0’s library to create a <a href="https://github.com/anvaysrivastava/jwt-java">sample code</a> for generating and validating tokens for both methods.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2541adc25785" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I feel the motivation to learn again.]]></title>
            <link>https://medium.com/@anvaysrivastava/i-feel-the-motivation-to-learn-again-4ec0a742f6fd?source=rss-475da5f405c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ec0a742f6fd</guid>
            <dc:creator><![CDATA[Anvay Srivastava]]></dc:creator>
            <pubDate>Thu, 02 Feb 2017 04:42:59 GMT</pubDate>
            <atom:updated>2017-02-02T04:42:59.343Z</atom:updated>
            <content:encoded><![CDATA[<p>In 2005 they created <a href="https://en.wikipedia.org/wiki/Stanley_(vehicle)">https://en.wikipedia.org/wiki/Stanley_(vehicle)</a></p><p>Compared to my laptop their machines were not as powerful (Stanley was equipped with six low-power 1.6 GHz Intel <a href="https://en.wikipedia.org/wiki/Pentium_M">Pentium M</a> based computers in the trunk, running different versions of the <a href="https://en.wikipedia.org/wiki/Linux">Linux</a> operating system). Yet whenever I talk about AI/ML first thing that people talk about is heavy expensive GPU and terra bytes of structured data.</p><p>14 days to my first class I am excited about <a href="https://www.udacity.com/drive">https://www.udacity.com/drive</a>. The surge that I am feeling right now is equivalent to my first day at college.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ec0a742f6fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2 factor authentication from the perspective of logging in a server.]]></title>
            <link>https://medium.com/@anvaysrivastava/2-factor-authentication-from-the-perspective-of-logging-in-a-server-798497d5d896?source=rss-475da5f405c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/798497d5d896</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Anvay Srivastava]]></dc:creator>
            <pubDate>Fri, 15 Jul 2016 19:53:04 GMT</pubDate>
            <atom:updated>2017-02-03T02:06:07.786Z</atom:updated>
            <content:encoded><![CDATA[<h4>For times when I am cynical about login to machine.</h4><h3>Why</h3><p>If you have a single auth mechanism things these are the issues with the famous ones.</p><ul><li><strong>Password : </strong>It gets compromised. <em>You die.</em></li><li><strong>SSH Key: </strong>Laptop gets compromised. You die.</li><li><strong>TOTP/etc : </strong>Phone gets compromise. You die.</li></ul><p>Having more than one login method, reduces the probability of your login being compromised.</p><h3>How</h3><p>I have just tried out my luck with SSH keys + TOTP with <a href="https://github.com/google/google-authenticator">google authenticator</a> in debian(jessie)</p><p><a href="http://serverfault.com/a/632197">Trying to get SSH with public key (no password) + google authenticator working on Ubuntu 14.04.1</a></p><h3><strong>Result</strong></h3><p><strong>Cons</strong></p><ul><li>There is a little hassle of logging into machines.</li><li>Along with the rsa public key for ssh, we also now have to maintain public key of google TOTP as well.</li></ul><p><strong>Pros</strong></p><ul><li>Security team tested 2FA and certified the solution.</li><li>We can swap two people’s login or insert a manager’s TOTP public key along with employee’s SSL key. This ensures that manager has to be informed and a key taken from him/her before accessing the machine.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=798497d5d896" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I am new to medium]]></title>
            <link>https://medium.com/@anvaysrivastava/i-am-new-to-medium-60005ddc3156?source=rss-475da5f405c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/60005ddc3156</guid>
            <dc:creator><![CDATA[Anvay Srivastava]]></dc:creator>
            <pubDate>Fri, 15 Jul 2016 18:47:09 GMT</pubDate>
            <atom:updated>2016-07-15T18:47:09.555Z</atom:updated>
            <content:encoded><![CDATA[<p>I have bought a new domain and want to figure out a way to post my thoughts. Help anyone?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60005ddc3156" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>