<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Prateek Pardeshi's Blog]]></title><description><![CDATA[ ]]></description><link>https://blogs.prateek.pardeshi.ovh</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 19:21:57 GMT</lastBuildDate><atom:link href="https://blogs.prateek.pardeshi.ovh/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to keep Amazon Virtual Private Cloud Secure?]]></title><description><![CDATA[What is Amazon Virtual Private Cloud?
As AWS (Amazon Web Services) is used by many companies worldwide, keeping cloud security by following safety measures are most important. Amazon Virtual Private Cloud (VPC) is a virtual network that enables you t...]]></description><link>https://blogs.prateek.pardeshi.ovh/how-to-keep-amazon-virtual-private-cloud-secure</link><guid isPermaLink="true">https://blogs.prateek.pardeshi.ovh/how-to-keep-amazon-virtual-private-cloud-secure</guid><category><![CDATA[AWS]]></category><category><![CDATA[vpc]]></category><dc:creator><![CDATA[Prateek Pardeshi]]></dc:creator><pubDate>Tue, 26 Dec 2023 18:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1706466310582/05347dd6-df18-444d-92bc-90512502e553.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-what-is-amazon-virtual-private-cloud">What is Amazon Virtual Private Cloud?</h3>
<p>As AWS (Amazon Web Services) is used by many companies worldwide, keeping cloud security by following safety measures are most important. Amazon Virtual Private Cloud (VPC) is a virtual network that enables you to launch AWS resources in a logically isolated section of the AWS Cloud. Ensuring the security of your VPC is paramount to protect your cloud-based infrastructure and applications. You can launch AWS resources in a logically isolated virtual network that you've defined.</p>
<p><strong>Features of Amazon VPC:</strong> Creation of Virtual Private Clouds (VPCs), addition of subnets, IP addressing (IPv4 and IPv6), routing with route tables, gateways (internet and VPC endpoints), VPC peering connections, Traffic Mirroring, Transit Gateways for centralized routing, VPC Flow Logs for capturing IP traffic details, and VPN connections to link VPCs with on-premises networks using AWS Virtual Private Network (AWS VPN).</p>
<h3 id="heading-safe-practices-to-keep-amazon-vpc-secure"><strong>Safe Practices to keep Amazon VPC secure:</strong></h3>
<p>By incorporating these practices and leveraging the associated AWS services, you can establish a robust and secure foundation for your Virtual Private Cloud on AWS. Regularly review and update these configurations to adapt to evolving security requirements and best practices:  </p>
<ol>
<li><p><strong>Multiple Availability Zones:</strong></p>
<p> When creating subnets for your VPC to host your application, it's crucial to distribute them across multiple Availability Zones. Availability Zones are isolated data centers within an AWS Region, each with its own power, networking, and connectivity. This design ensures high availability, fault tolerance, and scalability for your production applications. In the event of a failure in one Availability Zone, your application can seamlessly operate from resources in another, enhancing overall resilience. For more detailed information on setting up Amazon VPC across multiple Availability Zones, refer to the official Amazon VPC documentation.</p>
</li>
<li><p><strong>Security Groups for EC2 Instances:</strong></p>
<p> Security Groups act as virtual firewalls at the instance level. They control inbound and outbound traffic to EC2 instances in your subnets. By configuring security groups, you can specify allowed traffic based on protocols, ports, and source/destination IP addresses. This provides a fine-grained control mechanism to enhance the security posture of your instances. For more details on setting up and managing security groups, consult the AWS Security Groups documentation.</p>
</li>
<li><p><strong>Network ACLs for Subnet Traffic Control:</strong></p>
<p> Network Access Control Lists (NACLs) operate at the subnet level, allowing you to control inbound and outbound traffic. NACLs are stateless and use numbered rules to filter traffic. They offer an additional layer of security for your VPC, complementing the security groups associated with EC2 instances. Refer to the Control traffic to subnets using network ACLs documentation for comprehensive information on configuring and managing network ACLs.</p>
</li>
<li><p><strong>IAM for Access Management:</strong></p>
<p> AWS Identity and Access Management (IAM) plays a critical role in managing access to resources within your VPC. With IAM, you can control access for federated identities, users, and roles. This granular control allows you to define who can access specific AWS resources, including those within your VPC. For detailed guidance on implementing IAM for VPC access management, consult the Identity and access management for Amazon VPC documentation.</p>
</li>
<li><p><strong>VPC Flow Logs for Monitoring:</strong></p>
<p> VPC Flow Logs provide detailed insights into IP traffic going to and from your VPC, subnets, or network interfaces. By enabling VPC Flow Logs, you can monitor and analyze network traffic patterns, aiding in security analysis, troubleshooting, and compliance monitoring. To set up and configure VPC Flow Logs, refer to the VPC Flow Logs documentation.</p>
</li>
<li><p><strong>Network Access Analyzer for Security Audits:</strong></p>
<p> AWS Network Access Analyzer is a tool that helps identify unintended network access to resources in your VPCs. It enables you to perform security audits and ensures that your network configurations align with your security policies. For detailed instructions on using Network Access Analyzer, refer to the Network Access Analyzer Guide.</p>
</li>
<li><p><strong>AWS Network Firewall for Traffic Filtering:</strong></p>
<p> AWS Network Firewall is a managed service that allows you to monitor and protect your VPC by filtering inbound and outbound traffic. It provides an additional layer of security by inspecting and controlling traffic based on defined rules. For detailed information on setting up and configuring AWS Network Firewall, refer to the AWS Network Firewall Guide.</p>
</li>
</ol>
<p>Thank you for reading this article, I hope this helps!</p>
<p>References:</p>
<ul>
<li><p>AWS Docs: <a target="_blank" href="https://docs.aws.amazon.com/vpc/latest/userguide/security.html">https://docs.aws.amazon.com/vpc/latest/userguide/security.html</a></p>
</li>
<li><p><a target="_blank" href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Improve and secure web applications using AWS WAF]]></title><description><![CDATA[What is AWS WAF?
AWS (Amazon Web Services) is a very popular cloud platform used by many of the enterprise software companies to manage, deploy and release their applications across cloud. In fact, I also use AWS daily at my work.
AWS has a service n...]]></description><link>https://blogs.prateek.pardeshi.ovh/improve-and-secure-web-applications-using-aws-waf</link><guid isPermaLink="true">https://blogs.prateek.pardeshi.ovh/improve-and-secure-web-applications-using-aws-waf</guid><category><![CDATA[AWS]]></category><category><![CDATA[waf]]></category><dc:creator><![CDATA[Prateek Pardeshi]]></dc:creator><pubDate>Mon, 25 Dec 2023 18:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1706458252876/66d2127e-d016-4bea-bb80-73962f54e766.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-what-is-aws-waf">What is AWS WAF?</h3>
<p>AWS (Amazon Web Services) is a very popular cloud platform used by many of the enterprise software companies to manage, deploy and release their applications across cloud. In fact, I also use AWS daily at my work.</p>
<p>AWS has a service named AWS WAF (Web Application Firewall) which helps a user to protect against common web exploits and bots that that can affect availability, compromise security, or consume excessive resources. It also lets you monitor the HTTP(s) requests that are forwarded to your protected web application resources.</p>
<h3 id="heading-how-aws-waf-works">How AWS WAF works?</h3>
<p>AWS WAF can control how protected resources respond to HTTP(S) web requests. This can be done by defining a web access control list (ACL) and then associating it with one or more web application resources that you want to protect. The associated resources forward incoming requests to AWS WAF for inspection by the web ACL.</p>
<p>In your web ACL, you create rules to define traffic patterns to look for in requests and to specify the actions to take on matching requests. It provides us with the following action choices for resource protection:</p>
<ul>
<li><p>Allow the requests to go to the protected resource for processing and response.</p>
</li>
<li><p>Block the requests.</p>
</li>
<li><p>Count the requests.</p>
</li>
<li><p>Run CAPTCHA or challenge checks against requests to verify human users and standard browser use.</p>
</li>
</ul>
<h3 id="heading-components-of-aws-waf">Components of AWS WAF :</h3>
<p>The following are the central components of AWS WAF:</p>
<ul>
<li><p><strong>Web ACLs</strong> – You use a web access control list (ACL) to protect a set of AWS resources. You create a web ACL and define its protection strategy by adding rules. Rules define criteria for inspecting web requests and they specify the action to take on requests that match their criteria. You also set a default action for the web ACL that indicates whether to block or allow through any requests that the rules haven't already blocked or allowed. For more information about web ACLs, see <a target="_blank" href="https://docs.aws.amazon.com/waf/latest/developerguide/web-acl.html">WAF Web access control lists (web ACLs)</a>.</p>
<p>  A web ACL is an AWS WAF resource.</p>
</li>
<li><p><strong>Rules</strong> – Each rule contains a statement that defines the inspection criteria, and an action to take if a web request meets the criteria. When a web request meets the criteria, that's a match. You can configure rules to block matching requests, allow them through, count them, or run bot controls against them that use CAPTCHA puzzles or silent client browser challenges. For more information about rules, see <a target="_blank" href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-rules.html">AWS WAF rules</a>.</p>
<p>  A rule is not an AWS WAF resource. It only exists in the context of a web ACL or rule group.</p>
</li>
<li><p><strong>Rule groups</strong> – You can define rules directly inside a web ACL or in reusable rule groups. AWS Managed Rules and AWS Marketplace sellers provide managed rule groups for your use. You can also define your own rule groups. For more information about rule groups, see <a target="_blank" href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-groups.html">AWS WAF Rule groups</a>.</p>
<p>  A rule group is an AWS WAF resource.</p>
</li>
</ul>
<h3 id="heading-aws-waf-bot-control">AWS WAF Bot Control:</h3>
<p>With Bot Control, you have the capability to effortlessly monitor, block, or impose rate limits on various types of bots, including scrapers, scanners, crawlers, status monitors, and search engines. When employing the targeted inspection level within the rule group, there is also the option to issue challenges to bots that do not self-identify, thereby increasing the difficulty and cost for malicious bots attempting to exploit your website. You can secure your applications by utilizing the Bot Control managed rule group independently or in conjunction with other AWS Managed Rules rule groups and your customized AWS WAF rules.</p>
<p>For more information about the Bot Control managed rule group, see <a target="_blank" href="https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html">AWS WAF Bot Control rule group</a>.</p>
<h3 id="heading-aws-waf-fraud-control-account-creation-fraud-prevention-acfp">AWS WAF Fraud Control account creation fraud prevention (ACFP):</h3>
<p>Account creation fraud is an online illegal activity in which an attacker tries to create one or more fake accounts. Attackers use fake accounts for fraudulent activities such as abusing promotional and sign up bonuses, impersonating someone, and cyberattacks like phishing. The presence of fake accounts can negatively impact your business by damaging your reputation with customers and exposure to financial fraud. AWS WAF offers this feature in the AWS Managed Rules rule group <code>AWSManagedRulesACFPRuleSet</code> with companion application integration SDKs.</p>
<p>ACFP protects your account sign-up pages by monitoring account sign-up requests for anomalous activity and by automatically blocking suspicious requests. The rule group uses request identifiers, behavioral analysis, and machine learning to detect fraudulent requests.</p>
<ul>
<li><p><strong>Request inspection</strong> – ACFP gives you visibility and control over anomalous account creation attempts and attempts that use stolen credentials, to prevent the creation of fraudulent accounts.</p>
</li>
<li><p><strong>Response inspection</strong> – For CloudFront distributions, in addition to inspecting incoming account creation requests, the ACFP rule group inspects your application's responses to account creation attempts, to track success and failure rates.</p>
</li>
</ul>
<h3 id="heading-aws-waf-fraud-control-account-takeover-prevention-atp">AWS WAF Fraud Control account takeover prevention (ATP):</h3>
<p>Account takeover is an online illegal activity in which an attacker gains unauthorized access to a person's account. The attacker might do this in a number of ways, such as using stolen credentials or guessing the victim's password through a series of attempts. When the attacker gains access, they might steal money, information, or services from the victim. AWS WAF offers this feature in the AWS Managed Rules rule group <code>AWSManagedRulesATPRuleSet</code> and companion application integration SDKs.</p>
<p>The ATP managed rule group labels and manages requests that might be part of malicious account takeover attempts. The rule group does this by inspecting login attempts that clients send to your application's login endpoint.</p>
<ul>
<li><p><strong>Request inspection</strong> – ATP gives you visibility and control over anomalous login attempts and login attempts that use stolen credentials, to prevent account takeovers that might lead to fraudulent activity.</p>
</li>
<li><p><strong>Response inspection</strong> – For CloudFront distributions, in addition to inspecting incoming login requests, the ATP rule group inspects your application's responses to login attempts, to track success and failure rates.</p>
</li>
</ul>
<h3 id="heading-aws-waf-can-protect-these-resources">AWS WAF can protect these resources:</h3>
<ul>
<li><p><strong>Amazon CloudFront distributions:</strong></p>
<p>  AWS WAF web ACL can be associated with a CloudFront distribution using the AWS WAF console or APIs. You can also associate a web ACL with a CloudFront distribution when you create or update the distribution itself. To configure an association in AWS CloudFormation, you must use the CloudFront distribution configuration</p>
</li>
<li><p><strong>Regional resources:</strong></p>
<p>  You can protect regional resources in all Regions where AWS WAF is available. You can use AWS WAF to protect the following regional resource types:</p>
<ul>
<li><p>Amazon API Gateway REST API</p>
</li>
<li><p>Application Load Balancer</p>
</li>
<li><p>AWS AppSync GraphQL API</p>
</li>
<li><p>Amazon Cognito user pool</p>
</li>
<li><p>AWS App Runner service</p>
</li>
<li><p>AWS Verified Access instance</p>
</li>
</ul>
</li>
<li><p><strong>Restrictions on multiple resource associations:</strong></p>
<p>  single web ACL can be associated with one or more AWS resources, with the following restrictions:</p>
<ul>
<li><p>You can associate each AWS resource with only one web ACL. The relationship between web ACL and AWS resources is one-to-many.</p>
</li>
<li><p>You can associate a web ACL with one or more CloudFront distributions. You cannot associate a web ACL that you have associated with a CloudFront distribution with any other AWS resource type.</p>
</li>
</ul>
</li>
</ul>
<p>References:</p>
<ul>
<li><p><a target="_blank" href="https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html">AWS Docs: h</a><a target="_blank" href="https://docs.aws.amazon.com/waf/latest/developerguide/how-aws-waf-works.html">ttps://docs.aws.amazon.com/waf/latest/developerguide/how-aws-waf-works.html</a></p>
</li>
<li><p>Cover image: <a target="_blank" href="https://stepstocloud.com/what-is-aws-waf/">https://stepstocloud.com/what-is-aws-waf/</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[How to save Cryptocurrency Wallets from attackers?]]></title><description><![CDATA[Craze of Cryptocurrency
Cryptocurrency has been a popular topic of conversation for a good number of years, but in the most recent years, its awareness has skyrocketed. What was formerly an alternative investment that was only available to speculator...]]></description><link>https://blogs.prateek.pardeshi.ovh/how-to-save-cryptocurrency-wallets-from-attackers</link><guid isPermaLink="true">https://blogs.prateek.pardeshi.ovh/how-to-save-cryptocurrency-wallets-from-attackers</guid><category><![CDATA[Cryptocurrency]]></category><category><![CDATA[crypto wallet]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Prateek Pardeshi]]></dc:creator><pubDate>Wed, 29 Jun 2022 19:41:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1656618035474/TfVb0o8n6.avif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-craze-of-cryptocurrency">Craze of Cryptocurrency</h3>
<p>Cryptocurrency has been a popular topic of conversation for a good number of years, but in the most recent years, its awareness has skyrocketed. What was formerly an alternative investment that was only available to speculators is now being publicly considered a feasible choice for a piece of the portfolio of every investor, even in retirement funds. This includes the possibility of investing in cryptocurrencies.</p>
<h3 id="heading-ways-to-store-cryptocurrency">Ways to store Cryptocurrency:</h3>
<h4 id="heading-1-paper-wallets">1. Paper Wallets:</h4>
<p>Cold storage is the typical category for paper wallets. It's a real duplicate of your public and private keys, such as a printout on paper. There is a good chance that you'll feel safe with one of them. Money may be transferred from a paper wallet to a digital one using a software client or a QR code scan.</p>
<h4 id="heading-2-online-wallets">2. Online Wallets:</h4>
<p>Online wallets, by an understanding of the term, are hot. With a cloud wallet, your money is always within reach, regardless of where you are or what device you're using. They're quite handy, but they keep your private keys online, where they're vulnerable to hackers.</p>
<h4 id="heading-3-desktop-wallets">3. Desktop Wallets:</h4>
<p>Desktop wallet software may be installed on a desktop computer, laptop, tablet, or mobile phone. It's safe to say that their money is in high demand. Desktop and mobile wallets are both quite safe, but you still need to take precautions to avoid getting infected.</p>
<h4 id="heading-4-hardware-wallets">4. Hardware Wallets:</h4>
<p>Hardware wallets store your private keys on an external device like a USB. They're completely ice cold and safe there. Further, they may also pay through the internet. Some hardware wallets may be accessed through a web interface and can store a variety of different cryptocurrencies.</p>
<h3 id="heading-ways-to-save-cryptocurrency-wallets-from-attackers">Ways to save Cryptocurrency Wallets from attackers:</h3>
<h4 id="heading-1-multi-signaturemultisig-in-wallets">1. Multi-Signature(multisig) in wallets:</h4>
<p>When a user wishes to transfer money from their crypto wallet, they must first generate and sign a transaction. The signature essentially signifies the user's confirmation as the owner of the money, as well as ownership of keys to manage the assets. Most importantly, the signature suggests the user's permission for the transaction. For signing transactions, most cryptocurrency wallets need just one signature. A "multisig" wallet, on the other hand, is significantly different since it is shared by two or more users, and transactions with the wallet need signatures from all users.</p>
<h4 id="heading-2-backup-wallet-regularly">2. Backup wallet regularly:</h4>
<p>To prevent losing your whole bitcoin holdings, it's important to make frequent backups. The only way to get the money out of a digital wallet if the computer fails is if you have a history of backups. If you want to be safe, you should copy all of your wallet.dat files and then disperse those copies to several safe places (like on a USB, on the hard drive, and on CDs). Additionally, ensure that the backup has a secure password.</p>
<h4 id="heading-3-use-2fa-authentication">3. Use 2FA Authentication:</h4>
<p>Always use two-factor authentication to protect your online accounts. Always choose software or hardware 2FA tools over SMS if available. Two-factor authentication (2FA) is an additional security measure used to verify the identity of account login requests. As a first step, a user must provide their login credentials. When this happens, they won't be granted access right once but will have to provide further information.</p>
<h4 id="heading-4-update-software-regularly">4. Update Software regularly:</h4>
<p>Update your software regularly. If your bitcoin wallet is using outdated software, you might be an easy target for hackers. Keeping your bitcoins safer is a priority, which is why you should always use the most recent version of wallet software. When using the most recent software, you have a better chance of avoiding a major crisis due to the wallet's increased security.</p>
<h4 id="heading-5-beware-of-phishing-methods">5. Beware of Phishing methods:</h4>
<p>Phishing is a kind of social engineering assault that is often used to obtain user information, such as login passwords and credit card details. It happens when an attacker, acting as a trustworthy entity, dupes a victim into opening an email, instant message, or text message. Next, a dangerous link is deceived into being clicked by the recipient. This may cause malware to be installed on the recipient's computer, a ransomware assault to lock it down, or the disclosure of private data.</p>
]]></content:encoded></item><item><title><![CDATA[GSoC '21 with Pidgin: Project Report]]></title><description><![CDATA[Journey as Google Summer of Code 2021 Student with Pidgin: Project Report
Project Overview:
Pidgin's primary use case is that it acts as a messaging client for multiple chat
networks. This project proposal aims to ease the account creation/edit proce...]]></description><link>https://blogs.prateek.pardeshi.ovh/gsoc-21-with-pidgin-week-15</link><guid isPermaLink="true">https://blogs.prateek.pardeshi.ovh/gsoc-21-with-pidgin-week-15</guid><dc:creator><![CDATA[Prateek Pardeshi]]></dc:creator><pubDate>Thu, 15 Jul 2021 12:28:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1629735337828/sCvUkPeYg.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Journey as Google Summer of Code 2021 Student with Pidgin: Project Report</p>
<p><strong>Project Overview:</strong>
Pidgin's primary use case is that it acts as a messaging client for multiple chat
networks. This project proposal aims to ease the account creation/edit process
through an assistant that uses a GtkAssistant based flow and creating gtk widgets for each page.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1629735946609/d--lUaVRp.jpeg" alt="GSoC Dashboard.jpg" /></p>
<p><strong>Project Goals:</strong>
The present account creation process seems a bit intimidating to the non-technical users, so this project idea would focus on making the account adding process easier for everyone. This assistant would help users to add their accounts into pidgin with the protocol of their choice. This assistant would have multiple pages made up of gtk widgets which would guide a user in adding their account. Introducing this feature would attract more users to add their accounts in Pidgin with
ease.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1626431323187/_nS7KueEO.png" alt="Screenshot from 2021-07-16 11-12-04.png" /></p>
<p>Page 1 of the Account Assistant (Protocol Page):</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1626436491013/hJ7XLEglV.png" alt="Screenshot from 2021-07-15 02-06-57.png" /></p>
<p><strong>File Structure:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1626438443407/czQHIhy49.png" alt="Screenshot from 2021-07-16 17-57-04.png" /></p>
<p>Page 2 &amp; Page 3 Wireframes: (Shown to Mentor in the last Google meet)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1626437697788/uTGLAwP_z.png" alt="Untitled Diagram.png" /></p>
<p>Page 2 of Account Assistant (Account adding page):</p>
<p>XML file UI of the second page of assistant made using Glade</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1626437740046/-1oxjG5TN.png" alt="Screenshot from 2021-07-16 17-41-16.png" /></p>
]]></content:encoded></item><item><title><![CDATA[My Journey of Google Summer of Code with Pidgin]]></title><description><![CDATA[Google Summer of Code is a global program focused on bringing more student developers into open source software development. Students work with an open source organization on a 10 week programming project during their break from school.
GSoC is not o...]]></description><link>https://blogs.prateek.pardeshi.ovh/my-journey-of-google-summer-of-code-with-pidgin</link><guid isPermaLink="true">https://blogs.prateek.pardeshi.ovh/my-journey-of-google-summer-of-code-with-pidgin</guid><category><![CDATA[gsoc]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[C]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Prateek Pardeshi]]></dc:creator><pubDate>Sun, 04 Jul 2021 20:58:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1625426682605/bWbklPYpG.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Google Summer of Code</strong> is a global program focused on bringing more student developers into open source software development. Students work with an open source organization on a 10 week programming project during their break from school.
GSoC is not only about coding itself, rather it is more about communication, community bonding, documentation, and more exciting stuff.</p>
<h3 id="how-i-got-started-with-open-source">How I got started with Open Source?</h3>
<p>It was in the month of October 2019, when I went to a local meetup of Hacktoberfest at
Chennai where I met Mr.  <a target="_blank" href="https://twitter.com/anirudh24seven">Anirudh S</a>  (who was a GSoC’11 student for Wordpress). He introduced me to Open Source for the first time and also cleared my doubts regarding that, he also motivated me to contribute to Open Source organisations, solving issues and trying something new with the code. </p>
<p>After that I contributed to various organisations like LBRY, UNO Platform and more, though they were small edits in the documentation, but they were good to start and getting familiarity with the Open Source.</p>
<p>After few months, I contributed to GatsbyJs as a translator for German language, I even got a invite to join the organisation as a part of Maintaining Team until they revoke the program after August 2020.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1625428876891/CmAAN0KE9.png" alt="Screenshot from 2021-07-05 01-30-35.png" /></p>
<p>After that I participated in GirlScript Summer of Code, contributed to Ovuli, an app to track the menstrual cycle in women, and also mentored students in StudentCodein (3-month Open Source program) </p>
<h3 id="journey-to-gsoc">Journey to GSoC</h3>
<p>I wanted to participate in GSoC since 2020, but I didn't get a chance to do so. So, I wanted to participate in Google Summer of Code anyhow, because it is one of the excellent opportunity to learn from, work and contribute to the huge Open Source projects which can have a enormous impact on the community and the users.</p>
<p>I joined a Open Source Community named "HypnOS" maintained by <a target="_blank" href>Sahil Jha</a>, <a target="_blank" href="https://twitter.com/HastagAB/">Ayush Bhardwaj</a> and Kaushlendra. This community helped me a lot with my questions, doubts, and also the proposal review.</p>
<p>In the month of February 2021, I got accepted as an <strong>Open Source Fellow</strong> at <strong>HackIllinois Fellowship</strong>, where I contributed to <strong>LLVM Compiler Infrastucture</strong> under the mentorship of <strong>Michael Kruse</strong> (maintainer of Polly).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1625429773362/fX6LdsNym.jpeg" alt="HackIllinois Fellowship Selection.jpeg" /></p>
<p>I contributed to the Polly, which is polyhedral loop optimiser for LLVM, and became an <strong>Outstanding Contributor</strong> to that project, whom were announced during the closing ceremony of Fellowship.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1625430213385/iwtz42TAR.png" alt="vlcsnap-2021-07-05-01h51m41s279.png" /></p>
<p>I was interested in linux, so I choose to contribute into the GNOME Foundation, I saw a variety of projects at GNOME, some are written in C, Vala, Rust, and more. I only have knowledge about C language and also started learning about GTK, then I contributed to Nautilus(File Manager of GNOME), and was making myself familiar to Nautilus's code base.</p>
<p>i wanted to participate into GSoC with GNOME as org and Nautilus as the project, but when the project list for GSoC was released, Nautilus was not in the list.</p>
<p>I kept on searching for the organisations with C and GTK as the tech stack and finally found Pidgin on the GSoC org page.</p>
<h3 id="my-experience-with-pidgin-and-community">My Experience with Pidgin &amp; Community</h3>
<p>Pidgin is an universal chat client app which was first released during the late 1990's, written in C &amp; GTK. It is available for Linux, Windows, FreeBSD, and MacOS.</p>
<p>I joined the Pidgin Discord community having around 1k members, where I met Gary Kramlich who is my mentor for GSoC, also the lead developer at Pidgin and other community members as well.</p>
<p>I indulged into the development of Pidgin with the  <a target="_blank" href="https://pidgin.im/development/contributing/">Contributing guide</a>, which also requires a user to install lots of dependencies to build and run the project manually on their system.</p>
<p>The community members and the core developers helped me a lot with building Pidgin at my locally on my system.</p>
<p>I also learnt the development of GTK widgets here, with the help from the community devs at Pidgin. </p>
<h3 id="google-summer-of-code-acceptance">Google Summer of Code Acceptance</h3>
<p>On May 17, 11:12 PM IST, I received this email that my proposal was accepted. I was so excited as it happened to be dream come true moment for me :D </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1625431743851/N2c-5iMaf.jpeg" alt="GSoCacceptancemail.jpeg" /></p>
<h3 id="my-gsoc-project-pidgin-account-assistant">My GSoC Project: Pidgin Account Assistant</h3>
<p>My project this summer is to build an Account Assistant to improve the current on boarding process for Pidgin users. </p>
<p>I chose this project because there is a huge impact attached with it. The current account adding process is quite intimidating to the users of non-tech background and they face difficulties while adding their account. I hope to solve the problem this summer.</p>
<p>Thanks for reading!</p>
]]></content:encoded></item><item><title><![CDATA[Adding security to React Native app using Fingerprint(Touch ID)]]></title><description><![CDATA[Keeping your phone secure from strangers is the top most priority. People use various kinds of methods to secure their phones, but what about adding Security to your mobile app?
Well lets talk about adding fingerprint(Touch ID) security in your mobil...]]></description><link>https://blogs.prateek.pardeshi.ovh/adding-security-to-react-native-app-using-fingerprinttouch-id</link><guid isPermaLink="true">https://blogs.prateek.pardeshi.ovh/adding-security-to-react-native-app-using-fingerprinttouch-id</guid><category><![CDATA[React Native]]></category><category><![CDATA[Security]]></category><category><![CDATA[Android]]></category><category><![CDATA[iOS]]></category><dc:creator><![CDATA[Prateek Pardeshi]]></dc:creator><pubDate>Sun, 31 Jan 2021 18:21:57 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1612126407366/OAOBrRCyz.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Keeping your phone secure from strangers is the top most priority. People use various kinds of methods to secure their phones, but what about adding Security to your mobile app?</p>
<p>Well lets talk about adding fingerprint(Touch ID) security in your mobile app. </p>
<p>In this tutorial, we'll be using the <code>react-native-fingerprint-scanner</code> package for securing our mobile app. You can visit  <a target="_blank" href="https://www.npmjs.com/package/react-native-fingerprint-scanner">here</a> for npm package.</p>
<h3 id="step-1-enable-fingerprint-in-your-mobile-device">Step 1: Enable Fingerprint in your mobile device:</h3>
<h4 id="1-for-ios">1. For iOS:</h4>
<ul>
<li>Tap Settings &gt; Touch ID &amp; Passcode, then enter your passcode.</li>
<li>Tap Add a Fingerprint and hold your device as you normally would when touching the Touch ID sensor.</li>
</ul>
<h4 id="2-for-android-phones">2. For Android Phones:</h4>
<ul>
<li><strong>Samsung:</strong> Navigate to Settings, then tap Biometrics and security, and then tap Fingerprints.</li>
<li><strong>OnePlus: </strong> Navigating to the Security &amp; lockscreen menu, locate the Fingerprint list subheading</li>
<li><strong>Motorola:</strong> Touch Settings &gt; Security &amp; Location, and touch Fingerprint. </li>
</ul>
<h3 id="step-2-installing-the-package">Step 2: Installing the package:</h3>
<pre><code><span class="hljs-built_in">npm</span> i react-native-fingerprint-scanner
</code></pre><p><strong>OR</strong></p>
<pre><code>yarn <span class="hljs-keyword">add</span> react-native-fingerprint-scanner
</code></pre><h4 id="linking-the-library-to-app">Linking the library to app:</h4>
<ul>
<li>For RN &gt;= 0.60:</li>
</ul>
<pre><code>$ <span class="hljs-built_in">cd</span> ios &amp;&amp; pod install
</code></pre><ul>
<li>For RN &lt; 0.60, use react-native link to add the library to your project:</li>
</ul>
<pre><code>$ react-<span class="hljs-keyword">native</span> link react-<span class="hljs-keyword">native</span>-fingerprint-scanner
</code></pre><h3 id="step-3-adding-app-permission">Step 3: Adding app permission:</h3>
<ul>
<li>Android: </li>
</ul>
<p>In your <code>AndroidManifest.xml</code>: (API level 28+)</p>
<pre><code>&lt;uses-permission android:<span class="hljs-type">name</span>="android.permission.USE_BIOMETRIC" /&gt;
</code></pre><ul>
<li>iOS:</li>
</ul>
<p>In your <code>Info.plist</code>:</p>
<pre><code><span class="hljs-tag">&lt;<span class="hljs-name">key</span>&gt;</span>NSFaceIDUsageDescription<span class="hljs-tag">&lt;/<span class="hljs-name">key</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">string</span>&gt;</span>$(PRODUCT_NAME) requires FaceID access to allows you quick and secure access.<span class="hljs-tag">&lt;/<span class="hljs-name">string</span>&gt;</span>
</code></pre><p>Make sure the following versions are all correct in <code>android/app/build.gradle</code></p>
<pre><code>// API v29 enables FaceId
android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
<span class="hljs-meta">...</span>
    defaultConfig {
      targetSdkVersion 29
</code></pre><h3 id="step-4-testing-the-code-in-app-using-fingerprint">Step 4: Testing the code in app using fingerprint</h3>
<p>You can test the fingerprint(Touch ID) by following code.</p>
<ul>
<li>iOS: </li>
</ul>
<pre><code><span class="hljs-keyword">import</span> React, { Component } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
<span class="hljs-keyword">import</span> PropTypes <span class="hljs-keyword">from</span> <span class="hljs-string">'prop-types'</span>;
<span class="hljs-keyword">import</span> { AlertIOS } <span class="hljs-keyword">from</span> <span class="hljs-string">'react-native'</span>;
<span class="hljs-keyword">import</span> FingerprintScanner <span class="hljs-keyword">from</span> <span class="hljs-string">'react-native-fingerprint-scanner'</span>;

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">FingerprintPopup</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Component</span> {</span>

  componentDidMount() {
    FingerprintScanner
      .authenticate({ description: <span class="hljs-string">'Scan your fingerprint on the device scanner to continue'</span> })
      .<span class="hljs-keyword">then</span>(<span class="hljs-function"><span class="hljs-params">()</span> =&gt;</span> {
        <span class="hljs-built_in">this</span>.props.handlePopupDismissed();
        AlertIOS.alert(<span class="hljs-string">'Authenticated successfully'</span>);
      })
      .<span class="hljs-keyword">catch</span>(<span class="hljs-function"><span class="hljs-params">(error)</span> =&gt;</span> {
        <span class="hljs-built_in">this</span>.props.handlePopupDismissed();
        AlertIOS.alert(error.message);
      });
  }

  render() {
    <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>;
  }
}

