<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rohit Jacob Mathew</title>
    <description>The latest articles on DEV Community by Rohit Jacob Mathew (@rohitjmathew).</description>
    <link>https://dev.to/rohitjmathew</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F541041%2F1cd8d620-ec5d-4e2e-9144-5892a6c856f6.png</url>
      <title>DEV Community: Rohit Jacob Mathew</title>
      <link>https://dev.to/rohitjmathew</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohitjmathew"/>
    <language>en</language>
    <item>
      <title>Online Safety: A Guide to Protecting Yourself</title>
      <dc:creator>Rohit Jacob Mathew</dc:creator>
      <pubDate>Mon, 20 May 2024 15:30:00 +0000</pubDate>
      <link>https://dev.to/rohitjmathew/online-safety-a-guide-to-protecting-yourself-163i</link>
      <guid>https://dev.to/rohitjmathew/online-safety-a-guide-to-protecting-yourself-163i</guid>
      <description>&lt;p&gt;Navigating digital accounts safely is a concern for many in the modern age. Digital accounts have become an integral part of our daily lives, from email and online banking to accounts on ride-sharing platforms like Uber and e-commerce platforms like Amazon, protecting our digital lives online is becoming imperative&lt;/p&gt;

&lt;p&gt;When computing began, we used computers for complex calculations on individual machines. Gradually, we started connecting these machines through the internet, leading to the dot-com boom. This boom resulted in the creation of many websites like chat rooms and forums. To access these, you needed to identify yourself, which led to the use of the common username and password system we use today to create accounts. This username and password became a way to uniquely identify a person and their account on these sites, forming a type of digital identity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fho9gloqxcyuklxs60326.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fho9gloqxcyuklxs60326.png" alt="8 Common Cyber Attack Vectors" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nowadays, some of the most common incidents we see are phishing scams, identity theft, &lt;a href="https://www.cisco.com/c/en/us/products/security/what-is-social-engineering.html"&gt;socially engineered attacks&lt;/a&gt;, ransomware, and compromised or weak credentials. Most, if not all, of these are directly or indirectly related to our digital identity and how we access it. Therefore, we need to ensure we secure ourselves online.&lt;/p&gt;

&lt;h2&gt;
  
  
  How To Secure Yourself Online? 🙋
&lt;/h2&gt;

&lt;p&gt;I will discuss one aspect of securing yourself online, which relates to digital accounts and how we access them. The most recommended strategy for that is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Use a passwordless login method like Face ID, Fingerprint Login or Passkeys.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use a password manager like BitWarden or 1Password for sites that still require a username and password.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement multi-factor authentication (MFA) to verify your identity. This can include a Time-Based OTP (TOTP) or a deep link verification through email.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gkcexh3ki5727htifhj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gkcexh3ki5727htifhj.png" alt="Table From Bad To Good On Protecting Your Account" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me also share the strategy I use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I currently use 1Password as my password manager.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I have TOTP or passwordless MFA implemented on most sites.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I have removed most social logins and Single Sign-On.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I regularly conduct a security audit to see who has access to my data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the event of a data leak or hack, I immediately change my passwords.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Passwordless account creation using passkeys is a recent improvement, and I will likely start adopting them soon.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  But ... 🤔 I'm Still Confused. Why Should We Do All This?
&lt;/h2&gt;

&lt;p&gt;Good question. Let's explore why we find password-based logins inefficient, inconvenient, and frustrating.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff0y4xk7gqp400cle7x0o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff0y4xk7gqp400cle7x0o.png" alt="Login &amp;amp; Signup Page" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's start with a login screen. You see above the traditional username/password login or signup page and a few &lt;a href="https://blog.rohitjmathew.space/why-is-a-social-login-more-secure"&gt;social logins&lt;/a&gt;. These are currently the most common methods of accessing an account. Let's examine how these methods contribute to feelings of inefficiency, inconvenience, and frustration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inefficient
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;We Create Terrible Passwords -&lt;/strong&gt; Below are some of the most common passwords in the world. There are open-source lists of these passwords that hackers use. Simple passwords like these or those related to you are not secure at all. They can easily be guessed from the list or with a little social engineering.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofidvj2mw2ukj6rd0qmj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofidvj2mw2ukj6rd0qmj.png" alt="Common Passwords In The World" width="768" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;We Reuse the Same Passwords -&lt;/strong&gt; To make things easier, we often use the same passwords for multiple accounts. This is very insecure because if one account is compromised, a hacker can easily access other accounts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compromised Social Logins -&lt;/strong&gt; While social logins are easier to use, they also present a single point of failure. If one social login is compromised, it can lead to other accounts being compromised as well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SMS &amp;amp; Voice-Based Multi-Factor Authentication (MFA) Can Be Hacked -&lt;/strong&gt; While MFA has improved security, hackers have adapted and found ways to intercept SMS or voice-based MFA. Therefore, these methods are no longer the most secure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you visit the site &lt;a href="https://haveibeenpwned.com"&gt;haveibeenpwned&lt;/a&gt;, you can see which of your data has been compromised.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Inconvenient
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resetting Passwords is Not Easy -&lt;/strong&gt; When we forget our passwords, we often have to go through multiple steps to regain access to our accounts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Password Requirements Are Sometimes Hard To Remember -&lt;/strong&gt; Creating a new password that meets all the security requirements, such as including uppercase letters, numbers, and special characters, can be difficult to remember.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Social Logins Might Not Work Sometimes -&lt;/strong&gt; With recent downtimes of social media sites, your logins might also face interruptions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Factor Authentication (MFA) Can Add Friction -&lt;/strong&gt; MFA often requires an extra step and is linked to a device, which can complicate the process. Additionally, backing up and recovering MFA methods is not straightforward.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Frustrating
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Remembering Different Passwords -&lt;/strong&gt; Memorable passwords are easy for hackers to guess or crack. It's frustrating to have different passwords for various accounts and to remember each one.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Social Login Providers &amp;amp; Data Privacy -&lt;/strong&gt; Some social login providers or websites may share or sell their user data to third-party entities. This means that when you use social logins, your personal information, browsing habits, and other data might be accessed by companies you didn't intend to share it with.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Factor Authentication (MFA) Not Working -&lt;/strong&gt; SMS or voice calls containing the authentication code not being received, delays in receiving push notifications or Time-based One-Time Passwords (TOTP) can expire are a few examples. These issues can cause significant frustration and hinder the login process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Factor Authentication (MFA) Abuse -&lt;/strong&gt; There has been an increase in hackers abusing MFA to access accounts. They exploit MFA solutions that send sign-in approval notifications after account access attempts, knowing that people often get frustrated by a flood of messages. Hackers have breached &lt;a href="https://www.wired.com/story/uber-hack-mfa-phishing/"&gt;Uber&lt;/a&gt;, &lt;a href="https://tech.co/news/mfa-fatigue-hackers"&gt;Microsoft, and Cisco&lt;/a&gt; using this method.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Right, So Why Is The Recommended Strategy Better? 😅
&lt;/h2&gt;

&lt;p&gt;Let's break down the recommended strategy:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gkcexh3ki5727htifhj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gkcexh3ki5727htifhj.png" alt="Table From Bad To Good On Protecting Your Account" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use a Passwordless Login Method
&lt;/h2&gt;

&lt;p&gt;Passwordless methods are more secure than password-based logins. If you want to know why, you can read my article on &lt;a href="https://blog.rohitjmathew.space/intro-to-webauthn"&gt;How Does Face ID or Touch ID Work&lt;/a&gt;. In simple terms, passwordless methods like Passkey use biometric authentication along with device identifiers to enable multifactor authentication (something you are and something you have) instead of a password (something you know).&lt;/p&gt;

&lt;p&gt;This approach is not only easier and more secure but also resistant to many of the issues we discussed earlier. Although still new, there has been a significant industry push to adopt this, especially with the rise of biometric authenticators in our devices.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can find a list of websites and apps that support passwordless login or MFA, along with instructions on how to set it up, at &lt;a href="https://passkeys.directory/"&gt;passkeys.directory&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use a Password Manager for Sites That Still Require a Username and Password
&lt;/h2&gt;

&lt;p&gt;While not every site has adopted passwordless logins, a better way to secure your accounts that still use passwords is by using a password manager like &lt;a href="https://bitwarden.com/"&gt;Bitwarden&lt;/a&gt; or &lt;a href="https://1password.com/"&gt;1Password&lt;/a&gt;. They help you create strong, unique passwords and remember them easily. Most password managers come with autofill features that make it easy to use across devices.&lt;/p&gt;

