<?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[Afthy Irshath]]></title><description><![CDATA[Full-stack developer and cybersecurity student focusing on secure web apps, Linux configurations, and automation.]]></description><link>https://afthyir.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6af88d368aaa6be5b5382d43/6ae4b9ee-8a52-4588-8431-981748f4df80.png</url><title>Afthy Irshath</title><link>https://afthyir.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Nov 2026 19:15:25 GMT</lastBuildDate><atom:link href="https://afthyir.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[API Security: Common Risks and How to Prevent Them]]></title><description><![CDATA[Discover common API security vulnerabilities, authentication risks and practical ways to protect APIs and sensitive data.]]></description><link>https://afthyir.hashnode.dev/api-security-vulnerabilities-prevention</link><guid isPermaLink="true">https://afthyir.hashnode.dev/api-security-vulnerabilities-prevention</guid><category><![CDATA[cybersecurity]]></category><category><![CDATA[api security]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[owasp]]></category><category><![CDATA[Application Security]]></category><dc:creator><![CDATA[Afthy Irshath]]></dc:creator><pubDate>Sat, 14 Nov 2026 18:18:36 GMT</pubDate><content:encoded><![CDATA[<p>Modern applications heavily rely on APIs.</p>
<p>They allow applications, services and systems to communicate with each other. They are used within websites, mobile applications, payment platforms, cloud services and many other technologies.</p>
<p>For example, a mobile application may make an API call to retrieve the users profile information.</p>
<p>However, they often contain sensitive information and important functions, so if not secured properly can allow exposure of data or users doing things they shouldn’t be able to do.</p>
<p>Therefore, <strong>API Security</strong> is an important part of developing modern applications.</p>
<p>In this article, we will look at some common API security issues, why they are important and how developers can reduce the risk.</p>
<h2>1. What is API Security?</h2>
<p>API Security is the set of practices, technologies and policies that are used to secure APIs.</p>
<p>This ensures:</p>
<ul>
<li>Only authorised users and applications can access secure endpoints.</li>
<li>Users can only access the information they should be able to.</li>
<li>Sensitive data is kept safe during transfer.</li>
<li>Requests to the API are validated.</li>
<li>Unusual or excessive activity can be spotted.</li>
<li>APIs are configured securely.</li>
</ul>
<p>API security should be considered during development.</p>
<h2>2. Why is API Security Important?</h2>
<p>APIs often provide a link between users, applications and backend services.</p>
<p>This means if there is a security issue with your API it can cause issues across different areas of your application.</p>
<p>Some common issues include:</p>
<ul>
<li><strong>Sensitive Data Exposure</strong> – The API may return data that shouldn’t be available to the user.</li>
<li><strong>Broken Authentication</strong> – Poor authentication can allow unauthorised users to gain access to accounts.</li>
<li><strong>Broken Authorisation</strong> – Users can access resources for other users.</li>
<li><strong>Excessive Requests</strong> – Poor resource management can cause issues with availability of the application.</li>
<li><strong>Security Misconfiguration</strong> – Misconfigured settings can expose services or sensitive data.</li>
<li><strong>Third Party</strong> – The application may be using third party APIs.</li>
</ul>
<p>The OWASP API Security Top 10 provides a good reference.</p>
<h2>3. Common API Security Issues</h2>
<h3>3.1 Broken Object Level Authorization (BOLA)</h3>
<p>This occurs when the API doesn’t validate if the user has access to a specific object.</p>
<p>For example, an application may allow users to view their profile using an endpoint which requires a user ID.</p>
<p>However, if the backend only checks if the user is logged in and doesn’t check if they are the owner of the profile, this could expose information.</p>
<p>How to prevent:</p>
<ul>
<li>Validate if the user owns the resource on the server side.</li>
<li>Ensure all requests for secured objects are checked for permissions.</li>
<li>Never trust client side IDs.</li>
<li>Include authorisation checks during development.</li>
</ul>
<p>Authentication is used to verify who a user or application is.</p>
<p>Poor authentication can leave your API vulnerable to account compromise.</p>
<p>Common issues include:</p>
<ul>
<li>Poor password policies.</li>
<li>Poor token management.</li>
<li>No Multi-Factor Authentication for sensitive accounts.</li>
<li>Incorrect session management.</li>
<li>Tokens are valid for too long.</li>
</ul>
<p>How to prevent:</p>
<ul>
<li>Use standard authentication methods.</li>
<li>Secure your authentication tokens.</li>
<li>Ensure tokens expire after a certain time.</li>
<li>Secure session management.</li>
<li>Use Multi-Factor Authentication.</li>
</ul>
<h3>3.3 Broken Object Property Level Authorization</h3>
<p>This occurs when an API returns or allows changes to properties for an object without checking if the user has permission.</p>
<p>For example, a profile endpoint may return internal account information which should only be seen by admins.</p>
<p>How to prevent:</p>
<ul>
<li>Only return the fields required.</li>
<li>Validate the properties users can change.</li>
<li>Add permissions to properties.</li>
<li>Don’t automatically return whole objects from the database.</li>
</ul>
<h3>3.4 Unrestricted Resource Consumption</h3>
<p>APIs use resources such as CPU, Memory, Storage and Bandwidth.</p>
<p>If you don’t restrict how much resources are being used, you can have excessive requests which may impact availability.</p>
<p>How to prevent:</p>
<ul>
<li>Rate limit.</li>
<li>Limit how much data can be sent in a request.</li>
<li>Pagination.</li>
<li>Set appropriate timeouts.</li>
<li>Monitor resource usage.</li>
</ul>
<h3>3.5 Broken Function Level Authorization</h3>
<p>This occurs when users can access functions that should be restricted to other roles.</p>
<p>For example, a standard user shouldn’t automatically have access to admin functions.</p>
<p>How to prevent:</p>
<ul>
<li>Enforce permissions on the server.</li>
<li>Implement Role Based Access Control.</li>
<li>Check authorisation for sensitive functions.</li>
<li>Test different user roles have the correct access.</li>
</ul>
<h3>3.6 Security Misconfiguration</h3>
<p>Misconfigured APIs can cause unnecessary security risks.</p>
<p>Examples include:</p>
<ul>
<li>Debug information being exposed in production.</li>
<li>Unnecessary endpoints enabled.</li>
<li>Incorrect CORS configuration.</li>
<li>No security headers.</li>
<li>Too many permissions.</li>
</ul>
<p>How to prevent:</p>
<ul>
<li>Check configurations in production.</li>
<li>Disable any unnecessary services.</li>
<li>Keep dependencies up to date.</li>
<li>Don’t expose internal error details.</li>
<li>Regularly check API security settings.</li>
</ul>
<h2>4. Authentication vs Authorisation</h2>
<p>Authentication and authorisation are closely related but serve different purposes.</p>
<p><strong>Authentication</strong></p>
<ul>
<li>Verifies Identity
Example: Who are you?</li>
<li>Often uses passwords, tokens or MFA</li>
<li>Happens before protected access is granted</li>
</ul>
<p><strong>Authorisation</strong></p>
<ul>
<li>Determines Permissions
Example: What can you access?</li>
<li>User roles, policies, and permissions</li>
<li>Determines which actions are allowed</li>
</ul>
<p>For example, a user may successfully authenticate to an application but still be denied access to an administrator endpoint.</p>
<p>This is why both authentication and authorisation are necessary.</p>
<h2>5. Best Practice</h2>
<p>As a developer you can implement the following to improve API security:</p>
<ul>
<li><strong>Use HTTPS:</strong> Protect data while it travels between clients and servers.</li>
<li><strong>Validate input:</strong> Check incoming data before processing it.</li>
<li><strong>Enforce authorisation:</strong> Verify permissions for every protected operation.</li>
<li><strong>Use secure authentication:</strong> Follow established authentication standards.</li>
<li><strong>Apply rate limiting:</strong> Reduce excessive or abusive requests.</li>
<li><strong>Protect sensitive information:</strong> Avoid returning unnecessary personal or internal data.</li>
<li><strong>Manage API keys securely:</strong> Do not expose secrets in public repositories or frontend code.</li>
<li><strong>Maintain an API inventory:</strong> Know which endpoints and versions are active.</li>
<li><strong>Monitor API activity:</strong> Record relevant security events.</li>
<li><strong>Update dependencies:</strong> Address known vulnerabilities in libraries and frameworks.</li>
</ul>
<h2>6. Testing</h2>
<p>Testing should be done during development. Testing can include:</p>
<ul>
<li>Authentication.</li>
<li>Authorisation.</li>
<li>Validation.</li>
<li>Rate limiting.</li>
<li>Error handling.</li>
<li>Dependencies and configurations.</li>
<li>Different user roles.</li>
</ul>
<p>As a developer you should also check the documentation for your API to make sure it is accurate.</p>
<p>Only test in systems you have permission to.</p>
<h2>7. OWASP</h2>
<p>The Open Worldwide Application Security Project publish guidelines to help developers understand security risks within their applications.</p>
<p>The OWASP API Security Top 10:2023 lists 10 important security issues for APIs:</p>
<ul>
<li>Broken Object Level Authorization.</li>
<li>Broken Authentication.</li>
<li>Broken Object Property Level Authorization.</li>
<li>Unrestricted Resource Consumption.</li>
<li>Broken Function Level Authorization.</li>
<li>Unrestricted Access to Sensitive Business Flows.</li>
<li>Server Side Request Forgery.</li>
<li>Security Misconfiguration.</li>
<li>Improper Inventory Management.</li>
<li>Unsafe Consumption of APIs.</li>
</ul>
<p>This is a good starting point for developers looking to improve their API security.</p>
<p>This isn’t an exhaustive list of all vulnerabilities.</p>
<h2>8. Future of API Security</h2>
<p>APIs will continue to be an important part of applications.</p>
<p>With the rise of microservices, cloud platforms, mobile applications and third party integrations, it is important to ensure you have secure communication between services.</p>
<p>Developers will need to focus on:</p>
<ul>
<li>Strong identity and access management.</li>
<li>Automated security testing.</li>
<li>Inventory management.</li>
<li>Secure communication between services.</li>
<li>Monitoring and anomaly detection.</li>
<li>Securing sensitive business functions.</li>
</ul>
<p>API security will continue to be an important responsibility for developers and security professionals.</p>
<h2>Conclusion</h2>
<p>APIs are an essential part of modern software, but can introduce security risks.</p>
<p>Poor authentication, broken authorisation, excessive resource usage and security misconfiguration can expose your application and sensitive data.</p>
<p>By following best practice and using resources like the OWASP API Security Top 10 you can create more secure and reliable APIs.</p>
<p>API security should never be an optional feature, it should be considered at all stages of application development.</p>
<h2>References</h2>
<p><a href="https://owasp.org/www-project-api-security/">OWASP API Security Project</a>
<a href="https://owasp.org/API-Security/">OWASP API Security Top 10</a>
<a href="https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html">OWASP REST Security Cheat Sheet</a></p>
]]></content:encoded></item><item><title><![CDATA[Zero Trust Security]]></title><description><![CDATA[Learn how Zero Trust protects modern systems through identity checks, least privilege, device security and continuous verification.]]></description><link>https://afthyir.hashnode.dev/zero-trust-security</link><guid isPermaLink="true">https://afthyir.hashnode.dev/zero-trust-security</guid><category><![CDATA[cybersecurity]]></category><category><![CDATA[zero-trust]]></category><category><![CDATA[network security]]></category><category><![CDATA[identity-management]]></category><category><![CDATA[information security]]></category><dc:creator><![CDATA[Afthy Irshath]]></dc:creator><pubDate>Sat, 14 Nov 2026 17:59:08 GMT</pubDate><content:encoded><![CDATA[<p>Many organisations have used network security to secure their systems. They would ensure they had a secure network with only users connecting to the network. When they connected to the network they were generally trusted to access any other systems.</p>
<p>However, organisations are using technology differently now:</p>
<ul>
<li>Employees are not connecting to systems from an office.</li>
<li>Applications are using the cloud.</li>
<li>Data is stored in many places.</li>
<li>Services regularly interact with each other using the internet.</li>
</ul>
<p>A secure network with trusted users is no longer enough to protect your organisation. You no longer trust the users or devices to connect to your network. This is where Zero Trust Security comes in.</p>
<p>Zero Trust Security ensures your company resources are secure by verifying users and devices. The principle is based around:</p>
<p>Never Trust, Always Verify</p>
<h2>1. What is Zero Trust Security is a type of cybersecurity that ensures users, devices and applications are verified before they can gain access to company resources. Traditional security methods often use network security to allow users to connect to the internal network and access multiple systems.</h2>
<p>However, with Zero Trust Security this is no longer the case. Even if a user is connected to the company network their identity, device and permissions will need to be considered.</p>
<p>For example if an employee is trying to access an internal application they will need to:</p>
<ul>
<li>Log into the application.</li>
<li>Verify their identity.</li>
<li>Check their device meets the security requirements.</li>
<li>Check their permissions.</li>
<li>Only allow access if they meet the security policies.</li>
</ul>
<p>They will not automatically have access to everything. All requests will be checked against the security requirements.</p>
<h2>2. Why is Zero Trust Important?</h2>
<p>The network boundary has become more complex. Traditionally organisations would focus on securing their network from within the office. However now employees, applications and services are spread across multiple environments.</p>
<p>This causes some issues:</p>
<ul>
<li>Remote working – Employees regularly connect to company systems from home and public networks.</li>
<li>Cloud Applications – Data is stored and applications are run across multiple cloud platforms.</li>
<li>Password theft – Credentials can be stolen to allow unauthorised users to access company accounts.</li>
<li>Insider threats – Employees or authorised users may accidentally expose information or misuse their privileges.</li>
<li>Devices – Organisations must manage access from devices such as laptops, mobiles and servers.</li>
</ul>
<p>We can no longer trust users to have access just because they are connecting from a certain network. Zero Trust looks at all access requests.</p>
<p>For example, if an employee is connecting to a company application from a managed laptop they may meet the security requirements. However, if they are connecting from an unknown device or there is suspicious activity during login further verification may be required or no access given. This means organisations have more control over who has access to the systems.</p>
<h2>3. Zero Trust Principles</h2>
<p>There are many security principles within Zero Trust. These help to prevent unnecessary access and increase security.</p>
<h3>3.1 Never Trust, Always Verify</h3>
<p>Probably the most well known principle of Zero Trust. Instead of trusting users to have access because they are connecting to an internal network all requests should be verified. This means the organisation can consider:</p>
<ul>
<li>User identity.</li>
<li>Device identity.</li>
<li>Authentication.</li>
<li>Location &amp; Context.</li>
<li>Application/Resource.</li>
<li>Security policies.</li>
</ul>
<p>For example, even if the user has authenticated to their company account they may not have access to sensitive financial information. The system should check they have the correct permissions.</p>
<h3>3.2 Least Privilege</h3>
<p>Least Privilege means only giving users and services the necessary permissions. Giving users too many permissions can cause more damage if their account is compromised or accidentally.</p>
<ul>
<li>An administrator would have permissions to manage systems and configurations.</li>
<li>A developer would have access to development environments.</li>
<li>An analyst may only have view permissions to reports.</li>
</ul>
<p>All these roles have different responsibilities so should have different access. If all employees had administrator access this would cause unnecessary risk. With Zero Trust you should be careful with permissions and ensure they are reviewed so users don’t have access to resources they don’t need.</p>
<h3>3.3 Assume Breach</h3>
<p>Zero Trust assumes organisations may have already had a breach or an attacker may gain access. This means organisations should not rely on one security boundary. Limiting access between systems, monitoring and preparing for possible incidents.</p>
<p>If one user account is compromised the attacker should not be able to access all systems. Limiting permissions and separating resources will help with this.</p>
<h3>3.4 Continuous Verification</h3>
<p>Authentication should not just be a one off process. Sometimes users may log in but their situation may have changed. For example their device may no longer meet company security policies or unusual activity may be detected. The organisation may want to verify further or deny access.</p>
<h2>4. Zero Trust Architecture</h2>
<p>Zero Trust Architecture is the framework organisations use to implement the security principles. This will depend on the infrastructure but generally will have some components:</p>
<ul>
<li>Identity Provider (IdP) – Manages user identities and authentication.</li>
<li>Policy Engine – Verifies access requests and checks if they meet security policies.</li>
<li>Policy Administrator – Takes action based on policy engine decisions.</li>
<li>Policy Enforcement Point – Controls the connection between the user and resource.</li>
<li>Monitoring – Capture relevant security events to help identify suspicious activity.</li>
</ul>
<p>When a user tries to access a company resource the following will occur:</p>
<ul>
<li>User requests to access an application/resource.</li>
<li>Identity provider verifies user.</li>
<li>Device and context information is checked.</li>
<li>Policy engine checks if request meets security policies.</li>
<li>Policy administrator notifies enforcement point.</li>
<li>Grant/Deny access.</li>
<li>Monitor relevant activity.</li>
</ul>
<p>The main thing to note is that the organisation will decide whether to grant the request based on the request. Depending on the technologies being used the architecture may look different but the principles will be the same.</p>
<h2>5. Benefits of Zero Trust</h2>
<p>Implementing Zero Trust can help improve a number of areas within an organisations security. Some key benefits include:</p>
<ul>
<li>Reduce unauthorised access – Users and devices will need to meet the security requirements to gain access to secured resources.</li>
<li>Improved identity security – Authentication and identity management becomes more important.</li>
<li>Better access control – Least Privilege means users can’t access systems and information they don’t need.</li>
<li>Remote working – Employees can securely access company resources.</li>
<li>Improved visibility – Monitoring will help organisations understand who is accessing resources and identify any suspicious activity.</li>
<li>Reduce lateral movement – Separating systems and limiting access can make it harder for attackers to move between resources if their account/device is compromised.</li>
</ul>
<p>Another key benefit is that Zero Trust can be implemented across different environments. Organisations may not need to rely on one internal network.</p>
<h2>6. Challenges of Zero Trust</h2>
<p>Whilst Zero Trust can help organisations become more secure it may not be easy to implement across the organisation. This can cause issues with the infrastructure, applications and processes. Some common issues include:</p>
<ul>
<li>Legacy systems – Older applications may not support modern authentication or identity based access.</li>
<li>Complex Infrastructure – There may be multiple networks, cloud platforms and applications.</li>
<li>Poor User Experience – Poorly designed verification can cause frustration for employees.</li>
<li>Cost – Extra investment may be needed for identity platforms, monitoring and improving the infrastructure.</li>
<li>Managing Policies – Policies may need to be updated as employees change roles, devices change and new applications are added.</li>
</ul>
<p>It may be challenging to know where to start. Trying to implement Zero Trust across all systems can cause unnecessary disruption. It is best to implement it gradually. Start with key user accounts, sensitive information and critical applications. This will help organisations understand their infrastructure and make changes.</p>
<h2>7. Best Practice</h2>
<p>When implementing Zero Trust organisations should start by understanding what they need to protect and how users are currently accessing resources. Some key points to focus on include:</p>
<ul>
<li>Identify Key Resources – Understand what systems, applications and data are most important.</li>
<li>Keep accurate records – Keep track of users, devices, applications and services.</li>
<li>Strong Authentication – Ensure appropriate authentication methods are in place, especially for elevated accounts.</li>
<li>Least Privilege – Ensure users only have access to the resources they need.</li>
<li>Monitoring – Monitor activity around sensitive applications and company information.</li>
<li>Separate – Don’t allow unnecessary access between environments.</li>
<li>Review Permissions – Remove access if employees change roles.</li>
<li>Incident Management – Have a process in place to manage security issues.</li>
<li>Test Policies – Regularly test policies are working as intended.</li>
</ul>
<p>This will help create a more controlled environment. Remember to regularly review Zero Trust</p>
<p>As requirements and infrastructure change.</p>
<h2>8. Future of Zero Trust</h2>
<p>As organisations move towards using cloud platforms, remote working and connected applications identity based security will still be an important aspect of cybersecurity. As organisations use more cloud native environments Zero Trust is becoming more relevant.</p>
<p>Applications and services may be interacting with other services across different cloud providers, networks and infrastructures. This makes traditional network boundaries less practical. Organisations should consider how to authenticate and authorise users, devices and services.</p>
<p>NIST have also released a practical guide titled SP 1800-35 in 2025 showing how organisations can implement Zero Trust Architecture using commercially available technologies. This can be a useful reference.</p>
<p>Overall, Zero Trust is not a product that can be installed to fix all security issues. It is an ongoing strategy that organisations need to review, manage identities, monitor and make changes to policies as their infrastructure changes.</p>
<h2>9. Conclusion</h2>
<p>Zero Trust is changing the way organisations secure their networks and information. Instead of trusting users and devices because they are connecting to an internal network they will be verified based on their identity, permissions and situation.</p>
<p>Principles such as Least Privilege, Continuous Verification and Assume Breach help to reduce unnecessary access and reduce damage from compromised accounts/devices.</p>
<p>Whilst there can be challenges with implementing Zero Trust, especially with complex/legacy infrastructure, implementing it gradually can help. As businesses move towards using more cloud services, remote working and distributed applications Zero Trust will remain an important part of securing modern IT environments.</p>
<h2>References</h2>
<ul>
<li>NIST SP 800-207 – Zero Trust Architecture: <a href="https://www.nist.gov/publications/zero-trust-architecture">https://www.nist.gov/publications/zero-trust-architecture</a></li>
<li>NIST SP 1800-35 – Implementing a Zero Trust Architecture: <a href="https://www.nccoe.nist.gov/projects/implementing-zero-trust-architecture">https://www.nccoe.nist.gov/projects/implementing-zero-trust-architecture</a></li>
<li>NIST – Zero Trust Networks: <a href="https://www.nist.gov/programs-projects/zero-trust-networks">https://www.nist.gov/programs-projects/zero-trust-networks</a></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Is Cybersecurity Affected by Artificial Intelligence?]]></title><description><![CDATA[Explore how AI is transforming cybersecurity through threat detection, automated defence, phishing attacks, emerging risks and future trends.]]></description><link>https://afthyir.hashnode.dev/is-cybersecurity-affected-by-artificial-intelligence</link><guid isPermaLink="true">https://afthyir.hashnode.dev/is-cybersecurity-affected-by-artificial-intelligence</guid><category><![CDATA[cybersecurity]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[information security]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[Afthy Irshath]]></dc:creator><pubDate>Sat, 14 Nov 2026 17:16:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af88d368aaa6be5b5382d43/9513039a-a881-4b3a-bb71-3b7aff70695a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Artificial Intelligence is changing pretty much every part of technology and cybersecurity. It can improve security by helping teams detect any suspicious activity, however, threat actors can use this to create very realistic phishing attacks.</p>
<p>Yes and no.</p>
<p>Artificial Intelligence has become a key part of security. It can analyse large amounts of data quickly to find anomalies and automate mundane tasks. However cyber criminals can also use this to develop more realistic social engineering attacks, automate and create new vulnerabilities.</p>
<p>This post will look at how AI affects cybersecurity along with the benefits, issues, examples of how it can be used, new risks and what the future looks like.</p>
<h2>1. What is Artificial Intelligence?</h2>
<p>An Artificial Intelligence is any computer system which can perform tasks typically completed by humans. These tasks can include learning, pattern recognition, prediction and understanding natural language.</p>
<p>Many AI techniques can be used in cybersecurity. These include Machine Learning, deep learning and Natural Language Processing. These can detect any anomalies.</p>
<p>Traditional cybersecurity relies on rules, known threats and alerts. With the fast moving nature of attacks, it can be difficult to keep up. AI can compliment traditional tools to improve by learning from data. This can detect:</p>
<ul>
<li>Abnormal logins and misuse of credentials.</li>
<li>Malicious features of emails.</li>
<li>Unusual traffic.</li>
</ul>
<p>AI should be seen as a multiplier to help security teams.</p>
<h2>2. Benefits of AI</h2>
<p>A great benefit of AI is that it can process lots of data quickly.</p>
<h3>A. Threat Detection</h3>
<p>Organisations will have a large amount of telemetry coming from many sources such as network, authentication, application and endpoint logs. This would be extremely hard to manually analyse. Machine Learning can create a baseline of what is considered normal and detect any anomalies:</p>
<ul>
<li>Multiple failed logins or impossible logins.</li>
<li>Unauthorized access to sensitive files.</li>
<li>Unusual outbound traffic.</li>
<li>Activity outside of working hours.</li>
</ul>
<h3>B. Incident Response</h3>
<p>When responding to a breach, time is of the essence. AI supported platforms can help the security operations centre to prioritise alerts, correlate related events and respond with pre-defined actions. For example, isolating an infected endpoint or locking an account. This reduces alert fatigue and means analysts can focus on complex investigations. Any high impact automated actions should have strict permissions.</p>
<h3>C. Phishing and Email Protection</h3>
<p>Phishing is one of the most common ways of starting an attack. Instead of using basic filtering, AI models can check the content of the email, sender, past interactions and any links or attachments to detect any sophisticated impersonation.</p>
<h3>D. Malware and Behavioural</h3>
<p>Traditional anti-virus can only protect against malware by using known signatures. This can leave systems open to zero day attacks. AI supported Endpoint Detection and response tools can detect unusual behaviour such as:</p>
<ul>
<li>Unusual processes.</li>
<li>Unauthorized changes to files.</li>
<li>Memory injection.</li>
</ul>
<p>However, this AI detection can sometimes cause false positives and false negatives.</p>
<h3>E. Vulnerability Management</h3>
<p>Enterprises have thousands of applications, libraries and infrastructure. AI tools can help by correlating the vulnerability data. This can summarise technical advisories, show what is exposed on critical assets and prioritise remediation.</p>
<h2>3. Issues</h2>
<p>Whilst AI can improve security it can also make attacks easier and increase the attack surface.</p>
<h3>A. Realistic Phishing</h3>
<p>Threat actors can use generative AI to create extremely realistic phishing emails in multiple languages. You can no longer rely on bad grammar as a red flag.</p>
<h3>B. Deepfakes</h3>
<p>AI tools can create realistic audio, images and videos. Threat actors can use deepfakes to impersonate members of staff, executives or vendors. For example, cloned voices can be used to pressure employees into authorising fraudulent wire transfers or provide credentials. Strong out of band verification is now essential.</p>
<h3>C. Automated Cyber Crime</h3>
<p>Threat actors can use AI to automate reconnaissance, scanning for vulnerabilities, creating payloads and managing campaigns. Whilst this won’t make a novice an elite hacker, it can allow them to perform attacks at a faster rate and scale. However, they will still need access to infrastructure, and human error.</p>
<h3>D. Social Engineering</h3>
<p>AI can scrape data from the internet and social media to personalise pretexting scenarios depending on what role the target has, what industry they’re in and how they communicate. This makes them much harder to manipulate.</p>
<h3>E. New Attacks</h3>
<p>Using Large language models and AI agents can bring new risks. Traditional application security may not cover these. OWASP top 10 for Large Language Model Applications shows some key risks:</p>
<ul>
<li>Prompt injection – Manipulate an Large Language Model by providing prompts.</li>
<li>Sensitive information exposure – Exposing sensitive information from training data.</li>
<li>Data poisoning – Poisoning the training or reference data.</li>
<li>Model theft – Stealing the models.</li>
<li>Overstepping – Giving too much permission to AI agents.</li>
</ul>
<h2>4. Examples</h2>
<p>AI is used in almost every part of enterprise security:</p>
<ul>
<li>Network Security – Detect unusual traffic, lateral movement and command and control.</li>
<li>Email Security – Detect social engineering, Business Email Compromise and malicious content.</li>
<li>Endpoint Security – Detect unusual process behaviour to block ransomware and fileless malware.</li>
<li>Fraud Detection – Detect unusual financial transactions.</li>
<li>Security – Correlate alerts, enrich threat intelligence and speed up incidents.</li>
<li>Identity – Detect unusual authentication requests.</li>
<li>Vulnerability Management – Prioritise patching by correlating vulnerabilities with critical assets.</li>
<li>Cloud Security – Detect mis-configuration, API abuse and unusual activity.</li>
</ul>
<h2>5. AI vs Traditional Cybersecurity</h2>
<p>Does AI replace traditional cybersecurity? No, it works best when used together.</p>
<ul>
<li>Rules – Traditional uses rules, whilst AI learns from data.</li>
<li>Signatures – Traditional uses known signatures, whilst AI detects new anomalies.</li>
<li>Alerts – Traditional can have manual alert triage, whilst AI can automate.</li>
<li>Threshold – Traditional uses set thresholds, whilst AI adapts.</li>
</ul>
<p>Basic security controls such as firewalls, encryption, least privileged access, multi-factor authentication, secure configurations and regular patching cannot be ignored. AI can compliment these.</p>
<h2>6. Challenges</h2>
<p>Using AI tools can pose challenges:</p>
<ul>
<li>False positives/negatives – Over-sensitive models can cause too many alerts. Poorly configured models may miss real attacks.</li>
<li>Data privacy – AI models need large amounts of data, if you don’t classify and sanitise your data you may expose sensitive information.</li>
<li>Not Transparent – Many deep learning models cannot explain why an event was flagged. Security needs to be able to see why alerts are being raised to perform proper audits.</li>
<li>Over reliance – Blindly trusting AI can cause errors and missing context. Human oversight is required.</li>
<li>Cost – Building, configuring and maintaining AI security pipelines requires specialist skills, good data, computing and validation.</li>
</ul>
<h2>7. Best Practice</h2>
<p>To get the most out of AI without any unnecessary risks, follow best practice guidelines from NIST, CISA and OWASP:</p>
<ul>
<li>Limit your access – Limit what data and permissions your AI applications and agents have.</li>
<li>Protect your data – Classify, encrypt and sanitise your data before using it in AI models or third party AI.</li>
<li>Human Oversight – Don’t blindly trust AI recommendations. High impact actions should have human approval.</li>
<li>Monitor your AI – Monitor your AI to ensure no abuse. Check for model drift, API usage and access.</li>
<li>Test your AI – Test your Large Language Model applications using adversarial testing and red teaming to find prompt injection and data leakage flaws.</li>
<li>Keep patched – Ensure all your AI frameworks, dependencies, models and infrastructure are regularly patched.</li>
<li>Staff Training – Update your security awareness to help staff identify AI generated phishing, voice cloning and social engineering using deepfake.</li>
</ul>
<h2>8. Future of Cybersecurity</h2>
<p>As AI becomes more advanced cybersecurity will change:</p>
<ul>
<li>AI will help correlate telemetry from different tools, automate tier one investigations and suggest remediation.</li>
<li>AI Security Posture Management – Securing models, training, vector databases and agents will become a key part of enterprise security.</li>
<li>AI will help with large amounts of data and mundane tasks. This allows human to focus on threat hunting, risk management and complex decisions.</li>
<li>Zero-trust verification – With the rise of synthetic media, organisations will rely on cryptography, phishing-proof multi-factor authentication and strict out of band approvals.</li>
<li>Formal AI – More regulations and formal requirements will be put in place.</li>
</ul>
<h2>9. Conclusion</h2>
<p>Yes cybersecurity is affected by AI.</p>
<p>The use of AI is changing both sides of cybersecurity. It can help security teams detect threats quicker, automate responses and manage complex environments, but can also help threat actors scale social engineering attacks, automate and attack AI driven applications.</p>
<p>AI isn’t a magic bullet and should never be seen as replacing good security engineering. The future of cybersecurity will be for those who can use AI to compliment good security practices with strict governance, monitoring and skilled people.</p>
<h2>References</h2>
<ul>
<li>ENISA Threat Landscape 2026 – European Union Agency for Cybersecurity</li>
<li>Microsoft Digital Defense Report 2025 – Microsoft</li>
<li>OWASP Top 10 for Large Language Model Applications – OWASP Foundation</li>
<li>Cybersecurity, Privacy, and Artificial Intelligence – National Institute of Standards and Technology</li>
<li>AI Risk Management Framework: Generative AI – National Institute of Standards and Technology</li>
<li>Careful Adoption of Agentic Artificial Intelligence Services – Cybersecurity and Infrastructure Security Agency &amp; International Cybersecurity Partners</li>
</ul>
<blockquote>
<p><em>Disclaimer: This article is for educational purposes only. It shows guidance and research available publicly about cybersecurity.</em></p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Building RBAC Session Auditor: Hardening Next.js Authentication with Edge Middleware and Redis]]></title><description><![CDATA[Enforce Next.js RBAC in Edge Middleware, add instant Redis session revocation, close BOLA flaws, and log denied access attempts with Supabase.]]></description><link>https://afthyir.hashnode.dev/rbac-session-auditor</link><guid isPermaLink="true">https://afthyir.hashnode.dev/rbac-session-auditor</guid><category><![CDATA[cybersecurity]]></category><category><![CDATA[Next.js]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[supabase]]></category><category><![CDATA[Redis]]></category><dc:creator><![CDATA[Afthy Irshath]]></dc:creator><pubDate>Sat, 14 Nov 2026 16:54:45 GMT</pubDate><content:encoded><![CDATA[<p>Client-side route protections are a false sense of security. Anything that runs in the browser can be viewed, altered or circumvented.</p>
<p>When developing modern web applications with Next.js you often need to make decisions for user authentication and authorisation. To do this securely and avoid many common access control issues I created RBAC Session Auditor.</p>
<ul>
<li><strong>Live Demo:</strong> <a href="https://auth.afthyir.co.uk/">https://auth.afthyir.co.uk/</a></li>
<li><strong>Source Code:</strong> <a href="https://github.com/afthyir/rbac-session-auditor">https://github.com/afthyir/rbac-session-auditor</a></li>
</ul>
<h2>About RBAC Session Auditor</h2>
<p>What is RBAC Session Auditor is a Role Based Access Control (RBAC) system for Next.js that is designed with security in mind. It ensures every request is validated against:</p>
<ul>
<li>An active Supabase login</li>
<li>A Redis session whitelist.</li>
</ul>
<p>If a request is not valid or doesn't have the correct permissions it will be instantly blocked and logged to a security audit.</p>
<h2>Security Architecture</h2>
<p>Role Enforcement in Edge Middleware There are three different roles set up for users in the application. These are enforced in Next.js Edge Middleware.</p>
<p>By enforcing these permissions at the edge, we can: Block any unauthorised requests before they can be processed in SSR or API. No way to manipulate roles using developer tools in the browser.</p>
<h2>Instant Session Revocation</h2>
<p>A common issue with stateless tokens (such as JWTs) is that once they are issued, they are valid until they expire. This means that if an account has been compromised or a users access needs to be revoked instantly, we can't wait for them to expire.</p>
<p>To combat this, RBAC Session Auditor requires that in addition to having a valid Supabase login, all sessions must also be on a Redis session whitelist. By removing a session ID from Redis, we can instantly revoke access to the application.</p>
<h2>Fix Common Access Control Issues</h2>
<p>Along with basic authentication, this project also helps to eliminate many high risk authorisation issues: BOLA (Broken Object Level Authorisation) - Prevents users from viewing or altering another user's resources by guessing or incrementing object IDs. Fail Closed - If there is an error, timeout or unexpected result when verifying, the request will be denied. Admin Routes - Any sensitive admin routes are completely separate to the client.</p>
<h2>Security Audit Logging</h2>
<p>To help with investigating any incidents, any denied access attempts will be automatically logged. This will include: Who made the request What route/resource they were trying to access When the request was made.</p>
<h2>Tech Stack</h2>
<ul>
<li>Next.js (App Router &amp; Edge Middleware)</li>
<li>TypeScript</li>
<li>Tailwind CSS</li>
<li>Supabase (Authentication)</li>
<li>Redis (Session Store &amp; Whitelist)</li>
</ul>
<h3>Try it out!</h3>
<p>You can try out the role enforcement, session revocation and audit logging. Or take a look at the code in the repository:</p>
<ul>
<li>Live Demo: <a href="https://auth.afthyir.co.uk/">https://auth.afthyir.co.uk/</a></li>
<li>Source Code: <a href="https://github.com/afthyir/rbac-session-auditor">https://github.com/afthyir/rbac-session-auditor</a></li>
</ul>
<p>Created by: Afthy Irshath (@afthyir)</p>
]]></content:encoded></item></channel></rss>