FingerprintPopup.propTypes = {
  handlePopupDismissed: PropTypes.func.isRequired,
};

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> FingerprintPopup;
</code></pre><ul>
<li>Android: </li>
</ul>
<pre><code><span class="hljs-keyword">import</span> React, { Component } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
<span class="hljs-keyword">import</span> PropTypes <span class="hljs-keyword">from</span> <span class="hljs-string">'prop-types'</span>;
<span class="hljs-keyword">import</span> {
  Alert,
  Image,
  Text,
  TouchableOpacity,
  View,
  ViewPropTypes,
  Platform,
} <span class="hljs-keyword">from</span> <span class="hljs-string">'react-native'</span>;

<span class="hljs-keyword">import</span> FingerprintScanner <span class="hljs-keyword">from</span> <span class="hljs-string">'react-native-fingerprint-scanner'</span>;
<span class="hljs-keyword">import</span> styles <span class="hljs-keyword">from</span> <span class="hljs-string">'./FingerprintPopup.component.styles'</span>;
<span class="hljs-keyword">import</span> ShakingText <span class="hljs-keyword">from</span> <span class="hljs-string">'./ShakingText.component'</span>;


<span class="hljs-comment">// - this example component supports both the</span>
<span class="hljs-comment">//   legacy device-specific (Android &lt; v23) and</span>
<span class="hljs-comment">//   current (Android &gt;= 23) biometric APIs</span>
<span class="hljs-comment">// - your lib and implementation may not need both</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BiometricPopup</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Component</span> </span>{
  <span class="hljs-keyword">constructor</span>(props) {
    <span class="hljs-built_in">super</span>(props);
    <span class="hljs-built_in">this</span>.state = {
      <span class="hljs-attr">errorMessageLegacy</span>: <span class="hljs-literal">undefined</span>,
      <span class="hljs-attr">biometricLegacy</span>: <span class="hljs-literal">undefined</span>
    };

    <span class="hljs-built_in">this</span>.description = <span class="hljs-literal">null</span>;
  }

  componentDidMount() {
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">this</span>.requiresLegacyAuthentication()) {
      <span class="hljs-built_in">this</span>.authLegacy();
    } <span class="hljs-keyword">else</span> {
      <span class="hljs-built_in">this</span>.authCurrent();
    }
  }

  componentWillUnmount = <span class="hljs-function">() =&gt;</span> {
    FingerprintScanner.release();
  }

  requiresLegacyAuthentication() {
    <span class="hljs-keyword">return</span> Platform.Version &lt; <span class="hljs-number">23</span>;
  }

  authCurrent() {
    FingerprintScanner
      .authenticate({ <span class="hljs-attr">title</span>: <span class="hljs-string">'Log in with Biometrics'</span> })
      .then(<span class="hljs-function">() =&gt;</span> {
        <span class="hljs-built_in">this</span>.props.onAuthenticate();
      });
  }

  authLegacy() {
    FingerprintScanner
      .authenticate({ <span class="hljs-attr">onAttempt</span>: <span class="hljs-built_in">this</span>.handleAuthenticationAttemptedLegacy })
      .then(<span class="hljs-function">() =&gt;</span> {
        <span class="hljs-built_in">this</span>.props.handlePopupDismissedLegacy();
        Alert.alert(<span class="hljs-string">'Fingerprint Authentication'</span>, <span class="hljs-string">'Authenticated successfully'</span>);
      })
      .catch(<span class="hljs-function">(<span class="hljs-params">error</span>) =&gt;</span> {
        <span class="hljs-built_in">this</span>.setState({ <span class="hljs-attr">errorMessageLegacy</span>: error.message, <span class="hljs-attr">biometricLegacy</span>: error.biometric });
        <span class="hljs-built_in">this</span>.description.shake();
      });
  }

  handleAuthenticationAttemptedLegacy = <span class="hljs-function">(<span class="hljs-params">error</span>) =&gt;</span> {
    <span class="hljs-built_in">this</span>.setState({ <span class="hljs-attr">errorMessageLegacy</span>: error.message });
    <span class="hljs-built_in">this</span>.description.shake();
  };

  renderLegacy() {
    <span class="hljs-keyword">const</span> { errorMessageLegacy, biometricLegacy } = <span class="hljs-built_in">this</span>.state;
    <span class="hljs-keyword">const</span> { style, handlePopupDismissedLegacy } = <span class="hljs-built_in">this</span>.props;

    <span class="hljs-keyword">return</span> (
      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">View</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{styles.container}</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">View</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{[styles.contentContainer,</span> <span class="hljs-attr">style</span>]}&gt;</span>

          <span class="hljs-tag">&lt;<span class="hljs-name">Image</span>
            <span class="hljs-attr">style</span>=<span class="hljs-string">{styles.logo}</span>
            <span class="hljs-attr">source</span>=<span class="hljs-string">{require(</span>'<span class="hljs-attr">.</span>/<span class="hljs-attr">assets</span>/<span class="hljs-attr">finger_print.png</span>')}
          /&gt;</span>

          <span class="hljs-tag">&lt;<span class="hljs-name">Text</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{styles.heading}</span>&gt;</span>
            Biometric{'\n'}Authentication
          <span class="hljs-tag">&lt;/<span class="hljs-name">Text</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">ShakingText</span>
            <span class="hljs-attr">ref</span>=<span class="hljs-string">{(instance)</span> =&gt;</span> { this.description = instance; }}
            style={styles.description(!!errorMessageLegacy)}&gt;
            {errorMessageLegacy || `Scan your ${biometricLegacy} on the\ndevice scanner to continue`}
          <span class="hljs-tag">&lt;/<span class="hljs-name">ShakingText</span>&gt;</span>

          <span class="hljs-tag">&lt;<span class="hljs-name">TouchableOpacity</span>
            <span class="hljs-attr">style</span>=<span class="hljs-string">{styles.buttonContainer}</span>
            <span class="hljs-attr">onPress</span>=<span class="hljs-string">{handlePopupDismissedLegacy}</span>
          &gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">Text</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{styles.buttonText}</span>&gt;</span>
              BACK TO MAIN
            <span class="hljs-tag">&lt;/<span class="hljs-name">Text</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">TouchableOpacity</span>&gt;</span>

        <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">View</span>&gt;</span></span>
    );
  }


  render = <span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">this</span>.requiresLegacyAuthentication()) {
      <span class="hljs-keyword">return</span> <span class="hljs-built_in">this</span>.renderLegacy();
    }

    <span class="hljs-comment">// current API UI provided by native BiometricPrompt</span>
    <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>;
  }
}