&lt;p&gt;While they can be a single point of failure and might be a bit of a hassle to set up initially, the benefits far outweigh the drawbacks. Remembering just one master password to manage your accounts securely is much better than dealing with the issues mentioned earlier.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; 1Password (the password manager I use) has provided more &lt;a href="https://blog.1password.com/what-if-1password-gets-hacked/"&gt;details&lt;/a&gt; on what happens if they are hacked. While there have been recent &lt;a href="https://www.forbes.com/sites/daveywinder/2023/10/24/no-1password-has-not-just-been-hacked-your-passwords-are-safe/"&gt;hacking incidents&lt;/a&gt;, I am not aware of any compromised data.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Implement Multi-factor Authentication to Verify Your Identity
&lt;/h2&gt;

&lt;p&gt;Multi-factor Authentication (MFA) is a security measure that requires users to provide more than one form of identification to access their accounts. This typically involves a combination of something you know, like a traditional password, and something you have, such as a one-time password (OTP) sent via SMS or email. By adding this extra layer of security, MFA significantly reduces the risk of unauthorized access, even if your password is compromised.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0sn4gsmu08sb6hh09d6o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0sn4gsmu08sb6hh09d6o.png" alt="What Is Multifactor Authentication" width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Implementing MFA is a crucial step in protecting your online accounts and personal information. It may take a bit of extra time during the login process, but the added security is well worth the effort.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Most websites and services we use provide 2FA. You can check based on your use case at &lt;a href="https://2fa.directory/"&gt;2fa.directory&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This article explores common security threats and offers strategies to protect yourself online. Some recommendations include using passwordless login methods like Face ID or Passkeys, using password managers like 1Password, and implementing multi-factor authentication (MFA). These measures can greatly improve your online security and reduce the risk of unauthorized access to your accounts.&lt;/p&gt;

&lt;p&gt;Hopefully, this article helps you understand why online security is important and enables you to stay safe on the internet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! I really hope that you find this article useful. I invite you to participate in the discussion in the comments below, I'm always interested to know your thoughts and happy to answer any questions you might have in your mind. If you think this post was useful, please like the post to help promote this piece to others.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you want to read more of my articles, visit my &lt;a href="https://blog.rohitjmathew.space/"&gt;blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks again for reading! :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S Do feel free to connect with me on &lt;a href="https://www.linkedin.com/in/rohitjmathew"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/iamrohitjmathew"&gt;Twitter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>howto</category>
      <category>security</category>
      <category>guide</category>
    </item>
    <item>
      <title>How Does Face ID or Touch ID Work? Intro to WebAuthn</title>
      <dc:creator>Rohit Jacob Mathew</dc:creator>
      <pubDate>Wed, 13 Apr 2022 15:07:08 +0000</pubDate>
      <link>https://dev.to/rohitjmathew/how-does-face-id-or-touch-id-work-intro-to-webauthn-18m3</link>
      <guid>https://dev.to/rohitjmathew/how-does-face-id-or-touch-id-work-intro-to-webauthn-18m3</guid>
      <description>&lt;p&gt;Most of us are used to logging into different accounts using a password. For years this has been the norm but passwords also face other security issues: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are extremely annoying when we don't remember them and even harder to reset&lt;/li&gt;
&lt;li&gt;They can be quite insecure with the most common password being password or 123456&lt;/li&gt;
&lt;li&gt;Phishing attacks are commonplace in today's internet era and using this hackers can steal your passwords&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Would it not be simpler to move towards a more passwordless login? A place where we don't have to remember or have to enter passwords to gain access to our accounts? One such passwordless solution is WebAuthn.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is WebAuthn? 😅
&lt;/h2&gt;

&lt;p&gt;The Web Authentication API (also known as WebAuthn) is an API that enables strong authentication with public-key cryptography, enabling passwordless authentication and/or secure second-factor authentication without SMS texts.&lt;/p&gt;

&lt;p&gt;Let's break that down to quickly understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Public Key Cryptography&lt;/strong&gt; - So we use a key-based authentication (public and private key) to login and not a password. If you are not sure how it works I suggest watching this &lt;a href="https://youtu.be/6-JjHa-qLPk?t=277"&gt;video&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Passwordless Authentication&lt;/strong&gt; - In this type of authentication we will not be using a password to login but will use some form of user interaction to verify and login. This uses a hardware authenticator like a fingerprint sensor on your device or a YubiKey. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secure Second-Factor Authentication Without SMS Texts&lt;/strong&gt; - Two-Factor Authentication today is predominantly driven by SMS-based OTP but these are also susceptible to SIM swap. SIM swap is essentially taking control of someone’s phone number, and tricking a carrier into transferring it to a new phone. A two-factor authentication scenario-driven through a hardware authenticator using WebAuthn would be a safer solution to the above problem&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is a specification written by the &lt;a href="https://www.w3.org/"&gt;W3C&lt;/a&gt; and &lt;a href="https://fidoalliance.org/"&gt;FIDO&lt;/a&gt;, with the participation of Google, Mozilla, Microsoft, Yubico, and others. Web Authentication works hand in hand with other industry standards such as &lt;a href="https://www.w3.org/TR/credential-management-1/"&gt;Credential Management Level 1&lt;/a&gt; and &lt;a href="https://fidoalliance.org/specs/fido-v2.0-rd-20170927/fido-client-to-authenticator-protocol-v2.0-rd-20170927.html"&gt;FIDO 2.0 Client to Authenticator Protocol 2&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does It Work? 🤔
&lt;/h2&gt;

&lt;p&gt;So like every other login situation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A user would be prompted for a username to identify them. &lt;/li&gt;
&lt;li&gt;The browser would then prompt the user to use their hardware authenticator and verify themselves. &lt;/li&gt;
&lt;li&gt;On successful authentication, you would be logged into the system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now what we don't see is a lot of what goes on in the background to facilitate this process. Let me explain a little more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2xrefec3plh96sjcnf5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2xrefec3plh96sjcnf5.png" alt="Generic WebAuthn Flow" width="638" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Registration Flow
&lt;/h3&gt;

&lt;p&gt;In this process, a new set of key credentials are created against the username entered by the user. This key credential is the crux of the process which enables us to make sure this authentication is in a passwordless manner.&lt;/p&gt;

&lt;p&gt;There is a simple 8 step process that takes place:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A user clicks on the register button on a site on their browser (user agent)&lt;/li&gt;
&lt;li&gt;The authenticating server (relying party) issues a challenge (a random set of data sent as an array) to the user's browser to be able to enable WebAuthn login&lt;/li&gt;
&lt;li&gt;The browser sends this challenge to the authenticator device&lt;/li&gt;
&lt;li&gt;The authenticator device then prompts the user to authenticate themselves. This would be different based on the device. e.g - Touch ID on a Macbook or touching a YubiKey&lt;/li&gt;
&lt;li&gt;Once the user authorizes the authenticator device, the authenticator will then create a new key pair (a public and private key) and will then use the private key to sign the challenge&lt;/li&gt;
&lt;li&gt;The authenticator device will then return the signed challenge, the public key as well as details pertaining to the process back to the authenticating server&lt;/li&gt;
&lt;li&gt;The authenticating server will then confirm the authenticity of the private key by using the public key to ensure the challenge was signed by the private key&lt;/li&gt;
&lt;li&gt;It will then store the received details against the username for future use and respond that the user is registered&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhotcd00b806ylgs9r6ov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhotcd00b806ylgs9r6ov.png" alt="Registration Flow" width="795" height="890"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Authentication Flow
&lt;/h3&gt;

&lt;p&gt;Authentication is a similar process where the above-generated credentials are used to verify the user's identity by going through a signed challenge process again. &lt;/p&gt;

&lt;p&gt;There is a simple 8 step process that takes place:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A user clicks on the login button on a site on their browser (user agent) and enters their username&lt;/li&gt;
&lt;li&gt;The authenticating server (relying party) issues a challenge (a random set of data sent as an array) to the user's browser along with the saved private key ID registered with the username&lt;/li&gt;
&lt;li&gt;The browser sends this challenge &amp;amp; private key ID to the authenticator device&lt;/li&gt;
&lt;li&gt;The authenticator device then prompts the user to authenticate themselves. This would be different based on the device. e.g - Touch ID on a Macbook or touching a YubiKey&lt;/li&gt;
&lt;li&gt;Once the user authorizes the authenticator device, the authenticator will then retrieve the generated key pair saved on it with the provided private key ID and will then use the private key to sign the challenge&lt;/li&gt;
&lt;li&gt;The authenticator device will then return the signed challenge as well as details pertaining to the process back to the authenticating server&lt;/li&gt;
&lt;li&gt;The authenticating server will then confirm the authenticity of the private key by using its saved public key to ensure the challenge was signed by the private key&lt;/li&gt;
&lt;li&gt;It will then log the user in&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lle74jcw0ws4jxb0e5p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lle74jcw0ws4jxb0e5p.png" alt="Authentication Flow" width="795" height="890"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  That Sounds Awesome 😮
&lt;/h2&gt;

