<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hardipinder Singh on Medium]]></title>
        <description><![CDATA[Stories by Hardipinder Singh on Medium]]></description>
        <link>https://medium.com/@hardipindersingh?source=rss-54d799151e2f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SwCklkhtMkuiqFvh.jpg</url>
            <title>Stories by Hardipinder Singh on Medium</title>
            <link>https://medium.com/@hardipindersingh?source=rss-54d799151e2f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 06:38:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hardipindersingh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Azure Security Management]]></title>
            <link>https://medium.com/@hardipindersingh/azure-security-management-77d7eb563d66?source=rss-54d799151e2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/77d7eb563d66</guid>
            <category><![CDATA[mfa]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-api-management]]></category>
            <category><![CDATA[passwordless]]></category>
            <category><![CDATA[azure-sentinel]]></category>
            <dc:creator><![CDATA[Hardipinder Singh]]></dc:creator>
            <pubDate>Wed, 06 Sep 2023 05:09:10 GMT</pubDate>
            <atom:updated>2023-09-06T05:09:10.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r4PFPMyZSMR457nYBwP5Vw.png" /></figure><p>Hey there, this is a series of articles based of what I did and my hope is for you to join me on my experience on trying to safegaurad your Azure environment and hopefully not make the mistakes I did while making the cheapest/best choice for your org.</p><p>Put yourself in my shoes where you are assigned to secure an environment where you know the level responsibilty is nuts but you have to do it, so start reading on lots and lots of articles and get reked on the collected knowldge. While Azure has a whole list of tools and ttechniques, not every tool might be the right tool for you. In this haphazard yet insightful journey, I’ll guide you through key areas of focus:</p><ul><li><strong>MFA Passwordless enforcement</strong></li></ul><p><a href="https://medium.com/@hardipindersingh/azure-mfa-passwordless-enforcement-b5226f00a2ae">Azure MFA Passwordless Enforcement</a></p><ul><li><strong>API Management</strong></li></ul><p><a href="https://medium.com/@hardipindersingh/azure-api-mangement-expensive-gateway-46e7cba0650d">Azure API Mangement (Expensive Gateway)</a></p><ul><li><strong>Azure Sentinel</strong></li></ul><p><a href="https://medium.com/@hardipindersingh/azure-sentinel-noobs-review-1a5c65807ce5">Azure Sentinel (Noobs Review)</a></p><p>Go through each link and you might find something that might interest you. But if you can’t I’m going over for a TL;DR of what you might need in execution.</p><p><strong>MFA Passwordless </strong>: It is a cool and convinent option for logging in but it is not foolproof. You will have to create a conditional access policy for this, so do it before than later. And try it in increments, don’t do it in one shot.</p><p><strong>API Management</strong>: This is a nifty gateway to manage and manipulate your requests moving around. Beware on the fact it is costly AF, even without any calls made. It might be a bit daunting, so add one policy at a time and then go through the documentation for policies, add what seems a good fit for you. Use ChatGPT or BARD to convert your requirement to the kind of policy you might need.</p><p><strong>Azure Sentinel</strong>: It is a vast tool which a lot of options to configure and control your environment. Choose this task wisely so that you can finish on time, as it not something that can be done within a span of 2 months and having no prior experience of the tool in detail. Also think and write down what you want to accomplish using Sentinel, because it might not be the correct tool for you.</p><p>So concluding, in this whirlwind journey through Azure Security Management, we’ve explored the critical areas of MFA Passwordless enforcement, API Management, and Azure Sentinel. Each topic is a thread in the intricate tapestry of Azure security, and I hope you’ve found value in the insights I’ve shared. And please comment if you need any help.</p><p>Happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77d7eb563d66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Sentinel (Noobs Review)]]></title>
            <link>https://medium.com/@hardipindersingh/azure-sentinel-noobs-review-1a5c65807ce5?source=rss-54d799151e2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a5c65807ce5</guid>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[azure-security]]></category>
            <category><![CDATA[azure-sentinel]]></category>
            <category><![CDATA[monitoring-and-evaluation]]></category>
            <category><![CDATA[soar]]></category>
            <dc:creator><![CDATA[Hardipinder Singh]]></dc:creator>
            <pubDate>Wed, 06 Sep 2023 05:07:53 GMT</pubDate>
            <atom:updated>2023-09-06T05:07:53.555Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong><em>Disclaimer: This might be the shortest and most to the point article about Sentinel. But my idea is to give a quick idea of what you might be getting yourself into. So, tread lightly.</em></strong></blockquote><p><strong>Azure Sentinel</strong>: A SOAR-SIEM solution by Microsoft to compete with Splunk ES, ELK, XSOAR or my old company’s CO (SOAR), CTIX (threat intelligence) and (a quick side-mention to)google siemplfy. It is a good efficient tool, but has a bigger learning curve than expected, if you are new or relatively noob (like me) to SIEM-SOARs.</p><p><strong>Expectations (briefly):</strong> Analyze points from Azure and Azure services that have logging enabled. Set incidents based on what analysis you have set up. Assign the incidents, add/ extract entities and store them, correlate with threat intelligence you have added (using connectors) and maybe do certain automations to process recurrent cases or create a playbook using logic apps and have it sent to through a flow that can send the incidents to the teams or slack or process it further and close the incident.</p><p><strong>Reality:</strong> Well as I mentioned above, there is a big learning curve. Links are added below on how to go ahead but let’s touch that part in the end. After working on any particular tab for certain time, you will have to go back to the main page of Azure and route yourself back to Sentinel. There are a lot of articles and documentation, so you can read or watch videos but how much.</p><p>There is a big support of connectors present and with every connector is a playbook, analysis settings, workbook notes and so on, but it does not help, as you will be overwhelmed with the number of things you will find. At least for me, the moment I thought I knew I have to work on creation of custom analysis, I had to learn KQL, once I got around that I had jump into refinement, then after that seeing if entities were popping off from the data read. Then came parts where I could have used Watchlist, and then the automation side, which needs to use logic apps.</p><p><strong>So, should use Sentinel?</strong> Depends on your situation. If, like me, you were short on time and had it set it up from scratch, that too for a few things, I would not suggest going ahead with this. Coz, efficient as it might be, it will never be a good return on investment. For smaller organization in particular, where attack surface is low, this is not a tool that should be considered. My reasons:</p><blockquote><strong>So, should use Sentinel?</strong> Depends on your situation.</blockquote><ul><li>Huge learning curve</li><li>There will always be another thing that can be made to make it efficient</li><li>Overwhelming amount of TODOs and TL;DRs from Microsoft itself, and in true Microsoft trend, it is lengthy and really no one wants to read that. If at some point, they have ChatGPT read it and give me the direct answer then maybe, but I always tried to avoid MS official docs as much as I could.</li><li>Overkill for smaller organizations, build/use custom solutions.</li><li>If you are not getting 20 unique incidents in a range of 1–3 days, it is not for you.</li><li>Relying on a single tool can never be a good possibility. Because things tend to get complicated if your controls keep getting mixed up with each other.</li><li>Hate those back clicks.</li><li>Don’t think ChatGPT or Bard can give you a good solution, they will come close, but it might not work in custom analysis.</li></ul><p><strong>Learning Resources</strong>: Sentinel is not a bad tool. I would recommend going over each link in the below order, it might make your life easier.</p><ul><li><a href="https://techcommunity.microsoft.com/t5/microsoft-sentinel-blog/become-a-microsoft-sentinel-ninja-the-complete-level-400/ba-p/1246310">Become a Microsoft Sentinel Ninja: The complete level 400 training</a></li><li><a href="https://github.com/rod-trent/MustLearnKQL">GitHub - rod-trent/MustLearnKQL: Code included as part of the MustLearnKQL blog series</a></li><li><a href="https://github.com/reprise99/awesome-kql-sentinel">GitHub - reprise99/awesome-kql-sentinel: A curated list of blogs, videos, tutorials, queries and anything else valuable to help you learn and master KQL and Microsoft Sentinel</a></li><li><a href="https://github.com/globalbao/awesome-azure-policy">GitHub - globalbao/awesome-azure-policy: A curated list of blogs, videos, tutorials, code, tools, scripts, and anything useful to help you learn Azure Policy - by @JesseLoudon</a></li><li><a href="https://learn.microsoft.com/en-us/azure/sentinel/detect-threats-custom">Create custom analytics rules to detect threats with Microsoft Sentinel</a></li><li><a href="https://learn.microsoft.com/en-us/azure/sentinel/watchlists-queries">Build queries or rules with watchlists - Microsoft Sentinel</a></li><li><a href="https://learn.microsoft.com/en-us/azure/sentinel/skill-up-resources#module-16-handling-incidents">Microsoft Sentinel skill-up training</a></li><li><a href="https://learn.microsoft.com/en-us/azure/sentinel/get-visibility">Visualize collected data</a></li><li><a href="https://learn.microsoft.com/en-us/azure/sentinel/connect-threat-intelligence-upload-api">Connect your threat intelligence platform with upload indicators API - Microsoft Sentinel</a></li><li><a href="https://infra.engineer/azure/61-azure-setup-sentinel-alerts-into-a-teams-channel">Azure - Setup Sentinel Alerts into a Teams Channel</a></li><li><a href="https://techcommunity.microsoft.com/t5/microsoft-sentinel-blog/microsoft-sentinel-automation-tips-amp-tricks-part-3-send-email/ba-p/3571716">Microsoft Sentinel Automation Tips &amp; Tricks - Part 3: Send email notification options</a></li></ul><p>Hope this helps. And if you do end up using Sentinel, Happy Hunting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a5c65807ce5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure API Mangement (Expensive Gateway)]]></title>
            <link>https://medium.com/@hardipindersingh/azure-api-mangement-expensive-gateway-46e7cba0650d?source=rss-54d799151e2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/46e7cba0650d</guid>
            <category><![CDATA[azure-api]]></category>
            <category><![CDATA[gateway]]></category>
            <category><![CDATA[gateway-service]]></category>
            <category><![CDATA[azure-api-management]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Hardipinder Singh]]></dc:creator>
            <pubDate>Wed, 06 Sep 2023 05:02:01 GMT</pubDate>
            <atom:updated>2023-09-06T05:02:01.335Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Azure API Management (AAM):</strong> I can’t stress enough and that is a key reason of me starting from this point, please don’t build an API Management instance in your personal account. If you have to create a new resource and then delete the whole resource after that test coz you will be charged a lot even if you don’t do anything. The payment team is really helpful, but I won’t suggest that route.</p><blockquote>I can’t stress enough and that is a key reason of me starting from this point, please don’t build an API Management instance in your personal account.</blockquote><p><strong>What is it:</strong> Warnings aside, is it a gateway for your transactions to be controlled to the granular level? So, what does it mean? You will get control over what gets out and what will be seen by the end user, the front end or back end that will plug into this services end points and potentially exposure to attacker. Let me bring a few samples to make it easier to understand.</p><p><strong>Before AAM comes into the picture.</strong> Look I’m yet to become a great bug bounty hunter like Nahamsec or 0day but from my limited experience over things I have seen, I have highlighted below things might be worthwhile to a person who wants to exploit an application.</p><pre>Summary<br>Creation time: Mon, 04 Sep 2023 03:03:39 GMT</pre><pre>Other<br>object-src blob: filesystem: *; frame-src blob: filesystem: *<br>h2<br>no-cache<br>application/json; charset=utf-8<br>-1<br>no-cache<br>max-age=<strong>31536000</strong>; <strong>includeSubDomains</strong><br>Accept-Encoding<br>08585078102678678176513796177CU69<br>39144233-db6c-45c2-9fef-05e24dd7cdbb<br><strong>westus</strong><br>1665<br>53684491<br>4997977<br><strong>westus:39144233-db6c-45c2-9fef-05e24dd7cdbb</strong><br>39144233-db6c-45c2-9fef-05e24dd7cdbb<br>08585078102678678176513796177CU69<br>c51bdb2da1a4466889f5cfae8a71e7fb<br>49a3d0d1-ea0b-fb08-49db-e56cbee4e780<br>08585078102678678176513796177CU69<br><strong>/locations/westus/scaleunits/prod-92/workflows/c51bdb2da1a4466889f5cfae8a71e7fb</strong><br>08585081520962245314<br>text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8<br>gzip, deflate, br<br>en-US,en;q=0.5<br>keep-alive<br><strong>prod-192.westus.logic.azure.com</strong><br>document<br>navigate<br>none<br>?1<br>1<br>1<br>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0</pre><p><strong>After AAM is deployed.</strong> It can be brought down even more, but I didn’t want to kill functionality and going too deep might be beyond this use case.</p><pre>Summary<br>Creation time: Mon, 04 Sep 2023 03:16:47 GMT</pre><pre>Other<br>HTTP/1.1 200 OK<br>gzip<br>application/json; charset=utf-8<br>max-age=31536000; includeSubDomains<br>chunked<br>Accept-Encoding,Origin</pre><p><strong>Deploying:</strong> Again, I will be pointing you to the guides, they are better suited.</p><p>Read about policies that you might need</p><p><a href="https://learn.microsoft.com/en-us/azure/api-management/api-management-policies">Azure API Management policy reference</a></p><p>Whether you have a suitable usecase for AAM</p><p><a href="https://demiliani.com/2021/06/14/using-azure-api-management-to-host-your-dynamics-365-business-central-apis/">Using Azure API Management to host your Dynamics 365 Business Central APIs</a></p><p>A much better guide on how to deploy this</p><p><a href="https://taerimhan.com/using-azure-api-management-to-manage-http-request-trigger-endpoints/">Using Azure API Management to Manage HTTP Request Trigger Endpoints</a></p><p>Do read them, for sure go through taerimhan’s guide, it’s a no bullshit, to the point guide on what you need to do.</p><p><strong>While Deploying:</strong></p><ul><li>Treat this like any API or HTTP webservice, see what is going in while you are making the request, coz like me, you will end with 401, 304 and even 403 once in a while.</li><li>While setting the Service URL, break up the URL into pieces based of the query params being added to the request. It keeps the URL intact.</li><li>Prettify the developer portal if you can, that is something you will be looking at a lot while development, try to control what is being seen.</li><li>Oh, and the most important thing to mention here, keep the trace active while you are testing. You can enable Trace (exactly like tracert) to see how the call is being made to rectify where it is breaking.</li><li>Also set outbound policies to remove extra headers that might be going in with the current request. Example: You have and should enable a piece of security (JWT token, OAuth 2 or OpenID) in AAM, make sure it gets deleted when the call goes to the endpoint, because if it is an Azure API, both the headers will go in and confuse the service thinking that it got two authentication headers in place of one.</li></ul><p><strong>Setting policies:</strong> Coming to the Juicy bit, I made sure to try and follow OWASP TOP 10 as much as possible. <strong><em>Side Tracking you for a quick minute, but OWASP Top 10 is a standard awareness document for developers and web application security. It represents a broad consensus about the most critical security risks to web applications.</em></strong> Below is a sample:</p><pre>&lt;policies&gt;<br>    &lt;inbound&gt;<br>        &lt;base /&gt;<br>        &lt;validate-jwt header-name=&quot;Authorization&quot; failed-validation-httpcode=&quot;401&quot; failed-validation-error-message=&quot;Unauthorized. Access token is missing or invalid.&quot;&gt;<br>            &lt;openid-config url=&quot;https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration&quot; /&gt;<br>            &lt;required-claims&gt;<br>                &lt;claim name=&quot;aud&quot;&gt;<br>                    &lt;value&gt;your token value&lt;/value&gt;<br>                &lt;/claim&gt;<br>            &lt;/required-claims&gt;<br>        &lt;/validate-jwt&gt;<br>        &lt;rate-limit calls=&quot;5&quot; renewal-period=&quot;300&quot; /&gt;<br>        &lt;rewrite-uri template=&quot;/manual/paths/invoke?api-version=YYYY-MM-DD&amp;amp;sp=/triggers/manual/run&amp;amp;sv=1.0&amp;amp;sig=your_signature_here&quot; /&gt;<br>        &lt;set-backend-service base-url=&quot;your_url_here&quot; /&gt;<br>        &lt;set-header name=&quot;Authorization&quot; exists-action=&quot;delete&quot; /&gt;<br>    &lt;/inbound&gt;<br>    &lt;backend&gt;<br>        &lt;base /&gt;<br>    &lt;/backend&gt;<br>    &lt;outbound&gt;<br>        &lt;base /&gt;<br>        &lt;redirect-content-urls /&gt;<br>        &lt;set-header name=&quot;x-ms-client-tracking-id&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-correlation-id&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-execution-location&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-ratelimit-burst-remaining-workflow-reads&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-ratelimit-remaining-workflow-download-contentsize&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-ratelimit-time-remaining-directapirequests&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-request-id&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-tracking-id&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-trigger-history-name&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-workflow-id&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-workflow-name&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-workflow-run-id&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-workflow-system-id&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;x-ms-workflow-version&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;cache-control&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;expires&quot; exists-action=&quot;delete&quot; /&gt;<br>        &lt;set-header name=&quot;pragma&quot; exists-action=&quot;delete&quot; /&gt;<br>    &lt;/outbound&gt;<br>    &lt;on-error&gt;<br>        &lt;base /&gt;<br>    &lt;/on-error&gt;<br>&lt;/policies&gt;</pre><p>Quick breakup of the above policy: In the inbound policy Added rate-limiter, JWT- validation, remove authorization header to avoid confusion.</p><p>In the outbound policies, request URL rewrite, redirect handling, drop headers to keep it clean, content caching control.</p><p><strong>OWASP Top 10s:</strong> Injection will be taken care of, well not fully but with rate limiting it can be controlled. Broken Authentication and Broken Access Control using the JWT validation. Sensitive Data Exposure because of the deleted headers.</p><p>It can of course be made better, but at the time of deployment this was enough to secure the endpoint.</p><p>Hope this helps!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46e7cba0650d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure MFA Passwordless Enforcement]]></title>
            <link>https://medium.com/@hardipindersingh/azure-mfa-passwordless-enforcement-b5226f00a2ae?source=rss-54d799151e2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5226f00a2ae</guid>
            <category><![CDATA[passwordless]]></category>
            <category><![CDATA[mfa]]></category>
            <category><![CDATA[azure-authentication]]></category>
            <category><![CDATA[passwordless-login]]></category>
            <dc:creator><![CDATA[Hardipinder Singh]]></dc:creator>
            <pubDate>Wed, 06 Sep 2023 04:54:18 GMT</pubDate>
            <atom:updated>2023-09-06T04:54:18.359Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Quick Intro</strong>: MFA (Multi Factor) or 2FA (Two Factor Authentication) is an extra layer of authentication over your normal way of logging in. Think of it as using and OTP from either a device or app which you are using to verify your identity. Now, chances are people can guess your password (yes, we have all been there) but if there isn’t any password, you are decreasing the chances of password spraying and cluster bombing exponentially!</p><p><strong>Authentication Security</strong>: you are pretty much where I am headed, but let me say this, it is MFA Passwordless.</p><p><strong>Setting Up</strong>: there are many resources present online that can guide you in the right direction like</p><p><a href="https://learn.microsoft.com/en-us/azure/active-directory/authentication/howto-authentication-passwordless-deployment">Plan a passwordless authentication deployment in Azure Active Directory - Microsoft Entra</a></p><p>I will mention a few key things that you should consider while deploying.</p><ul><li>While in <strong>Policies &gt; Microsoft Authenticator &gt; Enable and Target</strong>, try to create a group and test it in stages because it might not have the correct effect that would expect based of the configuration you did and the configuration you have.</li><li>Try to have at least 1–2 people in Exclude, it is just in case you get locked out.</li><li>Under Configure, Enable “<strong>Show applications names in push and passwordless plus the geographic location</strong>.” Do this for everyone. This will help you get the close to precise location, that can be further used for tagging.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*91dEEyUvNOep95ahWeG2ow.png" /><figcaption>Configuration for MFA</figcaption></figure><ul><li>You will need to enable conditional access for passwordless to work, I didn’t read the full documentation and got a lot of hurdles. I would say read the documentation(s) but if anything should come with TL;DR warning, it is Microsoft docs and sdk (hate them tbh).</li><li>The idea behind conditional access is to provide an if and else layer of your policy, so that if incase something goes wrong, there will be someone to get you out of trouble.</li><li>In conditional access too, add at least one user that has good amount of access to be excluded from the policy. <strong><em>But have some way of looking over the how many logins are coming from the excluded user because that is a probable attack surface.</em></strong></li><li>Ensure that users have the necessary devices and software to support the chosen passwordless method.</li><li>Communicate the passwordless authentication process to your users and supply any necessary training or documentation.</li><li><strong>Regularly monitor passwordless authentication</strong> settings and policies to keep up the protect surface. There are multiple options but do monitor, as nothing is as secure as you might believe and hope it to be. And with every look at the log you can find a better way to find insights and even utilize this info as way to minimize the risk of policy breakage.</li></ul><p><strong>What will it look like for the end user</strong>: It is actually pretty cool and convenient from my perspective. Not remembering your password and being able to see where you are logging in from is a plus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*aPsLxD4qGKLVX_-PWqSbNw.png" /><figcaption>End user Notification</figcaption></figure><p><strong>Should you consider it ?</strong>: Consider a few things before going into passwordless.</p><ol><li><em>This is not foolproof, it is good protection mechanism</em>, it is not perfect. (Well, nothing is). But it is still miles above the current security measures we have in place.</li><li>You will start getting random calls for password approval, those are fake so don’t pick up those calls (unless you requested it)</li><li>Keep a close eye on who is logging in, which IP, which location and at what times. Try to keep allow list on few things, Sentinel can be a good approach for this but depends on the org too.</li><li>You will still have a possibility to login via password or SMS, so password spraying is still not out of the loop.</li></ol><p>In conclusion, it is a new way of auth implementation, without any extra apps or devices involvement. It makes the job easier for both the end user and security team. As per the official forums, the attack surface reduces to a great extend but this was a sound advice I got years back, everything is hackable, and being proactive with your security parameters will always keep you ahead if not at parr with the attacker.</p><p>Happy Securing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5226f00a2ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrations for life(Django)]]></title>
            <link>https://medium.com/@hardipindersingh/migrations-for-life-django-37b4cfc3fa6e?source=rss-54d799151e2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/37b4cfc3fa6e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <dc:creator><![CDATA[Hardipinder Singh]]></dc:creator>
            <pubDate>Sun, 07 Jun 2020 17:22:38 GMT</pubDate>
            <atom:updated>2020-06-07T17:22:38.879Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jtl5YH1EAPvsSeMi1NH8jA.jpeg" /></figure><p>Corny title but that is the exact feeling I have had for the past few weeks. Connection here, Attribute Error there, production environment unable to make sense of what I did in DEV environment.</p><p>That grunty feeling and turning over to stackoverflow to read and trying to make a correlation with the problem you’re facing and yet not understanding in the time crunch, can bring you down to tears. I’ve been there and I hope my words will bring some calm to chaos.</p><p>So, let’s get started shall we.</p><blockquote>What are Migrations?</blockquote><p>So what exactly are migrations. I’m not going for the definitions but to get you started, think of it as a cameraman at your wedding recording every person snacking, and running a virtual food check using fear of embarrassment whilst multiple future viewings of the recording (It’s an Indian thing).</p><blockquote>Why should you care?</blockquote><p>Well you shouldn’t but being the soul that defines how your app is going to turn out, won’t it be better to have a look around and get to know whether it is in a state of serenity.</p><p>Example: If you know which field you’re supposed to use, won’t it be easier to manage. From what I’ve seen, few people tend to prefer CharField rather than going for Boolean or NullBoolean so that if incase something other than true or false shows up the model will render the data.</p><p>This way the App will be optimized and easier to understand for future developers using your code.</p><blockquote>Tips from my experience:</blockquote><p>I’ll get to the point and give you some tips to manage your migrations(tried a pun here :D)</p><p>Be precise while defining your migrations. Like be specific on what type of field will suit best for the data that is going to be handled by your app. <a href="https://docs.djangoproject.com/en/3.0/ref/models/fields/"><strong>Refer</strong></a><strong>ence</strong></p><p>Very basic <strong><em>python manage.py makemigrations</em></strong> will create a migration file for your app. Try opening the .&lt;app-name&gt;/migrations folder and you’ll find something with <strong><em>0001_initial.py</em></strong> there. That is supposed to be your first migration file(Hurray!!). It’s a good practice to use -name=&lt;<em>name for your migration file</em>&gt; while doing makemigrations. It is a convenient way of keeping a track of what you did and where you have left off.</p><p>To see where you’re at, try <strong><em>python manage.py showmigrations</em></strong>, which in turn will list out the migrations file you have created [ ] and out of these which are in sync with the db [X](you will understand the square brackets when you run this command).</p><p>Opening a migrations file can be terrifying at first but keep an eye out for <em>dependencies </em>and <em>initial </em>= <em>True</em>. They are there for you to know at which check point you’re standing. The initial file will never have any dependency but if incase it does something or someone did something to your models and that is why the dependencies list is not empty</p><blockquote>If incase you get stuck in such a situation, well, first try to find the person and kill the defaulter XD.</blockquote><p>Post that there are many options to handle this.</p><p>Go to the db search for a table <em>django_migrations </em>and see what all fields are present in accordance to your app. This will give you an idea of what is happening.</p><p>So what to do now. You can either:</p><ol><li>Do<strong> <em>python manage.py migrate &lt;app_name&gt;0001_intial.py </em></strong>(or the exact name of migration you wish to go back to). If there are no super sticky migrations, this will revert everything back to normal and bring back the past you crave.</li><li>If things have gotten out of hand and everything seems bad, go for <em>python manage.py &lt;app_name&gt; -zero</em>. I know devs will suggest you to avoid this but it saved me quiet a few times</li><li>Not so recommended but if incase you want to go cave man style, you can delete the migration file from the migration folder in your app and <em>django_migration</em> table to get rid of that problematic migration.</li></ol><p>After that if the app is still crashing it means that the db and models are not in perfect sync. You can analyse this again using <em>python manage.py showmigrations</em></p><blockquote>If incase you already have all the migrations in your db but your app is crashing, try faking(get it !).</blockquote><p>This happens mostly when you have transferred your app from one server to another or dev to prod. But seriously you can try <strong><em>python manage.py migrate &lt;app-name&gt;- -fake</em></strong>. This will make django believe that you migrated properly and everything is in order.</p><p>Chances are by this time you might have pilled up a lot of migrations. It is not a big deal but what I’ve felt over the time it is better to have everything in a single file. This way if at least something breaks you’ll know where your migrations are breaking and what needs to be done. You can try <em>python manage.py squashmigrations &lt;app-name&gt;</em> to keep the whole thing clean.</p><blockquote>And if nothing works python manage.py -help will always be there to save you :)</blockquote><p>I hope this helps you out. Will keep on updating once I gain more knowledge. And a word of advice read documentations :)</p><p>Happy Coding !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37b4cfc3fa6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>