BiometricPopup.propTypes = {
  <span class="hljs-attr">onAuthenticate</span>: PropTypes.func.isRequired,
  <span class="hljs-attr">handlePopupDismissedLegacy</span>: PropTypes.func,
  <span class="hljs-attr">style</span>: ViewPropTypes.style,
};

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> BiometricPopup;
</code></pre><ul>
<li><strong>Screenshot</strong>: Taken from the docs</li>
</ul>
<p><img src="https://raw.githubusercontent.com/hieuvp/react-native-fingerprint-scanner/master/screenshots/android-authentication.gif" alt="Screenshot" /></p>
<h3 id="step-5-using-the-appropriate-apis">Step 5: Using the appropriate APIs:</h3>
<ul>
<li><p>For iOS &amp; Android (common): <code>isSensorAvailable()</code>: Starts Fingerprint authentication on iOS</p>
<ul>
<li>Returns a <code>Promise&lt;string&gt;</code></li>
<li>biometryType: String - The type of biometric authentication supported by the device.<ol>
<li>iOS: biometryType = 'Touch ID', 'Face ID'</li>
<li>Android: biometryType = 'Biometrics'</li>
</ol>
</li>
<li><code>error: FingerprintScannerError { name, message, biometric }</code> - The name and message of failure and the biometric type in use.</li>
</ul>
</li>
</ul>
<pre><code>componentDidMount() {
  FingerprintScanner
    .isSensorAvailable()
    .then(<span class="hljs-function"><span class="hljs-params">biometryType</span> =&gt;</span> <span class="hljs-built_in">this</span>.setState({ biometryType }))
    .catch(<span class="hljs-function"><span class="hljs-params">error</span> =&gt;</span> <span class="hljs-built_in">this</span>.setState({ <span class="hljs-attr">errorMessage</span>: error.message }));
}
</code></pre><ul>
<li><p>For iOS: <code>authenticate({ description, fallbackEnabled })</code></p>
<ul>
<li>Returns a <code>Promise</code></li>
<li><code>description: String</code> - the string to explain the request for user authentication.</li>
<li><code>fallbackEnabled: Boolean</code> - default to <code>true</code>, whether to display fallback button (e.g. Enter Password).</li>
</ul>
</li>
</ul>
<pre><code>componentDidMount() {
  FingerprintScanner
    .authenticate({ description: <span class="hljs-string">'Scan your fingerprint on the device scanner to continue'</span> })
    .<span class="hljs-keyword">then</span>(<span class="hljs-function"><span class="hljs-params">()</span> =&gt;</span> {
      <span class="hljs-built_in">this</span>.props.handlePopupDismissed();
      AlertIOS.alert(<span class="hljs-string">'Authenticated successfully'</span>);
    })
    .<span class="hljs-keyword">catch</span>(<span class="hljs-function"><span class="hljs-params">(error)</span> =&gt;</span> {
      <span class="hljs-built_in">this</span>.props.handlePopupDismissed();
      AlertIOS.alert(error.message);
    });
}
</code></pre><ul>
<li><p>For Android: </p>
</li>
<li><p><code>authenticate({ title="Log In", subTitle, description, cancelButton="Cancel", onAttempt=() =&gt; (null) })</code>: Starts Fingerprint authentication</p>
<ul>
<li>Returns a <code>Promise</code></li>
<li><code>title: String</code> the title text to display in the native Android popup</li>
<li><code>subTitle: String</code> the sub title text to display in the native Android popup</li>
<li><code>description: String</code> the description text to display in the native Android popup</li>
<li><code>cancelButton: String</code> the cancel button text to display in the native Android popup</li>
<li><code>onAttempt: Function</code> - a callback function when users are trying to scan their fingerprint but failed.</li>
</ul>
</li>
</ul>
<pre><code>componentDidMount() {
  <span class="hljs-keyword">if</span> (requiresLegacyAuthentication()) {
    authLegacy();
  } <span class="hljs-keyword">else</span> {
    authCurrent();
  }
}
<span class="hljs-function">
<span class="hljs-title">componentWillUnmount</span> = <span class="hljs-params">()</span> =&gt;</span> {
  FingerprintScanner.release();
}