&lt;p&gt;Absolutely. Let's quickly see some of the benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Private/Public Key Based Authentication&lt;/strong&gt; - It's a more secure way to authenticate user compared to the current norm of password-based authentication as it uses asymmetric cryptography by default&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phishing Resistant&lt;/strong&gt; - WebAuthn is resistant to phishing attacks due to the domain name being stored on the authenticator. This makes it harder for hackers to be able to spoof websites and gain access to credentials&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Store Public Data in Your DB&lt;/strong&gt; - Only public data is stored in the DB. No sensitive data such as passwords are required to be stored in this flow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fine-Grained Control&lt;/strong&gt; - You can control what sort of user interaction you want as a part of the flow for example a specific hardware device&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better UX&lt;/strong&gt; - A user won't need to remember any password or such and will only need to use a hardware authenticator to be able to login to the device&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;W3C Recommendation&lt;/strong&gt; - This means it should be supported by all major browsers across devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and lastly &lt;strong&gt;NO MORE PASSWORDS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All that being said it does have some issues which are still to be solved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User Credential Management&lt;/strong&gt; - The user experience with respect to credential management is still in a very primitive state&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Device Credentials&lt;/strong&gt; - Being able to pass credentials from one device to another is not very easy unless you use a roaming hardware authenticator like a YubiKey&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lost/Stolen Authenticator Device Recovery&lt;/strong&gt; - In case you don't have access or lose your roaming hardware authenticator, the fallback scenario is generally a password to gain access to an account but would need to be explicitly setup&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WebAuthn Might Replace Passwords&lt;/strong&gt; - WebAuthn is still in a very early phase and is slowly being adopted and supported. It might replace password-based login in the future but it might be a while before we see that happening. &lt;em&gt;Note - this doesn't replace things like token-based authentication flows like OAuth or OIDC as well as identity providers like Auth0, Okta, Google, etc&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;WebAuthn is a much more secure authentication flow that is phishing resistant and only stores public data on a database with most private data generally stored on the hardware authenticator only. It makes use of asymmetric cryptography to do a user check and provides a much better UX compared to the existing login flow.&lt;/p&gt;

&lt;p&gt;Currently, WebAuthn is majorly being driven as a two-factor authentication or universal 2nd factor workflow but could possibly replace password-based login in the future.&lt;/p&gt;

&lt;p&gt;Hopefully, this article enables you to understand what WebAuthn is and how it works.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! I really hope that you find this article useful. I invite you to participate in the discussion in the comments below, I'm always interested to know your thoughts and happy to answer any questions you might have in your mind. If you think this post was useful, please like the post to help promote this piece to others.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S Do feel free to connect with me on &lt;a href="https://www.linkedin.com/in/rohitjmathew"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/iamrohitjmathew"&gt;Twitter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Appendix
&lt;/h2&gt;

&lt;p&gt;The following have been great material that helped me write this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://webauthn.me/"&gt;Web Authentication (WebAuthn) Credential and Login Demo&lt;/a&gt; by Auth0&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/TR/webauthn/"&gt;WebAuthn Specification Doc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://webauthn.sambego.tech/"&gt;WebAuthn Presentation&lt;/a&gt; by &lt;a href="https://twitter.com/sambego"&gt;Sam Bellen&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://webauthn.guide/"&gt;Guide to WebAuthn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API"&gt;Web Authentication API&lt;/a&gt; MDN Docs&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://sec.okta.com/articles/2020/04/webauthn-great-and-it-sucks"&gt;WebAuthn Is Great and It Sucks&lt;/a&gt; by Okta&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.okta.com/blog/2019/03/what-is-webauthn/"&gt;What is WebAuthn?&lt;/a&gt; by Okta&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://codeburst.io/what-is-webauthn-logging-in-with-touch-id-and-windows-hello-on-the-web-10e22c49e06c"&gt;What is WebAuthn: Logging in with Touch ID and Windows Hello on the web&lt;/a&gt; by &lt;a href="https://twitter.com/michwirantono"&gt;Michelle Marcelline&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>security</category>
      <category>webauthn</category>
      <category>authentication</category>
      <category>fido</category>
    </item>
    <item>
      <title>How to Extend Your Login Flow With Auth0 Actions</title>
      <dc:creator>Rohit Jacob Mathew</dc:creator>
      <pubDate>Fri, 17 Dec 2021 14:46:10 +0000</pubDate>
      <link>https://dev.to/rohitjmathew/how-to-extend-your-login-flow-with-auth0-actions-52eb</link>
      <guid>https://dev.to/rohitjmathew/how-to-extend-your-login-flow-with-auth0-actions-52eb</guid>
      <description>&lt;p&gt;I recently attended a training session with the Auth0 Dev Rel team on a very cool new feature they have added called Auth0 Actions. In this article, I am going to explain what is Auth0 Actions, why to use them, and how to set one up.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Auth0 Actions?
&lt;/h2&gt;

&lt;p&gt;Actions are secure, tenant-specific, versioned functions written in Node.js that execute at certain points during the Auth0 runtime. Actions are used to customize and extend Auth0's capabilities with custom logic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r4sIjyye--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639214635781/VFyOmuqRg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r4sIjyye--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639214635781/VFyOmuqRg.png" alt='"Sample Actions Flow"' title="Sample Actions Flow" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Above you can see a sample flow where once the user logs into the system, you add a trigger to verify the user's identity using Onfido and then confirm consent using OneTrust before completing the login flow and issuing the token.&lt;/p&gt;

&lt;p&gt;In brief, an action is a programmatic way to add custom business logic into your login flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use Auth0 Actions? 🤔
&lt;/h2&gt;

&lt;p&gt;1) &lt;strong&gt;Extensibility&lt;/strong&gt; - Built to give developers more tooling and a better experience in their login workflows.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;Drag N Drop Functionality&lt;/strong&gt; — The flow editor lets you visually build custom workflows with drag and drop Action blocks for complete control.&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;Monaco Code Editor&lt;/strong&gt; — Designed with developers in mind, you can easily write JavaScript functions with validation, intelligent code completion, and type definitions with TypeScript support.&lt;/p&gt;

&lt;p&gt;4) &lt;strong&gt;Serverless Environment&lt;/strong&gt; — Auth0 host's your custom Action functions and processes them when desired. The functions are stored and run on their infrastructure.&lt;/p&gt;

&lt;p&gt;5) &lt;strong&gt;Version Control&lt;/strong&gt; — You have the ability to store a history of individual Action changes and the power to revert back to previous versions as needed.&lt;/p&gt;

&lt;p&gt;6) &lt;strong&gt;Pre-Production Testing&lt;/strong&gt; — Your personal Actions can be drafted, reviewed, and tested before deploying into production&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I set one up? 😮
&lt;/h2&gt;

&lt;p&gt;For the purpose of this demo, we are going to be creating an action to enforce Multi-Factor Authentication (MFA) for a specific role. I will take you through the process of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creating a role&lt;/li&gt;
&lt;li&gt;Adding users&lt;/li&gt;
&lt;li&gt;Setting up a demo application&lt;/li&gt;
&lt;li&gt;Creating an Action to enforce MFA&lt;/li&gt;
&lt;li&gt;Testing the code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's get started:&lt;/p&gt;

&lt;h3&gt;
  
  
  1) Login to Your Auth0 Account
&lt;/h3&gt;

&lt;p&gt;The first step to secure your application is to access the Auth0 Dashboard in order to create your Auth0 application. If you haven’t created an Auth0 account, you can &lt;a href="https://a0.to/signup-for-auth0"&gt;sign up for a free one now&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2) Create an Application
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Once in the dashboard, move to the Applications tab in the left sidebar. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--roRq_1yl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639214927748/WpImjm7mg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--roRq_1yl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639214927748/WpImjm7mg.png" alt="Application Page" title="Application Page" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click on Create Application&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provide a friendly name for your application (eg - Test Actions App) and choose Single Page Web Applications as an application type.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4Bda3xz9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215005392/uhXHjQpPZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Bda3xz9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215005392/uhXHjQpPZ.png" alt="Create Application Page" title="Create Application Page" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;From the quick start tab choose React. Download the sample app. This will have most of the necessary details already in place.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UvAIAvAg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215038833/KmbmIA1nt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UvAIAvAg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215038833/KmbmIA1nt.png" alt="Quick Start Sample" title="Quick Start Sample" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;We also need to set up a few settings for this application. Choose the Settings tab (next to quick start). Add your localhost URL to the following places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allowed Callback URLs&lt;/li&gt;
&lt;li&gt;Allowed Logout URLs&lt;/li&gt;
&lt;li&gt;Allowed Web Origins&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Bn13ATqB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215091880/cwD9fJnFd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Bn13ATqB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215091880/cwD9fJnFd.png" alt="Update Application Settings" title="Update Application Settings" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3) Setup Application
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Unzip the code we downloaded in a location of your choice.&lt;/li&gt;
&lt;li&gt;Open it in the code editor of your choice&lt;/li&gt;
&lt;li&gt;Cross verify that the details of your application are correctly configured in &lt;code&gt;src/auth_config.json&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--misiOeAj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639664846011/IwnY7XZKv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--misiOeAj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639664846011/IwnY7XZKv.png" alt="auth_config.json" title="auth_config.json" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We will run this code locally so install the dependencies and run it in dev mode (so we have hot reload enabled). To do this &lt;code&gt;npm install &amp;amp; npm run dev&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Once the application starts you should be shown a SPA like below. If you click on Log In it will take you to your login box.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WRUasysW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215261508/-E672eefw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WRUasysW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215261508/-E672eefw.png" alt="Sample Application" title="Sample Application" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4) Setup Users and Roles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Click on the User Management tab in the left sidebar.&lt;/li&gt;
&lt;li&gt;Go to the Users tab and click on the Create User button. We need to create 2 users: &lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Admin User
2. Test User 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Remember these credentials as these are the test users we will use for this demo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yJmE4SqG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215392817/I51zfr-Ov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yJmE4SqG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215392817/I51zfr-Ov.png" alt="User Creation" title="User Creation" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to the Roles tab and click on the Create Role button. Call the role &lt;code&gt;Admin&lt;/code&gt; and once created go to the user tab and assign it to your Admin user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once this is done go back to your locally running SPA and try logging in with one credential. You should be able to access a user portal like below.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K9af3Q2O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215500834/SgGX7vE_5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K9af3Q2O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215500834/SgGX7vE_5.png" alt="Initial Login" title="Initial Login" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5) Setup Actions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Click on the Actions Tab in the left sidebar&lt;/li&gt;
&lt;li&gt;Go to the Flows category&lt;/li&gt;
&lt;li&gt;Select the Login Flow. This will run the flow of an action once the login process in your login box is complete.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4N0A82m6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215815525/N-h2y-tlI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4N0A82m6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215815525/N-h2y-tlI.png" alt="Login Flow" title="Login Flow" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the &lt;code&gt;+&lt;/code&gt; button in Add Action and select Build Custom.&lt;/li&gt;
&lt;li&gt;Name it MFA for Role and leave the rest as is.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zNo3Oj0e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215793963/Rj2rC2T6f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zNo3Oj0e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215793963/Rj2rC2T6f.png" alt="Action Creation Flow" title="Action Creation Flow" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once Created you come to a screen as follows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iCn0CwCd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215844044/VrPsqFVBz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iCn0CwCd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215844044/VrPsqFVBz.png" alt="Action Code Editor" title="Action Code Editor" width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the below code into &lt;code&gt;onExecutePostLogin&lt;/code&gt; function
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  if (event.authorization != undefined &amp;amp;&amp;amp; event.authorization.roles.includes("Admin")) {
      api.multifactor.enable("any");
  };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CiyeUGzQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215869129/2ELHfGy5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CiyeUGzQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215869129/2ELHfGy5s.png" alt="Action Code" title="Action Code" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On the left side you can see a play button. This is your testing environment inside the actions editor. You will find the &lt;a href="https://auth0.com/docs/actions/triggers/post-login/event-object"&gt;event&lt;/a&gt; object in which you can test the actions flow by adding &lt;code&gt;Admin&lt;/code&gt; to the &lt;code&gt;authorization.roles&lt;/code&gt; array.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you add the &lt;code&gt;Admin&lt;/code&gt; role you should see a response with MFA like below and when not present you should get an empty array.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7eyk0fGf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215931493/zai-96biU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7eyk0fGf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215931493/zai-96biU.png" alt="Action Test Case" title="Action Test Case" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on save draft &amp;amp; deploy. Go to the flow now and click on the custom tab on the right and you should be able to drag and drop the &lt;code&gt;MFA for Roles&lt;/code&gt; action into the flow. Click on Apply such that this new flow will work with your login box.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XcQYAPFo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215949399/nK49n1ZHZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XcQYAPFo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639215949399/nK49n1ZHZ.png" alt="Action Flow" title="Action Flow" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You will also need to enable MFA on the Auth0 dashboard. Open the Securities tab and choose multi-factor auth. In the following screen enable One-time Password. This will enable users to use an application like Google Authenticator for a one-time password. There are other factors you can enforce as well like SMS or Email-based OTP etc but for this demo, we will be using just the one-time password.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the policies section leave everything as is and save your changes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_dbY_Dm8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216209703/f54daE0Jo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_dbY_Dm8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216209703/f54daE0Jo.png" alt="MFA Screen" title="MFA Screen" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6) Testing With Your Application
&lt;/h3&gt;

&lt;p&gt;Now when you go to login in on the locally running application we should be triggered to do a MFA for the admin user. So let's test that.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click on login and redirect to your login box. If you are logged in already, log out and then do the same. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter your admin users credentials&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eEFpmZ2C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216252587/jyNxUdkU9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eEFpmZ2C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216252587/jyNxUdkU9.png" alt="Admin Login" title="Admin Login" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once the login goes through as a success you will be prompted to authenticate with your preferred authenticator app. I used google authenticator and entered my OTP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fdIv8YuS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216272416/9BGhY_91S.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fdIv8YuS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216272416/9BGhY_91S.png" alt="Admin MFA" title="Admin MFA" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You will then be asked to consent to share your user data with the application. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZIehzt4D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216291893/v2IITRcrF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZIehzt4D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216291893/v2IITRcrF.png" alt="MFA Consent" title="MFA Consent" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once you accept the above you should be logged in.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qt5ztubv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216404160/YnZZikEzZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qt5ztubv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1639216404160/YnZZikEzZ.png" alt="Admin Logged In" title="Admin Logged In" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you try the same flow with the test user you will notice that you are directly logged in post the consent page and no MFA request was triggered. This is because in our actions code as shown below you can see we look to see if the user roles have the Admin role and if so then we ask Auth0 to trigger a MFA workflow with any of the enabled MFA use cases of the tenant.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  if (event.authorization != undefined &amp;amp;&amp;amp; event.authorization.roles.includes("Admin")) {
      api.multifactor.enable("any");
  };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Congrats you have just created a custom Auth0 Actions flow and tested it. This was a simple example to enable you to understand what they are, how they can be built and used in your workflows. There are many more complex flows you can build for and can find some examples provided by Auth0 below. Just click on the trigger and you will find specific examples.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://auth0.com/docs/actions/triggers/"&gt;Sample Actions Code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hopefully, this enables you to understand what actions are and how you can use them in your login workflows.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! I really hope that you find this article useful. I invite you to participate in the discussion in the comments below, I'm always interested to know your thoughts and happy to answer any questions you might have in your mind. If you think this post was useful, please like the post to help promote this piece to others.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S Do feel free to connect with me on &lt;a href="https://www.linkedin.com/in/rohitjmathew"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/iamrohitjmathew"&gt;Twitter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Appendix
&lt;/h2&gt;

&lt;p&gt;The following have been great material that helped me write this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://auth0.com/blog/introducing-auth0-actions/"&gt;Introducing Auth0 Actions - Auth0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://auth0.com/docs/actions"&gt;Auth0 Actions - Auth0 Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>authentication</category>
      <category>howto</category>
      <category>auth0</category>
      <category>login</category>
    </item>
    <item>
      <title>How To Manage Encryption at Scale?</title>
      <dc:creator>Rohit Jacob Mathew</dc:creator>
      <pubDate>Wed, 27 Oct 2021 11:32:59 +0000</pubDate>
      <link>https://dev.to/rohitjmathew/how-to-manage-encryption-at-scale-c1f</link>
      <guid>https://dev.to/rohitjmathew/how-to-manage-encryption-at-scale-c1f</guid>
      <description>&lt;p&gt;Recently at work, I came across an interesting method to handle encryption at scale called envelope encryption. &lt;/p&gt;

&lt;p&gt;First of all, it increases security and helps you ease out the management of encryption keys. But it's also a highly recommended pattern by PCI-DSS (Security Standard for Credit Card Processing) and results in much stronger data privacy and data protection of Personally Identifiable Information (PII). &lt;/p&gt;

&lt;p&gt;When we think of data there are 3 places we can think of encrypting data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At Rest - On hardware storage devices like on a disk or in your devices &lt;/li&gt;
&lt;li&gt;In Transit - In moving data between different locations like server to server through API calls&lt;/li&gt;
&lt;li&gt;In Use - While it's being used by a server (New concept and still being researched)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will be dealing primarily with encryption at rest and envelope encryption is a popular pattern recommended for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  So What is Envelope Encryption? 🤔
&lt;/h2&gt;