requiresLegacyAuthentication() {
  <span class="hljs-keyword">return</span> Platform.Version &lt; <span class="hljs-number">23</span>;
}

authCurrent() {
  FingerprintScanner
    .authenticate({ title: <span class="hljs-string">'Log in with Biometrics'</span> })
    .<span class="hljs-keyword">then</span>(<span class="hljs-function"><span class="hljs-params">()</span> =&gt;</span> {
      <span class="hljs-built_in">this</span>.props.onAuthenticate();
    });
}

authLegacy() {
  FingerprintScanner
    .authenticate({ onAttempt: <span class="hljs-built_in">this</span>.handleAuthenticationAttemptedLegacy })
    .<span class="hljs-keyword">then</span>(<span class="hljs-function"><span class="hljs-params">()</span> =&gt;</span> {
      <span class="hljs-built_in">this</span>.props.handlePopupDismissedLegacy();
      Alert.alert(<span class="hljs-string">'Fingerprint Authentication'</span>, <span class="hljs-string">'Authenticated successfully'</span>);
    })
    .<span class="hljs-keyword">catch</span>(<span class="hljs-function"><span class="hljs-params">(error)</span> =&gt;</span> {
      <span class="hljs-built_in">this</span>.setState({ errorMessageLegacy: error.message, biometricLegacy: error.biometric });
      <span class="hljs-built_in">this</span>.description.shake();
    });
}
<span class="hljs-function">
<span class="hljs-title">handleAuthenticationAttemptedLegacy</span> = <span class="hljs-params">(error)</span> =&gt;</span> {
  <span class="hljs-built_in">this</span>.setState({ errorMessageLegacy: error.message });
  <span class="hljs-built_in">this</span>.description.shake();
};
</code></pre><ol>
<li><p><code>release()</code>: Stops fingerprint scanner listener, cancels native prompt if visible.</p>
<ul>
<li>Returns a <code>Void</code></li>
</ul>
</li>
</ol>
<pre><code><span class="hljs-selector-tag">componentWillUnmount</span>() {
  <span class="hljs-selector-tag">FingerprintScanner</span><span class="hljs-selector-class">.release</span>();
}
</code></pre><p>By reading this blog, I'm pretty sure that you'll be able to implement Fingerprint(Touch ID) in your React Native app. If you face any error while implementing, you can always have a look at docs <a target="_blank" href="https://www.npmjs.com/package/react-native-fingerprint-scanner">here</a> .</p>
<p>Cover GIF Credits: Gfycat</p>
]]></content:encoded></item><item><title><![CDATA[Securing a Kubernetes Cluster]]></title><description><![CDATA[Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and...]]></description><link>https://blogs.prateek.pardeshi.ovh/securing-a-kubernetes-cluster</link><guid isPermaLink="true">https://blogs.prateek.pardeshi.ovh/securing-a-kubernetes-cluster</guid><category><![CDATA[Kubernetes]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Prateek Pardeshi]]></dc:creator><pubDate>Sat, 30 Jan 2021 22:11:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1612132623049/4_cCv25cx.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Kubernetes</strong> is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.</p>
<p>A <strong>Kubernetes cluster</strong> is a set of nodes that run containerized applications. Containerizing applications packages an app with its dependences and some necessary services. They are more lightweight and flexible than virtual machines. In this way, Kubernetes clusters allow for applications to be more easily developed, moved and managed. </p>
<p><strong>Kubernetes clusters</strong> allow containers to run across multiple machines and environments: virtual, physical, cloud-based, and on-premises. Kubernetes containers are not restricted to a specific operating system, unlike virtual machines. Instead, they are able to share operating systems and run anywhere.</p>
<p> <img src="https://lcom.static.linuxfound.org/sites/lcom/files/fig-1_3.png" alt="Kubernetes Cluster" /> </p>
<h3 id="controlling-access-to-the-kubernetes-api">Controlling access to the Kubernetes API:</h3>
<p>As Kubernetes is entirely API driven, controlling and limiting who can access the cluster and what actions they are allowed to perform is the first line of defense.</p>
<ul>
<li><strong>Using the Transport Layer Security (TLS) for all API traffic:</strong></li>
</ul>
<p>The default encryption of the API for Kubernetes is done through the TLS, some components and installation methods may enable local ports over HTTP and administrators should familiarize themselves with the settings of each component to identify potentially unsecured traffic.</p>
<ul>
<li>API Authentication:</li>
</ul>
<p>API authentication that gives applications with the ability to communicate with API server to provide access. When a user logs into the system, it requests authentication in the form of a token.
All API clients must be authenticated, even those that are part of the infrastructure like nodes, proxies, the scheduler, and volume plugins.</p>
<h3 id="limiting-resource-usage-on-a-cluster">Limiting resource usage on a cluster:</h3>
<p>When several users or teams share a cluster with a fixed number of nodes, there is a concern that one team could use more than its fair share of resources.</p>
<p><a target="_blank" href="https://kubernetes.io/docs/concepts/policy/resource-quotas/">Resource quotas</a> are a tool for administrators to address this concern.</p>
<p>A resource quota, defined by a <code>ResourceQuota</code> object, provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that namespace.</p>
<p>Limiting ranges would prevent users from requesting unreasonably high or low values for commonly reserved resources like memory, or to provide default limits when none are specified.</p>
<h3 id="restricting-network-access">Restricting network access:</h3>
<p>The attack on the Cluster through a network could be an external one, for this purpose, we need  <a target="_blank" href="https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy/">network policies</a> .</p>
<p>The network policies for a namespace allows application authors to restrict which pods in other namespaces may access pods and ports within their namespaces. Many of the supported Kubernetes networking providers now respect network policy.</p>
<h3 id="enabling-audit-logging">Enabling audit logging:</h3>
<p><a target="_blank" href="https://kubernetes.io/docs/tasks/debug-application-cluster/audit/">Audit logger</a> records actions taken by the API for later analysis in the event of a compromise. It is recommended to enable audit logging and archive the audit file on a secure server.</p>
<h3 id="summary">Summary:</h3>
<p>Securing Kubernetes is not a easy task, one should know how to use different tools and techniques to secure the Kubernetes Cluster.</p>
<p>Kubernetes <a target="_blank" href="https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/">documentation</a>  provides more information on how to secure clusters. Most of the content of this blog is taken from the official Kubernetes docs.</p>
]]></content:encoded></item><item><title><![CDATA[Getting Started with Auth0 using React Native (Android)]]></title><description><![CDATA[In this blog post, we'll be talking about the integration of Auth0 into our React Native (Android) app.
Auth0: 
Auth0 secures more than 100 million logins each day. Auth0 provides the simplicity, extensibility, and expertise to scale and protect iden...]]></description><link>https://blogs.prateek.pardeshi.ovh/getting-started-with-auth0-using-react-native-android</link><guid isPermaLink="true">https://blogs.prateek.pardeshi.ovh/getting-started-with-auth0-using-react-native-android</guid><category><![CDATA[Auth0]]></category><category><![CDATA[React Native]]></category><category><![CDATA[Security]]></category><category><![CDATA[authentication]]></category><dc:creator><![CDATA[Prateek Pardeshi]]></dc:creator><pubDate>Thu, 07 Jan 2021 08:45:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1609998579545/KpKh_NeD4.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this blog post, we'll be talking about the integration of Auth0 into our React Native (Android) app.</p>
<p><strong>Auth0: </strong>
Auth0 secures more than <strong>100 million logins</strong> each day. Auth0 provides the simplicity, extensibility, and expertise to scale and protect identities in any application, for any audience. Also, auth0 is the first identity management platform for application builders, and the only identity solution needed for custom-built applications. </p>
<p>Now, let's move further to the integration part.</p>
<h3 id="step-1-create-an-application-in-the-auth0-dashboard"><strong>Step 1: </strong> Create an Application in the Auth0 Dashboard</h3>
<p>Go to the Auth0 Dashboard and Create an Application</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1610004982792/EYuPBgCz7.png" alt="Screenshot_2021-01-07 Getting Started(1).png" /></p>
<p>Give a name to your app and select the app. type</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1610005168160/OhxryREv9.png" alt="Screenshot_2021-01-07 Getting Started(2).png" /></p>
<p>Select React Native from the listed Technologies</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1610005309776/v1PPjSAKo.png" alt="Screenshot_2021-01-07 Application Details.png" /></p>
<h3 id="step-2-configure-the-app-with-auth0"><strong>Step 2: </strong> Configure the App with Auth0</h3>
<p>Go to the <a target="_blank" href="https://manage.auth0.com/#/applications">Application Settings</a> section in the Auth0 Dashboard</p>
<p>Get the <strong>Client ID</strong> and <strong>Domain</strong> from the panel</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1610005807500/Rr0sflaCN.png" alt="Screenshot from 2021-01-07 13-19-41.png" /></p>
<h3 id="step-2-installing-dependencies"><strong>Step 2: </strong> Installing Dependencies</h3>
<p>Install the dependencies of the React Native Auth0 module.</p>
<h4 id="yarn">Yarn:</h4>
<pre><code>$ yarn <span class="hljs-keyword">add</span> react-native-auth0
</code></pre><h4 id="npm">npm:</h4>
<pre><code>$ npm <span class="hljs-keyword">install</span> react-<span class="hljs-keyword">native</span>-auth0
</code></pre><p>Provide a way for users to log in. You can do this with the Auth0 hosted login page.</p>
<p>The login page looks similar to the image below.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1610007224987/EAESB6ApH.png" alt="oie_eYeM3DnnJG40.png" /></p>
<h3 id="step-3-integrate-auth0-into-your-app"><strong>Step 3: </strong> Integrate Auth0 into your app</h3>
<p>Go to <code>android/app/src/main/AndroidManifest.xml</code>, and make sure that the activity you are going to receive the authentication on has a launch mode value of <code>singleTask</code> and that it declares the following intent filter.</p>
<pre><code><span class="hljs-tag">&lt;<span class="hljs-name">intent-filter</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">action</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">"android.intent.action.VIEW"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">category</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">"android.intent.category.DEFAULT"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">category</span> <span class="hljs-attr">android:name</span>=<span class="hljs-string">"android.intent.category.BROWSABLE"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">data</span>
        <span class="hljs-attr">android:host</span>=<span class="hljs-string">"MY_DOMAIN"</span>
        <span class="hljs-attr">android:pathPrefix</span>=<span class="hljs-string">"/android/${applicationId}/callback"</span>
        <span class="hljs-attr">android:scheme</span>=<span class="hljs-string">"${applicationId}"</span> /&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">intent-filter</span>&gt;</span>