&lt;p&gt;This is a type of encryption that involves encrypting your data with a Data Encryption Key, then encrypting the Data Encryption Key (DEK) with a Customer Master Keys (CMK). You then store both the encrypted data and the encrypted DEK alongside each other in the database. This practice of using a wrapping key to encrypt data keys is known as envelope encryption.&lt;/p&gt;

&lt;p&gt;Like mentioned there are 2 keys you need to understand first before we see how the encryption process takes place:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Customer Master Key (CMK)&lt;/li&gt;
&lt;li&gt;Data Encryption Key (DEK)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Customer Master Keys/Root Keys/Key Encryption Keys (CMK)
&lt;/h3&gt;

&lt;p&gt;These are symmetric keys used to encrypt, decrypt, and re-encrypt data. It can also generate Data Encryption Keys that you can use outside of the KMS system. They follow the below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access to these must be restricted to the least endpoints&lt;/li&gt;
&lt;li&gt;Access to these should be secured through ACL&lt;/li&gt;
&lt;li&gt;These keys must be stored in a location that is secure like a KMS of a Hardware Security Module (to comply with &lt;a href="https://en.wikipedia.org/wiki/FIPS_140-2"&gt;FIPS 140-2&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In systems like Google Cloud Key Management Service, you have a hierarchy of keys as seen below with more information to be found &lt;a href="https://cloud.google.com/security/encryption/default-encryption#encryption_key_hierarchy_and_root_of_trust"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kv9CKtUj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198625726/DgTfDZpGk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kv9CKtUj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198625726/DgTfDZpGk.png" alt="Encryption Key Hierarchy at Google" width="800" height="1015"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Encryption Keys (DEK)
&lt;/h3&gt;

&lt;p&gt;Data keys are encryption keys you can use to encrypt data, including large amounts of data and other data encryption keys. Unlike CMK's, which can't be downloaded, data keys are returned to you for use outside of the KMS. Some of the best practices for DEKs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate DEKs locally&lt;/li&gt;
&lt;li&gt;When stored, always ensure DEKs are encrypted at rest&lt;/li&gt;
&lt;li&gt;For easy access, store the DEK near the data that it encrypts&lt;/li&gt;
&lt;li&gt;Generate a new DEK every time you write the data. This means you don't need to rotate the DEKs&lt;/li&gt;
&lt;li&gt;Do not use the same DEK to encrypt data from two different users&lt;/li&gt;
&lt;li&gt;Use a strong algorithm such as 256-bit Advanced Encryption Standard (AES)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Encryption Process
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;API request is sent to KMS to generate Data key using CMK&lt;/li&gt;
&lt;li&gt;KMS returns a response with Plain Data key and Encrypted Data key (using CMK)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nj9oh4mi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198711784/Bm05yko4g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nj9oh4mi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198711784/Bm05yko4g.png" alt="Generate Data Keys" width="426" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data is encrypted using Plain Data key&lt;/li&gt;
&lt;li&gt;Plain Data key is removed from memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4cZCJuui--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198735343/vjqUrCTa1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4cZCJuui--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198735343/vjqUrCTa1.png" alt="Encryption Process" width="479" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encrypted Data and Encrypted Data Key is packaged together as an envelope and stored&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--69sc_gQ4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198756845/mXf8rwGhU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--69sc_gQ4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198756845/mXf8rwGhU.png" alt="Encryption Process With Data Stored at Rest" width="654" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Decryption Process
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Encrypted Data key is extracted from the envelope&lt;/li&gt;
&lt;li&gt;API request is sent to KMS using Encrypted Data key which has information about CMK to be used in KMS for decryption&lt;/li&gt;
&lt;li&gt;KMS returns a response with Plain Data Key&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bN3kpXUA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198816460/dl8Q5RoPKew.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bN3kpXUA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198816460/dl8Q5RoPKew.png" alt="Getting Plaintext Data Key" width="564" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encrypted Data is decrypted using Plain Data key&lt;/li&gt;
&lt;li&gt;Plain Data Key is removed from memory&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How is Envelope Encryption Different From Other Encryption Patterns? 🤔
&lt;/h2&gt;

&lt;p&gt;Every service you build requires encryption at some point. This could be passwords or PII in a database, credentials for an external service, or even files in a filesystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuration Files
&lt;/h3&gt;

&lt;p&gt;You can easily handle some of these situations with a configuration file but they pose their own security risks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proper planning is needed to keep the data secure&lt;/li&gt;
&lt;li&gt;Multiple formats are present e.g - YAML, JSON and XML to name a few&lt;/li&gt;
&lt;li&gt;Exact storage locations may be hard-coded in the app, making deployment potentially problematic&lt;/li&gt;
&lt;li&gt;Parsing of the config files can be problematic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Symmetric Encryption
&lt;/h3&gt;

&lt;p&gt;You can encrypt data using a symmetric key but they suffer from a major issue which is Key Management.&lt;/p&gt;

&lt;p&gt;You need to find a way to get the key to the party with whom you are sharing data and if someone gets their hands on a symmetric key, they can decrypt everything encrypted with that key.&lt;/p&gt;

&lt;h3&gt;
  
  
  Asymmetric Encryption
&lt;/h3&gt;

&lt;p&gt;You can encrypt data using Asymmetric Encryption which is considered as a standard now a days. Some of the cons of it are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is a slow process which makes its not suitable for decrypting bulk messages&lt;/li&gt;
&lt;li&gt;When you lose your private key, your received messages will not be decrypted&lt;/li&gt;
&lt;li&gt;If your private key is identified by an attacker, all of your messages can be read by him/her&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Envelope Encryption
&lt;/h3&gt;

&lt;p&gt;Some of the benefits offered by it are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A combination of benefits from symmetric and asymmetric encryption&lt;/strong&gt; - The data is encrypted using a DEK which follows symmetric encryption. The DEK is encrypted by a CMK which follows asymmetric encryption. By using asymmetric encryption, encrypted DEKs can be shared and unencrypted only by those with access to the CMK, mitigating the key exchange problem of symmetric algorithms.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easier key management&lt;/strong&gt; - Multiple DEKs can be encrypted under a singular root key and ease the management of keys in a KMS. You can also do more secure key maintenance by rotating your root keys, instead of rotating and re-encrypting all of your DEKs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data key protection&lt;/strong&gt; - Because we encrypt the data key with the CMK, we don't have to worry about storing the encrypted data key. Thus, we can safely store the encrypted data key alongside the encrypted data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Management Systems &amp;amp; Why it Works at Scale? 🤔
&lt;/h2&gt;

&lt;p&gt;The biggest reason for Envelope Encryption and KMSs working at scale is &lt;strong&gt;Performance&lt;/strong&gt;. Like we mentioned before Asymmetric Encryptions are typically slow and Symmetric Encryptions are very fast but the management of keys is the issue. &lt;/p&gt;

&lt;p&gt;So in Envelope Encryption for a large quantity of data, you quickly encrypt it using symmetric encryption using a random key. Then just the key is encrypted using asymmetric encryption. This gives the benefits of asymmetric encryption, with the performance of symmetric encryption.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hdr6WaYn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198563732/1E9VcEqZ-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hdr6WaYn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1635198563732/1E9VcEqZ-.png" alt="KMS Used at Scale in Google" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Key Management Systems like AWS KMS, Azure Key Vault, and Google Cloud Key Management Service gives you a fully managed service to store and manage encryption keys. These use envelope encryption internally, and they’re used by default in a lot of services that support encryption in cloud infrastructure providers like AWS, GCP, Azure, and others.&lt;/p&gt;

&lt;p&gt;An ideal key management system should be highly available, it should control access to the master key(s), it should audit the key(s) usage, and finally, it should manage key(s) lifecycle.&lt;/p&gt;

&lt;p&gt;Thus by having the above characteristics and by using envelope encryption internally, Key Management Systems are ideal to handle encryption at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Envelope Encryption is one of the most trusted application security design patterns used at scale. It is the default encryption method used in services like AWS S3, GCP, and others. &lt;/p&gt;

&lt;p&gt;Hopefully, this enables you to understand how you can encrypt/decrypt a large amount of data using the envelope encryption method at scale in a more trusted setup.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! I really hope that you find this article useful. I invite you to participate in the discussion in the comments below, I'm always interested to know your thoughts and happy to answer any questions you might have in your mind. If you think this post was useful, please like the post to help promote this piece to others.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S Do feel free to connect with me on &lt;a href="https://www.linkedin.com/in/rohitjmathew"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/iamrohitjmathew"&gt;Twitter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Appendix
&lt;/h2&gt;

&lt;p&gt;This article leans heavily on the following material:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://jayendrapatil.com/tag/envelope-encryption/"&gt;Google Cloud Data Encryption - Jayendra's Cloud Certification Blog - &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html"&gt;AWS KMS concepts - AWS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lobster1234.github.io/2017/09/29/aws-kms-envelope-encryption/"&gt;AWS KMS and Envelope Encryption - Manish Pandit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.nilayparikh.com/security/application/cloud-architecture-patterns-envelope-encryption-or-digital-envelope-with-public-cloud-providers-part-1/"&gt;Cloud Architecture Pattern: Envelope Encryption (or Digital Envelope) with Public Cloud Providers Part 1 - Nilay Parikh&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/chiragdm/aws-kms-envelope-encryption-3689"&gt;AWS KMS Envelope Encryption - Chirag Modi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.ibm.com/docs/key-protect?topic=key-protect-envelope-encryption"&gt;Protecting data with envelope encryption - IBM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/kms/docs/envelope-encryption"&gt;Envelope encryption - GCP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/security/encryption/default-encryption"&gt;Encryption at rest in Google Cloud - GCP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/StJ1NOQjAjo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>security</category>
      <category>aws</category>
      <category>googlecloud</category>
      <category>encryption</category>
    </item>
    <item>
      <title>Run A Postgres Docker Container on Oracle Cloud Infrastructure</title>
      <dc:creator>Rohit Jacob Mathew</dc:creator>
      <pubDate>Thu, 29 Jul 2021 15:17:38 +0000</pubDate>
      <link>https://dev.to/rohitjmathew/run-a-postgres-docker-container-on-oracle-cloud-infrastructure-2ol2</link>
      <guid>https://dev.to/rohitjmathew/run-a-postgres-docker-container-on-oracle-cloud-infrastructure-2ol2</guid>
      <description>&lt;p&gt;In this article, I want to show how I quickly ran a Docker container for free on Oracle Cloud Infrastructure. I made use of a VM in the Always Free Tier of OCI and for a side project set up a dockerized Postgres database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Oracle Cloud Infrastructure
&lt;/h2&gt;

&lt;p&gt;Oracle offers an Always Free cloud services. You can see the details below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g-EElvwR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1627392039154/de-tKbxcu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g-EElvwR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1627392039154/de-tKbxcu.png" alt="Oracle Cloud Free Offering" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: the workload of a container has to fit in the shape of this always free VM: VM.Standard.E2.1.Micro, 1/8 OCPU, 1 GB RAM and up to 480 Mbps network bandwidth (see &lt;a href="https://docs.cloud.oracle.com/en-us/iaas/Content/FreeTier/resourceref.htm"&gt;docs&lt;/a&gt;). The boot volume offers just over 45GB of disk storage. In order for the container to be accessible, the ports mapped on the VM to container also have to be configured in ingress rules in the security list. We need to install Docker ourselves in the VM; it is provisioned with just an Oracle Linux image.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's get started&lt;/p&gt;

&lt;h2&gt;
  
  
  1) Get yourself a tenancy and create a VM
&lt;/h2&gt;

&lt;p&gt;The first thing we ought to do is create a VM. If you've got a cloud tenancy then you probably already know how to create an instance. If you're new to Oracle Cloud then watch the below video and create an "always free" VM by signing up at &lt;a href="https://cloud.oracle.com/free"&gt;https://cloud.oracle.com/free&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Fiu9BiNocJ4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Note: Most of the details like availability zone, image details, networking options are already pre-filled by Oracle and kept but can be adjusted if you want something specific. I went ahead with the standard settings.&lt;/p&gt;

&lt;p&gt;The VM will now be provisioned — as is indicated:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l19gecDR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1400/0%2AxGhUET08TkqbImko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l19gecDR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1400/0%2AxGhUET08TkqbImko.png" alt="Example of provisioned VM from [Oracle Developer Blog](https://medium.com/oracledevs/run-always-free-docker-container-on-oracle-cloud-infrastructure-c88e36b65610)" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a little while, the VM is up and running — and has a public IP address assigned to it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uBMHz55s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1400/0%2Ah0JYNsMZtsitKN2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uBMHz55s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1400/0%2Ah0JYNsMZtsitKN2t.png" alt="Example of running VM from [Oracle Developer Blog](https://medium.com/oracledevs/run-always-free-docker-container-on-oracle-cloud-infrastructure-c88e36b65610)" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The situation at this point can be visualized as is shown in the below figure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KykpiW0T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1272/0%2AbuppgWcJ5Wqgm3TK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KykpiW0T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1272/0%2AbuppgWcJ5Wqgm3TK.png" alt="Visualization of the VM setup from [Oracle Developer Blog](https://medium.com/oracledevs/run-always-free-docker-container-on-oracle-cloud-infrastructure-c88e36b65610)" width="636" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2) Setup Ingress Rules in Security List for VM to open up the ports required for whatever container you want to run
&lt;/h2&gt;

&lt;p&gt;The VM is associated with a public subnet in a Virtual Cloud Network. The security list(s) for this subnet should be configured with ingress rules that make the required traffic possible to the port(s) that will be mapped to the container image. Open the details page for the public subnet. Click on the security list (or create a new one)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9VOGCeEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1400/0%2AfgaHDl-hyONzSeh9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9VOGCeEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1400/0%2AfgaHDl-hyONzSeh9.png" alt="Subnet Screen from [Oracle Developer Blog](https://medium.com/oracledevs/run-always-free-docker-container-on-oracle-cloud-infrastructure-c88e36b65610)" width="784" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will run the Postgres container image. The port we will map in the VM to the Postgres container is one we can choose ourselves. Let’s pick 5432 which is the default port for Postgres. we need to configure an ingress rule as below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d2ePPP8g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1627395159097/36GiB4i22.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d2ePPP8g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1627395159097/36GiB4i22.png" alt="Ingress Rule Screenshot" width="800" height="673"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source CIDR is set to 0.0.0.0/0; along with Source Port Range left blank (i.e. All) this means that this rule applies to any client.&lt;/p&gt;

&lt;h2&gt;
  
  
  3) SSH into the VM, install Docker
&lt;/h2&gt;

&lt;p&gt;At this point, we have a running VM instance with just a Linux Operating System but no Docker. Let’s SSH into the VM using this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh opc@public-id-address -i private-key-file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the public-id-address with the public IP assigned to the VM. Replace private-key-file with a reference to the file that contains the SSH private key&lt;/p&gt;

&lt;p&gt;Now to install Docker, execute these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo yum-config-manager --enable ol7_addons 
sudo yum install docker-engine -y 
sudo systemctl start docker 
sudo systemctl enable docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iJwJSPyf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1400/0%2AtAhI8bQyLIaDPQ3T.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iJwJSPyf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/max/1400/0%2AtAhI8bQyLIaDPQ3T.png" alt="Docker installation screenshot from [Oracle Developer Blog](https://medium.com/oracledevs/run-always-free-docker-container-on-oracle-cloud-infrastructure-c88e36b65610)" width="800" height="723"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To run Docker as a non-root user, read &lt;a href="https://docs.docker.com/engine/security/rootless/"&gt;these instructions&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run Docker Container Image
&lt;/h2&gt;

&lt;p&gt;With Docker installed, we can now run the Postgres container image.&lt;/p&gt;

&lt;p&gt;Run the container image with this command. This might pull the docker image from Docker Hub if not present already. Don't forget to add a different password for &lt;code&gt;POSTGRES_PASSWORD&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo docker run -d -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=mysecretpassword postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use &lt;code&gt;sudo docker ps&lt;/code&gt; to verify if the container is running. The above command will start a PostgreSQL database and map ports using the following pattern: &lt;code&gt;-p &amp;lt;host_port&amp;gt;:&amp;lt;container_port&amp;gt;&lt;/code&gt;. Port 5432 of our container will be mapped on port 5432 of our host or server.&lt;/p&gt;

&lt;p&gt;Now, let's access the container on your host or server. We will create a database inside our Postgres container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo docker exec -it postgres bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you are ‘inside’ your container. We can access Postgres and create the database.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@12d48fde2627:/# psql -U postgres
psql (13.3 (Debian 13.3-1.pgdg100+1))
Type "help" for help.

postgres=# CREATE DATABASE testdb;
CREATE DATABASE
postgres=# \q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are finished. You can exit your container (&lt;code&gt;\q&lt;/code&gt;) and go to your local machine. Here you need some PostgreSQL Client tool installed like &lt;a href="https://dbeaver.io/"&gt;DBeaver&lt;/a&gt; or &lt;a href="https://www.pgadmin.org/"&gt;pgAdmin&lt;/a&gt;. Connect to the DB server by using the public IP as the host, &lt;code&gt;5432&lt;/code&gt; as the port, &lt;code&gt;postgres&lt;/code&gt; as the username, the &lt;code&gt;POSTGRES_PASSWORD&lt;/code&gt; you entered while running the container as the password and connect to the &lt;code&gt;testdb&lt;/code&gt;. Save the connection and you should now be able to access your DB.&lt;/p&gt;

&lt;h2&gt;
  
  
  Congrats, you have now run A Postgres Docker Container on Oracle Cloud Infrastructure!
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! I really hope that you find this article useful. I invite you to participate in the discussion in the comments below, I'm always interested to know your thoughts and happy to answer any questions you might have in your mind. If you think this post was useful, please like the post to help promote this piece to others.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S Do feel free to connect with me on &lt;a href="https://www.linkedin.com/in/rohitjmathew"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/iamrohitjmathew"&gt;Twitter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Appendix
&lt;/h2&gt;

&lt;p&gt;This article leans heavily on the following material:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://medium.com/oracledevs/run-always-free-docker-container-on-oracle-cloud-infrastructure-c88e36b65610"&gt;Run Always Free Docker Container on Oracle Cloud Infrastructure&lt;/a&gt; - Lucas Jellema&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://betterprogramming.pub/connect-from-local-machine-to-postgresql-docker-container-f785f00461a7"&gt;Connect From Your Local Machine to a PostgreSQL Database in Docker&lt;/a&gt; - Lorenz Vanthillo&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>cloud</category>
      <category>devops</category>
      <category>postgres</category>
      <category>docker</category>
    </item>
    <item>
      <title>Why Is a Social Login More Secure?</title>
      <dc:creator>Rohit Jacob Mathew</dc:creator>
      <pubDate>Mon, 07 Jun 2021 16:13:43 +0000</pubDate>
      <link>https://dev.to/rohitjmathew/why-is-a-social-login-more-secure-4jaf</link>
      <guid>https://dev.to/rohitjmathew/why-is-a-social-login-more-secure-4jaf</guid>
      <description>&lt;p&gt;I'm sure every developer would have written a demo login application at some point of time. We all start with the simple user defined ID and password. We then try to implement something like a social login as seen in the cover picture with say Google or Twitter. &lt;/p&gt;

&lt;p&gt;There obviously is more of a complex process involved in setting up a social login but for a user its as simple as clicking a buttons to log in. The ease of not having to remember an ID/password and just being able to signup/login through the click of a button is extremely beneficial to the user&lt;/p&gt;

&lt;h2&gt;
  
  
  What if I Told You This Was Way More Secure? 😉
&lt;/h2&gt;

&lt;p&gt;Social logins really help us achieve a few things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for multiple devices&lt;/li&gt;
&lt;li&gt;Single Sign On&lt;/li&gt;
&lt;li&gt;Simple to implement&lt;/li&gt;
&lt;li&gt;The ability to share data for users without having to release personal information&lt;/li&gt;
&lt;li&gt;Ability revoke an active session i.e not allow a third party access to the login and data&lt;/li&gt;
&lt;li&gt;There is no long lasting credentials being exchanged&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So What Drives This Technology? 🤔
&lt;/h2&gt;

&lt;p&gt;The underlying protocol used is something called &lt;a href="https://oauth.net/"&gt;OAuth&lt;/a&gt;. It is defined as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now I'm sure with the basic understand of social logins and the above definition we get some idea into this but let me use a simple example to explain how OAuth works.&lt;/p&gt;

&lt;p&gt;I remember my friend &lt;a href="https://twitter.com/lunatic_monk"&gt;Sumedh&lt;/a&gt; describing it with an interaction between a Mother, Father and their Son. Imagine that the mother wants some grocery from market and she wants the son to buy it for her. &lt;/p&gt;

&lt;p&gt;Before I go into the conversation let me set some context.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Mother:&lt;/strong&gt; The user of the application&lt;br&gt;
&lt;strong&gt;Son:&lt;/strong&gt; Third party client or in technical terms the OAuth Client&lt;br&gt;
&lt;strong&gt;Father:&lt;/strong&gt; The Social Account or in technical terms the OAuth Provider&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The conversation could possibly be as such:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Mother:&lt;/strong&gt; Hey son, go to market and bring me some coffee powder. Take the required money from your father.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Son:&lt;/strong&gt; Okay.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Son (OAuth client) goes to father (OAuth provider)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Son:&lt;/strong&gt; Hey dad, mom told me to take money from you since she wants some things from market.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Father (OAuth provider) asks mother (User) about the permission to give money to their son (OAuth client)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Father:&lt;/strong&gt; Hey, shall I give him the money and how much? &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Authorization of your application takes place here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mother:&lt;/strong&gt; Yes, please give it to him. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Permission grant by mother (User)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Son (OAuth client) gets the required things from market and returns them to mother (User). Here returning things to mother (User) can be thought of redirecting the user (or logging him) to the third party site.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For a more technical understanding of how this works in code &lt;a href="https://twitter.com/schneems"&gt;Richard Schneeman&lt;/a&gt; has this amazing video below to enable you to understand:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/tFYrq3d54Dc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Now Lets Put This All in Context
&lt;/h2&gt;

&lt;p&gt;Let's take the example of &lt;a href="https://dev.to/"&gt;the DEV Community&lt;/a&gt;. If you wanted to create an account on the DEV Community using twitter what would happen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Basically if the Sign up with Twitter button exists then the initial setup between the OAuth Client (Dev.to) and the OAuth Provider (Twitter) is already done.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Client triggers a permission grant page of the OAuth Provider based on the credentials it received from the initial setup. This looks something like below&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frdq10uh7xswz2k2w033z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frdq10uh7xswz2k2w033z.png" alt="Permission Grant Page" width="800" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Once you login and grant the permission the OAuth Provider redirects you back to the client and the client gets a token to access your information from the OAuth Provider. This access token enables the client to get specific data from the provider&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Based on that data the client then creates an account and logs you in&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What Happens on the Successive Login?
&lt;/h3&gt;

&lt;p&gt;Thats a good question. Now OAuth has multiple grant types and based on that we have different ways to get an access token  from the OAuth Provider. For all subsequent logins the OAuth Client will hit the provider and generate a new access token to get access to the data and do the login. &lt;/p&gt;

&lt;p&gt;Thus this enables us to achieve Single Sign On, the ability to share data for users without having to release personal information, ability to revoke access and the ability to not have long lasting credentials exchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope this short blog post helps you understand why social logins are more secure than the traditional username/password. I will be writing about the different OAuth Grant types in the future and will be providing code examples as well.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! I really hope that you find this article useful. I invite you to participate in the discussion in the comments below, I'm always interested to know your thoughts and happy to answer any questions you might have in your mind. If you think this post was useful, please like the post to help promote this piece to others.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks for reading! :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S Do feel free to connect with me on &lt;a href="https://www.linkedin.com/in/rohitjmathew"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/iamrohitjmathew"&gt;Twitter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>oauth</category>
      <category>auth0</category>
      <category>authorization</category>
    </item>
    <item>
      <title>JSON Web Token (JWT) and why we use them?</title>
      <dc:creator>Rohit Jacob Mathew</dc:creator>
      <pubDate>Tue, 15 Dec 2020 19:48:41 +0000</pubDate>
      <link>https://dev.to/rohitjmathew/json-web-token-jwt-and-why-we-use-them-42e3</link>
      <guid>https://dev.to/rohitjmathew/json-web-token-jwt-and-why-we-use-them-42e3</guid>
      <description>&lt;p&gt;So I wanted to talk about how we use JWT at Turtlemint. What is JWT (JSON Web Token) you ask? JSON Web Token (JWT) is an open standard (&lt;a href="https://tools.ietf.org/html/rfc7519" rel="noopener noreferrer"&gt;RFC 7519&lt;/a&gt;) for securely transmitting information between parties as JSON objects. &lt;/p&gt;

&lt;p&gt;Let me take you through the whole thing from scratch&lt;/p&gt;

&lt;h1&gt;
  
  
  Authentication vs Authorization
&lt;/h1&gt;

&lt;p&gt;Authentication is basically what happens when users sign-in. We check the user's identity based on some credentials of their e.g username/password. Authorization, on the other hand, checks if the above-validated user is able to access a certain flow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh7a1zqrhc5l5p2mdowaz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh7a1zqrhc5l5p2mdowaz.jpeg" alt="Authentication vs Authorisation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I am not going to dive into all the details of the authentication flow but a generic login form is the simplest example in which the client (e.g - browser) knows that this is an actual user and gets their details. It makes no sense to keep authenticating every single subsequent interaction of the user with a system as this will add extra processing time; and as the saying goes: time is money. Hence, we authenticate and then store specific data based on which we authorize the subsequent interactions. &lt;/p&gt;

&lt;p&gt;The simplest solution to enable this authorization flow is session-based authentication. In this, the server will create a session for the user after the user logs in. The session id is then stored on a cookie on the user's browser. While the user stays logged in, the cookie would be sent along with every subsequent request. The server can then compare the session id stored on the cookie against the session information stored in the memory to verify the user's identity and sends a response with the corresponding state! This obviously is not an optimal solution when you scale the system and leads to a stateful implementation where we are dependent on a server to authenticate every request.&lt;/p&gt;

&lt;h1&gt;
  
  
  Sounds good. What does JWT have to do with this?
&lt;/h1&gt;

&lt;p&gt;Good question. So token-based authentication like JWT is a much more scalable solution as JWT is stateless. That means the user state is never saved in the server memory but the state is stored inside the token on the client side itself. By transmitting these JWTs with requests to other parties, you can make those systems more secure too. Lets quickly run through the authentication and authorization flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;First, the user logs on to the authentication server using an authentication key (it can be a username / password pair, or a Facebook key, or a Google key, or a key from another account).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The authentication server then creates the JWT and sends it to the user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the user makes a request to the application API, he adds the previously received JWT to it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When a user makes an API request, the application can check whether the user is what he claims to be, using the JWT from the request. In this scheme, the application server is configured to be able to check whether the incoming JWT is exactly what was created by the authentication server (the verification process will be explained later in more detail).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Oh, interesting 🤔 So what does a JWT look like?
&lt;/h1&gt;

&lt;p&gt;A JSON Web Token consists of 3 parts separated by periods.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

header.payload.signature


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnnlj28mktvktjowp7dtv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnnlj28mktvktjowp7dtv.png" alt="Structure of JSON Web Token (JWT)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Header
&lt;/h3&gt;

&lt;p&gt;The header typically only contains 2 details: the type of token (JWT in this case) and the hashing algorithm used by the token such as RSA, HMAC, or SHA256. This generally uses HS256 by default.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

{
 "alg": "HS256",
 "typ": "JWT"
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Payload
&lt;/h3&gt;

&lt;p&gt;The actual data pertaining to a user is what we call claims. These claims can be of 3 types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reserved claims:&lt;/strong&gt; These are some predefined claims which are not mandatory but recommended to use. These help the application judge the authenticity of the token. Some of them are iss (issuer), exp (expiration time), sub (subject), aud (audience), among others. The full list is available &lt;a href="https://auth0.com/docs/tokens/json-web-tokens/json-web-token-claims" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Public claims:&lt;/strong&gt; These can be defined at will by those using JWTs. To avoid issues they should be defined in the IANA JSON Web Token Registry. &lt;a href="https://auth0.com/docs/tokens/json-web-tokens/json-web-token-claims#public-claims" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is some more information regarding public claims.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Private claims:&lt;/strong&gt; These are the custom claims created to share information between parties that agree on using them. Examples could be specific values such as employee ID and department name.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the below code snippet you can see different types of claims being used where iss is a reserved claim, name is a public claim and admin is a private claim.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

{
  [...]
  "iss": "https://rohitjmathew.space",
  "name": "Rohit Jacob Mathew",
  "admin": false
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;REMEMBER: Do not put large data in claim sets. Claim sets are meant to be compact. Also, do not put sensitive information, since JWT can be decoded easily.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Signature
&lt;/h3&gt;

&lt;p&gt;The signature is the most important part of a JSON Web Token (JWT). It is calculated by encoding the header and payload using Base64url Encoding and concatenating them with a period separator, which is then run through the cryptographic algorithm.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

// signature algorithm
data = base64urlEncode( header ) + "." + base64urlEncode( payload )
signature = HMAC( data, secret_salt )


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;So when the header or payload changes, the signature has to be calculated again.&lt;/p&gt;

&lt;h3&gt;
  
  
  Put Together
&lt;/h3&gt;

&lt;p&gt;Thus the JWT looks like:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&lt;p&gt;token = encodeBase64Url(header) + '.' + encodeBase64Url(payload) + '.' + encodeBase64Url(signature)&lt;/p&gt;

&lt;p&gt;token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3JvaGl0am1hdGhldy5zcGFjZSIsIm5hbWUiOiJSb2hpdCBKYWNvYiBNYXRoZXciLCJhZG1pbiI6ZmFsc2V9.ZOCcJAceq0Uq3fuIfWA0FVT_BLi5o-iPvyN4rhZgBuo&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Securing JWT&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;I'm sure if you took the above JWT and checked on &lt;a href="https://jwt.io/" rel="noopener noreferrer"&gt;jwt.io&lt;/a&gt; you could see all the data in the token. This brings up the question of how is this secure?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;It's absolutely crucial to know that JWT's are generally encoded and not encrypted. It is a mechanism by which you can verify that the data is not tampered with and has come from a trusted source.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A simple way in which you can ensure that JWT's are secure is by ensuring your requests are sent on &lt;a href="https://howhttps.works/" rel="noopener noreferrer"&gt;HTTPS&lt;/a&gt; endpoints in which all data being passed in the request is encrypted.&lt;/p&gt;

&lt;p&gt;Now, JWT uses two mechanisms to secure the information within it- signing and encryption. The two standards that describe these security features of JWT are &lt;a href="https://tools.ietf.org/html/rfc7515" rel="noopener noreferrer"&gt;JSON Web Signature&lt;/a&gt; (JWS) and &lt;a href="https://www.rfc-editor.org/info/rfc7516" rel="noopener noreferrer"&gt;JSON Web Encryption&lt;/a&gt; (JWE). Let me give you a rundown on them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Signing
&lt;/h3&gt;

&lt;p&gt;The purpose of a signature is to allow one or more parties to establish the authenticity of the JWT. Say I change the values in the payload above on jwt.io and try using it from my client. Well, that's where we can use JWS to sign the token and let it verify that the data contained in the JWT has not been tampered with.&lt;/p&gt;

&lt;p&gt;Now if you remember the signature is basically the encoded header and payload concatenated with a period and then run through a hashing algorithm with a secret key.&lt;br&gt;
 &lt;br&gt;
This signature attached at the end enables us to determine if the JWT has been tampered with because for any change in the data the signature will change. A signature, however, does not prevent other parties from reading the contents of the JWT. This is what encryption is designed to do.&lt;/p&gt;

&lt;h3&gt;
  
  
  Encryption
&lt;/h3&gt;

&lt;p&gt;While signing a JWT provides a means to establish the authenticity of the JWT contents, encryption provides a way to keep the contents of the JWT unreadable to third parties.&lt;/p&gt;

&lt;p&gt;An encrypted JWT is known as JWE (JSON Web Encryption) and, unlike JWS, its compact serialization form has 5 elements separated by dots. Similar to JWS, it can use two cryptographic schemes: a shared secret scheme and a public/private-key scheme.&lt;/p&gt;

&lt;h1&gt;
  
  
  Wow, 😮 That's so cool. So how do you use JWT at Turtlemint?
&lt;/h1&gt;

&lt;p&gt;We predominantly use JWT to allow us to transfer data between multiple applications as well as between domains with greater security. &lt;/p&gt;

&lt;p&gt;As we have multiple products across multiple domains, this results in us having to transfer data from one domain to another in a more secure manner. A common problem you will see when doing something like this is CORS issues. JWT tokens enable the sharing of these resources in small containers as a part of the API call while also enabling us to validate the data (to be authentic). We also have services that need to interact with each other over the internet and use JWT to pass user-related data between them more securely.&lt;/p&gt;

&lt;h1&gt;
  
  
  Additional Info
&lt;/h1&gt;

&lt;p&gt;Use the ebook below to better understand JWT. This is provided by &lt;a href="https://auth0.com/" rel="noopener noreferrer"&gt;Auth0&lt;/a&gt; one of the leading providers of authentication, security, and identity solutions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://auth0.com/resources/ebooks/jwt-handbook" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.ctfassets.net%2F2ntc334xpx65%2F2B6gm5HYfueAYcos424oum%2F44b954d52bbaed32f5c84f4a264bf576%2FeBook_JWT_Handbook.png" alt="JWT Handbook picture"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;I hope you were able to understand what JSON Web Token (JWT) is and a few instances where we use them at Turtlemint. As long as you understand the basic concepts behind it you should be able to use them across multiple scenarios to either authenticate or transfer data in a more secure manner. Do reach out or comment below interesting use cases you have used them in.&lt;/p&gt;

&lt;p&gt;Thanks for reading! :)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S Do feel free to connect with me on &lt;a href="https://www.linkedin.com/in/rohitjmathew/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and happy to answer any questions you might have in your mind.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>turtlemint</category>
      <category>auth0</category>
      <category>jwt</category>
      <category>security</category>
    </item>
  </channel>
</rss>