</code></pre><p>So the <code>MainActivity</code> looks like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1610007793068/UWGA2MCny.png" alt="carbon (2).png" /></p>
<h3 id="step-4-configure-callback-urls"><strong>Step 4: </strong> Configure Callback URLs:</h3>
<p>A callback URL is a URL in your application where Auth0 redirects the user after they have authenticated.</p>
<p>The callback URL for your app must be added to the Allowed Callback URLs field in your <a target="_blank" href="https://manage.auth0.com/#/applications">Application Settings</a>. If this field is not set, users will be unable to log in to the application and will get an error.</p>
<h4 id="callback-url">callback URL:</h4>
<pre><code>$ {YOUR_APP_PACKAGE_NAME}<span class="hljs-symbol">://</span>{MY_DOMAIN}/android/{YOUR_APP_PACKAGE_NAME}/callback
</code></pre><p>Remember to replace <code>{YOUR_APP_PACKAGE_NAME}</code> and <code>{MY_DOMAIN}</code> with your actual application's package name and Domain.</p>
<h3 id="step-5-configure-logout-url"><strong>Step 5: </strong> Configure logout URL:</h3>
<p>A logout URL is a URL in your application that Auth0 can return to after the user has been logged out of the authorization server. This is specified in the <code>returnTo</code> query parameter.</p>
<p>The logout URL for your app must be added to the Allowed Logout URLs field in your <a target="_blank" href="https://manage.auth0.com/#/applications">Application Settings</a>. If this field is not set, users will be unable to log out from the application and will get an error.</p>
<h4 id="logout-url">logout URL:</h4>
<pre><code>$ {YOUR_APP_PACKAGE_NAME}<span class="hljs-symbol">://</span>{MY_DOMAIN}/android/{YOUR_APP_PACKAGE_NAME}/callback
</code></pre><p>Remember to replace <code>{YOUR_APP_PACKAGE_NAME}</code> and <code>{MY_DOMAIN}</code> with your actual application's package name and Domain.</p>
<h3 id="step-6-add-authentication-with-auth0-in-your-app"><strong>Step 6: </strong> Add authentication with Auth0 in your app:</h3>
<p>First, import the <code>Auth0</code> module and create a new <code>Auth0</code> instance.</p>
<pre><code>$ <span class="hljs-keyword">import</span> Auth0 <span class="hljs-keyword">from</span> <span class="hljs-string">'react-native-auth0'</span>;
$ const auth0 = <span class="hljs-built_in">new</span> Auth0({ <span class="hljs-keyword">domain</span>: <span class="hljs-string">'MY_DOMAIN'</span>, clientId: <span class="hljs-string">'CLIENT_ID'</span> });
</code></pre><p>Then present the hosted login screen, like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1610008520839/lrGOAZyWG.png" alt="carbon (3).png" /></p>
<p>Upon successful authentication the user's <code>credentials</code> will be returned, containing an <code>access_token</code>, an <code>id_token</code> and an <code>expires_in</code> value.</p>
<h3 id="step-6-log-the-user-out"><strong>Step 6: </strong> Log the user out:</h3>
<p>To log the user out, redirect them to the Auth0 log out endpoint by calling <code>clearSession</code>. This will remove their session from the authorization server. After this happens, remove the Access Token from the state.</p>
<pre><code><span class="hljs-selector-tag">auth0</span><span class="hljs-selector-class">.webAuth</span>
    <span class="hljs-selector-class">.clearSession</span>({})
    <span class="hljs-selector-class">.then</span>(success =&gt; {
        <span class="hljs-selector-tag">Alert</span><span class="hljs-selector-class">.alert</span>(
            <span class="hljs-string">'Logged out!'</span>
        );
        <span class="hljs-selector-tag">this</span><span class="hljs-selector-class">.setState</span>({ <span class="hljs-attribute">accessToken</span>: null });
    })
    <span class="hljs-selector-class">.catch</span>(error =&gt; {
        <span class="hljs-selector-tag">console</span><span class="hljs-selector-class">.log</span>(<span class="hljs-string">'Log out cancelled'</span>);
    });
</code></pre><p>Thanks a lot for reaching here and reading this blog. If you face any difficulties you can always have a look at the  <a target="_blank" href="https://auth0.com/docs/">Auth0 documentation</a>.</p>
]]></content:encoded></item></channel></rss>