<?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 Kasturi Pushpanathan on Medium]]></title>
        <description><![CDATA[Stories by Kasturi Pushpanathan on Medium]]></description>
        <link>https://medium.com/@kaspus2003?source=rss-390a6f3ecf49------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4sD9FQI7-eHAZyEM</url>
            <title>Stories by Kasturi Pushpanathan on Medium</title>
            <link>https://medium.com/@kaspus2003?source=rss-390a6f3ecf49------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:19:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kaspus2003/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[Securing a Book Fair Stall Reservation System: A Practical OWASP Journey]]></title>
            <link>https://medium.com/@kaspus2003/securing-a-book-fair-stall-reservation-system-a-practical-owasp-journey-1f020320b20f?source=rss-390a6f3ecf49------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f020320b20f</guid>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Kasturi Pushpanathan]]></dc:creator>
            <pubDate>Mon, 31 Aug 2026 11:06:58 GMT</pubDate>
            <atom:updated>2026-08-31T11:06:58.370Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VH7scqgZ3d0IHz15eXQg-Q.png" /></figure><h3>Enhancing a Functional Web Application with OIDC, OAuth 2.0, JWT and Spring Security</h3><blockquote><strong><em>Secure Web Application Development | Security Enhancement Project</em></strong></blockquote><h3>Introduction</h3><p>A web application can provide every required feature and still be vulnerable.</p><p>A working login page does not automatically provide secure authentication. Hiding an administrative button does not provide authorization. Accepting a valid JWT does not mean a user should be able to access every resource. Even a small configuration mistake, such as exposing credentials or allowing an overly permissive CORS policy, can create a serious security weakness.</p><p>As part of my <strong>Secure Web Application Development</strong> assessment, I enhanced an existing <strong>Book Fair Stall Reservation System</strong> by identifying security risks, implementing appropriate mitigations, and testing the application’s behaviour against unauthorized and manipulated requests.</p><p>The security enhancement focused on the <strong>OWASP Top 10</strong> and modern federated identity protocols. The application uses <strong>React and Vite</strong> for the frontend, <strong>Spring Boot and Spring Security</strong> for the backend, <strong>MySQL</strong> for persistence, <strong>Auth0</strong> as the external Identity Provider, <strong>Spring WebSockets/STOMP</strong> for real-time synchronization, and <strong>FastAPI, Uvicorn and Scikit-Learn</strong> for the recommendation service.</p><p>The most important objective was not simply to add authentication. It was to make security part of the application’s architecture and lifecycle.</p><h3>1. Understanding the Application</h3><p>The Book Fair Stall Reservation System allows stall vendors to reserve stalls at an exhibition venue, while exhibition organizers manage the venue, stalls, and incoming reservations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*uf24e9OBVgxqbann3vwi1w.png" /></figure><p>The application contains two primary roles:</p><blockquote>STALL_VENDOR</blockquote><p>A vendor can create reservations and access operations related to their own profile and bookings.</p><blockquote>EXHIBITION_ORGANIZER (ADMIN)</blockquote><p>An organizer manages the exhibition venue, stalls, vendor reservations, and administrative operations.</p><p>This separation made server-side authorization a fundamental security requirement.</p><h3>2. The First Security Lesson: Authentication Is Not Authorization</h3><p>One of the most important lessons from this project was understanding the difference between <strong>authentication</strong> and <strong>authorization</strong>.</p><h4>Authentication</h4><p>Authentication answers:</p><blockquote><strong><em>Who is the user?</em></strong></blockquote><p>In this application, Auth0 handles the authentication process.</p><h4>Authorization</h4><p>Authorization answers:</p><blockquote><strong><em>What is this authenticated user allowed to do?</em></strong></blockquote><p>Spring Security and application-level ownership checks enforce these decisions.</p><p>For example, imagine that Vendor A owns reservation 24.</p><p>The vendor may legitimately request:</p><pre>GET /api/reservations/24</pre><p>But changing the URL to:</p><pre>GET /api/reservations/25</pre><p>must not expose another vendor’s reservation.</p><p>This is why frontend restrictions cannot be treated as security controls.</p><p>An attacker can bypass the React interface and send HTTP requests directly to the backend.</p><blockquote><strong><em>If the client can send the request, the server must be able to enforce the security decision.</em></strong></blockquote><h3>3. Moving Authentication to Auth0</h3><p>One of the most important security improvements was removing application-managed password authentication.</p><p>Instead, authentication was delegated to <strong>Auth0</strong> using:</p><ul><li>OpenID Connect (OIDC)</li><li>OAuth 2.0</li><li>Authorization Code Flow</li><li>Proof Key for Code Exchange (PKCE)</li><li>JWT Bearer Access Tokens</li></ul><p>The high-level flow is:</p><pre>User<br>  |<br>  v<br>React Application<br>  |<br>  v<br>Auth0 Authorization Endpoint<br>  |<br>  v<br>User Authentication<br>  |<br>  v<br>Authorization Code<br>  |<br>  v<br>Token Exchange<br>(Auth Code + Code Verifier)<br>  |<br>  v<br>JWT Access Token<br>  |<br>  v<br>React Application<br>  |<br>  | Authorization: Bearer &lt;access-token&gt;<br>  v<br>Spring Boot API<br>  |<br>  v<br>JWT Validation<br>  |<br>  v<br>Authorized Request</pre><p>The React application is a <strong>public client</strong> running in the user’s browser. A traditional client secret cannot safely be kept in browser code, which makes PKCE particularly appropriate for this architecture.</p><h3>4. Why PKCE Matters</h3><p><strong>PKCE (Proof Key for Code Exchange)</strong> adds protection to the OAuth 2.0 Authorization Code Flow.</p><p>The process can be understood in four stages.</p><h3>Step 1 — Generate the Code Verifier</h3><p>The React application generates a cryptographically secure random value.</p><p>Conceptually:</p><pre>window.crypto.getRandomValues(...)</pre><p>The verifier is kept by the client during the authentication process.</p><h3>Step 2 — Generate the Code Challenge</h3><p>The verifier is hashed using SHA-256:</p><pre>code_challenge = BASE64URL(SHA256(code_verifier))</pre><p>The resulting challenge is sent to Auth0.</p><h3>Step 3 — Send the Authorization Request</h3><p>The authorization request includes:</p><pre>code_challenge<br>code_challenge_method=S256</pre><h3>Step 4 — Verify the Code</h3><p>After successful authentication, Auth0 returns an authorization code.</p><p>The client provides the original:</p><pre>code_verifier</pre><p>Auth0 verifies that the verifier corresponds to the challenge before completing the token exchange.</p><p>The key idea is that an intercepted authorization code alone is not sufficient to complete the exchange.</p><h3>5. JWT Validation in Spring Security</h3><p>A token received from the frontend should never be trusted automatically.</p><p>The Spring Boot backend operates as an <strong>OAuth 2.0 Resource Server</strong>.</p><p>For protected API requests, Spring Security validates important properties of the JWT.</p><h4>5.1 Cryptographic Signature</h4><p>The JWT signature is verified using Auth0’s public keys obtained through its JWKS endpoint.</p><h4>5.2 Issuer (iss)</h4><p>The issuer claim is checked to ensure that the token was issued by the trusted Auth0 tenant.</p><h4>5.3 Audience (aud)</h4><p>The audience claim is checked to ensure that the token was intended for the application’s API.</p><h4>5.4 Expiration (exp)</h4><p>Expired tokens are rejected.</p><h4>5.5 Authorization Claims</h4><p>Relevant role information is converted into application authorities.</p><p>Conceptually:</p><pre>Auth0 JWT<br>   |<br>   v<br>Spring Security<br>   |<br>   +--&gt; Signature<br>   +--&gt; Issuer<br>   +--&gt; Audience<br>   +--&gt; Expiration<br>   +--&gt; Authorities<br>   |<br>   v<br>Authenticated Principal</pre><p>This allows authorization decisions to be made from validated authentication information rather than frontend-controlled data.</p><h3>6. Just-In-Time User Provisioning</h3><p>Moving authentication to Auth0 introduced an architectural challenge.</p><p>Auth0 manages the federated identity, but the reservation system still requires a local User record because reservations depend on database relationships and foreign keys.</p><p>I addressed this using <strong>Just-In-Time (JIT) user provisioning</strong>.</p><p>The process is:</p><pre>User authenticates with Auth0<br>          |<br>          v<br>Valid JWT received<br>          |<br>          v<br>Extract identity<br>          |<br>          v<br>Search local User table<br>          |<br>      +---+---+<br>      |       |<br>    Found   Missing<br>      |       |<br>      |       v<br>      |   Create User<br>      |       |<br>      +---+---+<br>          |<br>          v<br>Continue application request</pre><p>A simplified implementation is:</p><pre>String email = jwt.getClaimAsString(&quot;email&quot;);</pre><pre>User user = userRepository.findByEmail(email).orElseGet(() -&gt; {<br>    User newUser = new User();<br>    newUser.setEmail(email);<br>    newUser.setName(jwt.getClaimAsString(&quot;name&quot;));<br>    newUser.setRole(<br>        adminEmails.contains(email)<br>            ? UserRole.ADMIN<br>            : UserRole.VENDOR<br>    );<br>    return userRepository.save(newUser);<br>});</pre><p>This creates a bridge between the external identity system and the application’s local business model.</p><h3>7. OWASP A01: Broken Access Control and IDOR</h3><p><strong>Broken Access Control</strong> was one of the most important security risks addressed.</p><p>A common example is <strong>Insecure Direct Object Reference (IDOR)</strong>.</p><p>Suppose a vendor accesses:</p><pre>GET /api/reservations/24</pre><p>Simply changing the identifier to:</p><pre>GET /api/reservations/25</pre><p>must not allow the vendor to view or cancel another vendor’s reservation.</p><p>The authorization logic follows:</p><pre>Authenticated User<br>        |<br>        v<br>Requested Reservation<br>        |<br>        v<br>Check Ownership<br>        |<br>        v<br>     +--+--+<br>     |     |<br>    Yes    No<br>     |     |<br>     v     v<br>  Allow   403</pre><p>A simplified implementation is:</p><pre>@GetMapping(&quot;/{id}&quot;)<br>public ResponseEntity&lt;?&gt; getDetail(<br>        @PathVariable Long id,<br>        Authentication auth) {</pre><pre>    Long userId = currentUserId(auth);</pre><pre>    Reservation reservation =<br>        reservationService.getReservationById(id);</pre><pre>    boolean isAdmin = auth.getAuthorities()<br>        .stream()<br>        .anyMatch(a -&gt;<br>            a.getAuthority().equals(&quot;ROLE_ADMIN&quot;));</pre><pre>    if (!isAdmin &amp;&amp;<br>        !reservation.getVendor().getId().equals(userId)) {</pre><pre>        return ResponseEntity<br>            .status(403)<br>            .body(Map.of(<br>                &quot;message&quot;,<br>                &quot;Access denied: You do not own this reservation.&quot;<br>            ));<br>    }</pre><pre>    return ResponseEntity.ok(reservation);<br>}</pre><p>This demonstrates the difference clearly:</p><ul><li><strong>Authentication</strong> determines who the user is.</li><li><strong>Authorization</strong> determines what they can access.</li><li><strong>Ownership checks</strong> determine whether they can access a specific resource.</li></ul><h3>8. Preventing Client-Side Identity Manipulation</h3><p>Another important security decision was avoiding trust in a vendor ID supplied by the frontend.</p><p>An attacker could manipulate a request such as:</p><pre>{<br>  &quot;vendorId&quot;: 15,<br>  &quot;stallId&quot;: 8<br>}</pre><p>into:</p><pre>{<br>  &quot;vendorId&quot;: 1,<br>  &quot;stallId&quot;: 8<br>}</pre><p>If the backend blindly trusted the value, the request could create a resource under another user’s identity.</p><p>Instead, the backend derives the identity from the validated authentication context:</p><pre>Long userId = currentUserId(auth);</pre><p>The security flow becomes:</p><pre>JWT<br> |<br> v<br>Validated Authentication<br> |<br> v<br>Authenticated User<br> |<br> v<br>Local User ID<br> |<br> v<br>Reservation Ownership</pre><p>Therefore, security-sensitive identity is controlled by the server rather than by the request body.</p><h3>9. OWASP A02: Cryptographic Failures</h3><p>Data in transit must be protected.</p><p>The Spring Boot backend was configured to run over HTTPS using a self-signed PKCS12 keystore generated with Java keytool.</p><p>The Vite frontend was also configured for HTTPS development.</p><p>This protects communication between the frontend and backend from being transmitted as ordinary plaintext.</p><p>For production deployment, a certificate issued by a trusted Certificate Authority should be used instead of a local self-signed certificate.</p><h3>10. OWASP A03: Injection</h3><p>SQL injection was addressed by avoiding unsafe SQL concatenation.</p><p>The application uses:</p><ul><li>Spring Data JPA</li><li>Hibernate</li><li>Repository methods</li><li>Parameterized JPQL queries</li></ul><p>The unsafe pattern would be:</p><pre>&quot;SELECT * FROM users WHERE name = &#39;&quot; + userInput + &quot;&#39;&quot;</pre><p>Instead, parameters are bound separately.</p><p>Conceptually:</p><pre>Untrusted Input<br>      |<br>      v<br>Bound Parameter<br>      |<br>      v<br>Prepared Statement<br>      |<br>      v<br>Database</pre><p>This prevents user input from being interpreted as executable SQL syntax.</p><h3>11. OWASP A04: Insecure Design</h3><p>Security needs to be considered during design rather than only after implementation.</p><p>The application uses <strong>Jakarta Bean Validation</strong> annotations on request DTOs.</p><p>Examples include:</p><pre>@NotNull(message = &quot;Reservation date is required&quot;)<br>@FutureOrPresent<br>@Min(1)</pre><p>These constraints help ensure that:</p><ul><li>Required values are supplied.</li><li>Reservation dates are not placed in the past.</li><li>Invalid numerical values are rejected.</li><li>Business rules are enforced at the server boundary.</li></ul><p>Calendar and booking-cutoff checks are also performed server-side so that users cannot bypass restrictions simply by manipulating frontend controls.</p><h3>12. OWASP A05: Security Misconfiguration</h3><p>Poor error handling can expose internal implementation details.</p><p>For example, returning a complete framework stack trace to a client could reveal information about:</p><ul><li>Internal classes</li><li>Database operations</li><li>Library versions</li><li>Application structure</li></ul><p>To avoid this, a GlobalExceptionHandler was implemented.</p><pre>@ExceptionHandler(Exception.class)<br>public ResponseEntity&lt;Map&lt;String, String&gt;&gt;<br>handleGenericException(Exception e) {</pre><pre>    logger.error(&quot;Internal Server Error: &quot;, e);</pre><pre>    return ResponseEntity<br>        .status(HttpStatus.INTERNAL_SERVER_ERROR)<br>        .body(Map.of(<br>            &quot;message&quot;,<br>            &quot;An unexpected error occurred. Please contact the administrator.&quot;<br>        ));<br>}</pre><p>The technical exception is logged on the server while the client receives a controlled response.</p><h3>13. CORS Protection</h3><p>Cross-Origin Resource Sharing was another security area that required attention.</p><p>An overly permissive CORS policy can unnecessarily expose browser-accessible APIs to untrusted origins.</p><p>The application therefore uses a restricted CORS configuration containing explicitly allowed origins, headers, and methods.</p><p>The security model is:</p><pre>Browser Request<br>      |<br>      v<br>Origin Validation<br>      |<br>   +--+--+<br>   |     |<br>Trusted  Untrusted<br>   |     |<br>   v     v<br> Allow  Reject</pre><p>During testing, an unauthorized origin such as:</p><pre>Origin: https://evil-example.com</pre><p>was rejected.</p><h3>14. Securing WebSocket Communication</h3><p>The application uses <strong>Spring WebSockets with STOMP</strong> for real-time stall availability synchronization.</p><p>This introduced an important security consideration.</p><p>Protecting REST endpoints alone would not be enough if the WebSocket communication channel remained unsecured.</p><p>The STOMP connection therefore requires a Bearer access token.</p><p>The backend validates the JWT before associating the connection with an authenticated user.</p><p>Administrative subscriptions are additionally restricted according to authorization rules.</p><p>This led to another important lesson:</p><blockquote><strong><em>Every communication mechanism is part of the application’s attack surface.</em></strong></blockquote><h3>15. XSS Protection</h3><p>The React frontend was reviewed for unsafe HTML rendering.</p><p>The application avoids intentionally rendering untrusted content through:</p><pre>dangerouslySetInnerHTML</pre><p>React’s normal rendering behaviour escapes text values, helping reduce common Cross-Site Scripting risks.</p><p>A <strong>Content Security Policy (CSP)</strong> is also used as an additional browser-side security layer.</p><p>This follows a defense-in-depth approach: multiple controls work together instead of relying on one protection.</p><h3>16. HTTPS and Security Headers</h3><p>Additional browser and transport security controls were configured.</p><h3>HSTS</h3><p><strong>HTTP Strict Transport Security</strong> encourages browsers to communicate using HTTPS.</p><h3>Content Security Policy</h3><p>CSP restricts which scripts and resources the browser is allowed to execute or load.</p><h4>X-Frame-Options</h4><pre>X-Frame-Options: DENY</pre><p>helps protect against clickjacking.</p><h4>X-Content-Type-Options</h4><pre>X-Content-Type-Options: nosniff</pre><p>helps prevent MIME-type sniffing.</p><p>Together, these controls provide additional protection at the transport and browser layers.</p><h3>17. Secure File Uploads</h3><p>File uploads represent another potential attack surface.</p><p>An attacker may attempt to upload:</p><ul><li>Unexpected file types</li><li>Executable files</li><li>Extremely large files</li><li>Files with malicious filenames</li></ul><p>The application therefore:</p><ul><li>Restricts accepted MIME types.</li><li>Limits upload sizes.</li><li>Generates unique filenames using UUIDs.</li><li>Determines permitted extensions on the server.</li><li>Avoids trusting the original client filename.</li></ul><p>For example:</p><pre>Original:<br>company-logo.jpg</pre><pre>Server-generated:<br>550e8400-e29b-41d4-a716-446655440000.jpg</pre><p>For a production environment, this could be strengthened further with file-content inspection and malware scanning.</p><h3>18. Protecting Secrets</h3><p>One of the simplest and most serious security mistakes is committing credentials to source control.</p><p>Sensitive configuration such as:</p><ul><li>Database credentials</li><li>SMTP credentials</li><li>Auth0 configuration</li><li>SSL keystore passwords</li><li>Other application secrets</li></ul><p>should be supplied through environment variables or a dedicated secret-management mechanism.</p><p>The public repository should contain placeholders or example configuration only.</p><p>For example:</p><pre>DB_USERNAME=your_database_username<br>DB_PASSWORD=your_database_password</pre><pre>AUTH0_DOMAIN=your_auth0_domain<br>AUTH0_AUDIENCE=your_api_audience</pre><p>Actual credentials must never be committed.</p><p>Sensitive files such as:</p><pre>.env<br>*.p12<br>*.jks</pre><p>should be excluded from version control where appropriate.</p><blockquote><strong><em>Secrets belong in secure configuration, not in source code.</em></strong></blockquote><h3>19. Security Logging and Monitoring</h3><p>Security controls are much more useful when security-related activity can be investigated.</p><p>The application uses <strong>SLF4J/Logback</strong> logging to establish an audit trail.</p><p>Examples of security-related events include:</p><pre>login_success<br>login_failure<br>access_denied<br>invalid_token<br>reservation_created<br>reservation_approved<br>reservation_rejected<br>reservation_cancelled</pre><p>A simplified audit entry is:</p><pre>logger.info(<br>    &quot;Audit Log: Vendor ID {} requested booking for event ID {}&quot;,<br>    userId,<br>    request.getEventId()<br>);</pre><p>This provides useful information for monitoring and investigating suspicious activity.</p><h3>20. Security Assessment: Before vs After</h3><p>A useful way to understand the security enhancement is to compare the application’s behaviour before and after remediation.</p><h4>Before</h4><p>Security AreaWeaknessBroken Access ControlUnauthorized users could attempt privileged operationsCredentialsSensitive configuration could contain plaintext secretsCORSConfiguration could be overly permissiveIdentityClient-controlled IDs created authorization risksInput ValidationBusiness inputs required stronger server-side constraintsError HandlingInternal errors required controlled responsesSecurity LoggingSecurity events required stronger audit visibility</p><h4>After</h4><p>Security AreaImplemented ProtectionAuthenticationAuth0 + OIDC + OAuth 2.0 + PKCEJWTSignature, issuer, audience and expiration validationAuthorizationSpring Security role checksIDORResource ownership validationIdentityDerived from validated authentication contextInput ValidationJakarta Bean ValidationSQL InjectionJPA/Hibernate parameter bindingCORSRestricted trusted originsError HandlingGlobal exception handlingWebSocketJWT-based authenticationHTTPSEncrypted communicationSecretsEnvironment-based configurationMonitoringAudit logging</p><h3>21. Security Testing</h3><p>Implementing security controls is only half the work.</p><p>They must be tested.</p><p>I tested multiple scenarios to verify that unauthorized or malformed requests were rejected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*FcauAeaC4fiEaCkL8EEVYQ.png" /></figure><p>These tests provided practical evidence that the security mechanisms were enforced at runtime.</p><h3>22. Challenges Faced</h3><h4>22.1 Mapping Federated Identity to the Local Database</h4><p>Auth0 identifies users using a unique OIDC sub claim.</p><p>However, the application requires a local User record to maintain reservation relationships.</p><p>JIT provisioning provided a way to connect these two identity models.</p><pre>Auth0 Identity<br>      |<br>      v<br>OIDC Subject<br>      |<br>      v<br>Local User<br>      |<br>      v<br>Application Role<br>      |<br>      v<br>Reservations</pre><h4>22.2 Local HTTPS</h4><p>Running HTTPS locally with a self-signed certificate caused browser trust warnings.</p><p>I had to configure the local environment so that HTTPS communication between:</p><pre>https://localhost:8080<br>https://localhost:5173</pre><p>could work during development.</p><h4>22.3 CORS and Authenticated Requests</h4><p>Authenticated browser requests required careful CORS configuration.</p><p>Specific origins, headers, and methods had to be permitted without opening the API to arbitrary websites.</p><h4>22.4 WebSocket Authentication</h4><p>REST requests and WebSocket/STOMP connections have different communication lifecycles.</p><p>Therefore, WebSocket authentication required separate consideration rather than assuming REST security would automatically cover it.</p><h4>22.5 Testing Security Behaviour</h4><p>Another challenge was moving from simply reading code to actively attempting to break the application.</p><p>Testing manipulated resource IDs, unauthorized roles, invalid tokens, invalid data, and unauthorized origins provided much stronger evidence of the application’s security posture.</p><h3>23. Key Learning Outcomes</h3><p>This project provided several important practical lessons.</p><h4>1. Never Trust the Frontend</h4><p>Frontend restrictions are useful for user experience, but attackers can bypass them.</p><h4>2. Authentication Does Not Equal Authorization</h4><p>A valid JWT identifies an authenticated user; it does not automatically grant access to every operation or resource.</p><h4>3. RBAC Alone Is Not Enough</h4><p>Roles provide broad permissions, but resource ownership checks are still required to prevent IDOR.</p><h4>4. Identity Should Come from Trusted Authentication Data</h4><p>Security-sensitive identity should be derived from validated authentication information instead of client-controlled request parameters.</p><h4>5. Security Must Be Layered</h4><p>Authentication, authorization, input validation, HTTPS, CORS, WebSocket security, secret management, error handling, and logging all contribute to the final security posture.</p><h4>6. Federated Authentication Reduces Application Complexity</h4><p>Using an external Identity Provider such as Auth0 allows the application to delegate core authentication responsibilities while concentrating on application-specific authorization.</p><h4>7. Security Testing Is Essential</h4><p>A security control should not be considered complete until its expected behaviour has been tested.</p><h3>24. Overall Security Architecture</h3><p>The final architecture can be summarized as:</p><pre>USER<br>                           |<br>                           v<br>                    React Frontend<br>                           |<br>                           v<br>                 Auth0 / OIDC / PKCE<br>                           |<br>                           v<br>                    JWT Access Token<br>                           |<br>                           v<br>                 Spring Security<br>                           |<br>             +-------------+-------------+<br>             |             |             |<br>             v             v             v<br>        JWT Validation    RBAC      Ownership Checks<br>             |             |             |<br>             +-------------+-------------+<br>                           |<br>                           v<br>                  Business Logic Layer<br>                           |<br>             +-------------+-------------+<br>             |             |             |<br>             v             v             v<br>          Validation      JPA         WebSocket<br>             |             |             |<br>             v             v             v<br>        Secure Input    MySQL       Authenticated<br>                                      STOMP<br>                           |<br>                           v<br>                    Audit Logging</pre><p>The important idea is that no single security mechanism is expected to protect the entire application.</p><p>Security is layered.</p><h3>25. Conclusion</h3><p>Enhancing the Book Fair Stall Reservation System gave me an opportunity to move beyond theoretical security concepts and apply them to a real distributed web application.</p><p>The biggest change was not simply adding Auth0 or Spring Security.</p><p>It was changing the way I think about application development.</p><p>For every feature, I began asking:</p><ul><li>Who is allowed to perform this action?</li><li>Does the user own this resource?</li><li>Can the request be manipulated?</li><li>Can the frontend be bypassed?</li><li>Can sensitive information leak through errors?</li><li>Can credentials be exposed?</li><li>Can an untrusted origin access the API?</li><li>Is the WebSocket channel protected?</li><li>Can security events be investigated?</li><li>What happens when an attacker deliberately changes the request?</li></ul><p>By integrating <strong>Auth0, OpenID Connect, OAuth 2.0 with PKCE, JWT validation, Spring Security, RBAC, object-level authorization, input validation, SQL injection protections, CORS restrictions, WebSocket authentication, HTTPS, security headers, secure file uploads, secret management, error handling, and audit logging</strong>, the application gained multiple layers of protection.</p><p>The most valuable lesson I learned is:</p><blockquote><strong><em>Security is not a feature added at the end of development. It is a continuous engineering responsibility that must be considered throughout architecture, implementation, configuration, testing, and deployment.</em></strong></blockquote><h3>Source Code</h3><p>The complete implementation, security configuration, database script, environment configuration guidance, and deployment instructions are available in my public GitHub repository: 👉 <a href="https://github.com/Kasturi-Pushpanathan/secure-stall-booking-system"><strong>Secure Stall Reservation System on GitHub</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f020320b20f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance Improvement of Optical Isolators using statistical quality tools]]></title>
            <link>https://medium.com/@kaspus2003/performance-improvement-of-optical-isolators-using-statistical-quality-tools-17efdf64fd26?source=rss-390a6f3ecf49------2</link>
            <guid isPermaLink="false">https://medium.com/p/17efdf64fd26</guid>
            <dc:creator><![CDATA[Kasturi Pushpanathan]]></dc:creator>
            <pubDate>Fri, 26 Dec 2025 13:14:00 GMT</pubDate>
            <atom:updated>2025-12-26T13:14:00.332Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Ld1qRhGpF0JM36vp.jpeg" /></figure><p>At first glance, an optical isolator appears to be a small and uncomplicated device. However, in fibre optic communication systems, even a minor defect within this component can cause signal instability, damage laser sources, and lead to expensive system failures. A research presentation showcased at the Undergraduate Symposium &amp; Innovation Exhibition addressed this critical issue by demonstrating how statistical quality tools can be effectively used to enhance the performance of optical isolators.</p><p>— -</p><p>Research Title</p><p>Performance Improvement of Optical Isolators Using Statistical Quality Tools</p><p>Authors</p><p>N.D.K. Nadeesha, Dr. (Mrs.) L.P.N.D. Premarathna,<br>Dr. (Mrs.) A.P. Hewawachchi, Dr. (Mrs.) P. Gamage,<br>Mr. H.A.D. Priasad<br>(University of Kelaniya &amp; University of Peradeniya, Sri Lanka)</p><p>Paper ID: 25</p><p>— -</p><p>Understanding the Problem</p><p>Optical isolators play a vital role in fibre optic systems by allowing light to pass in one direction while preventing harmful back reflections. If these reflections are not properly controlled, they can interfere with laser performance and degrade signal quality. In manufacturing environments, achieving consistent optical isolator quality is challenging. Small variations in production processes — often unnoticed — can result in increased insertion loss, reduced isolation, and unreliable signal transmission.</p><p>— -</p><p>A Data-Driven Approach to Quality Improvement</p><p>To tackle this challenge, the researchers employed the Six Sigma DMAIC framework — Define, Measure, Analyse, Improve, and Control — to systematically evaluate and enhance the manufacturing process.</p><p>During the Measure phase, production data collected over several months was analysed using Statistical Quality Control (SQC) tools, including control charts, Pareto diagrams, boxplots, and histograms. Key performance indicators such as insertion loss and isolation were closely monitored across different stages of production.</p><p>To ensure measurement accuracy, a Gage Repeatability and Reproducibility (Gage R&amp;R) study was conducted. This confirmed that the measurement system was reliable and that observed variations were due to the process rather than measurement errors.</p><p>— -</p><p>Key Findings</p><p>The statistical analysis revealed a crucial insight: significant variation occurred mainly at the initial and final stages of the production process, while intermediate stages remained relatively stable. This trend was clearly illustrated through boxplots and histograms, which showed wider spreads and noticeable shifts at specific stages.</p><p>Instead of relying on assumptions, the data precisely identified where improvements were needed. This enabled targeted corrective actions, leading to enhanced process stability and reduced performance variability.</p><p>— -</p><p>Final Thoughts</p><p>Quality in optical systems is not accidental — it is the result of systematic measurement, analysis, and control. This research demonstrates that even small, data-driven improvements in manufacturing processes can greatly enhance the performance and reliability of optical isolators. As optical communication continues to support global connectivity, such statistically driven quality improvement approaches are more important than ever.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17efdf64fd26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built My First Bootable OS]]></title>
            <link>https://medium.com/@kaspus2003/how-i-built-my-first-bootable-os-f4831048203e?source=rss-390a6f3ecf49------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4831048203e</guid>
            <dc:creator><![CDATA[Kasturi Pushpanathan]]></dc:creator>
            <pubDate>Wed, 09 Jul 2025 11:49:42 GMT</pubDate>
            <atom:updated>2025-07-09T11:49:42.254Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Have you ever wondered how an operating system boots up and shows text on your screen?</strong> I recently took my first dive into OS development by creating a tiny bootloader from scratch that runs directly on the hardware and prints a welcome message. This article shares my step-by-step experience and code to help you build your own minimal OS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*b9E8PSnK5RBcIlbirUc1tg.jpeg" /><figcaption>Operating Systems</figcaption></figure><h3>Why Build a Bootloader?</h3><p>When you power on your computer, it doesn’t immediately run Windows, Linux, or macOS. Instead, a small program called a <strong>bootloader</strong> runs first. This bootloader initializes the system and loads the operating system into memory.</p><p>By writing a bootloader yourself, you’ll understand the <strong>lowest level of how computers start up</strong> — before any complex software kicks in.</p><h3>My Goal</h3><p>I wanted to create the simplest bootable OS that does just one thing: print the text right on the screen. No fancy graphics or multitasking — just that friendly greeting.</p><pre>Welcome Kasturi os</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_J_IVHWrx0iRLDC8NsXe6g.png" /></figure><h3>Tools You’ll Need</h3><ul><li><strong>NASM</strong> — an assembler to turn human-readable assembly code into machine code the CPU understands.</li><li><strong>QEMU</strong> — a virtual machine that lets you test your OS safely on your current PC without messing with your real system.</li></ul><p>If you’re on Linux or WSL, install required tools like this:</p><pre>sudo apt update<br>sudo apt install nasm qemu</pre><p>Logged into Ubuntu terminal, ready to build my bootloader:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NSTl7vOyx321JuWQjtilZA.png" /></figure><h3>Step 1: Write the Bootloader Code</h3><p>Create a new file called bootloader.asm and write this assembly code:</p><pre>[org 0x7c00]          ; BIOS loads bootloader here</pre><pre>start:<br>    mov si, message   ; Point to message string<br>print_loop:<br>    lodsb             ; Load byte from [si] into AL, increment si<br>    cmp al, 0         ; Check if end of string (null terminator)<br>    je halt           ; If yes, jump to halt loop<br>    mov ah, 0x0E      ; BIOS teletype function (print char)<br>    int 0x10          ; Call BIOS video interrupt<br>    jmp print_loop    ; Repeat for next char<br>halt:<br>    jmp $             ; Infinite loop to stop here<br>message db &#39;Welcome Kasturi os&#39;, 0<br>; Fill the rest of boot sector with zeros<br>times 510 - ($ - $$) db 0<br>; Boot signature (required)<br>dw 0xAA55</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wc8sRKcHYR6sW_44Nx46A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*msryRnmVqYebDeKg6eJWUQ.png" /></figure><p><strong>What’s happening here?</strong></p><ul><li>[org 0x7c00] tells NASM that the code will be loaded at memory address 0x7c00 by BIOS.</li><li>We print each character by calling BIOS interrupt 0x10 with teletype function (ah=0x0E).</li><li>After printing the string, the program halts by looping forever.</li><li>The last two bytes 0xAA55 mark this as a valid boot sector.</li></ul><h3>Step 2: Assemble Your Bootloader</h3><p>Run this command to create a raw binary file:</p><pre>nasm -f bin bootloader.asm -o bootloader.bin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcN-selkklFYTk4Q_ifjWA.png" /></figure><h3>Step 3: Run Your OS in QEMU</h3><p>Now, launch QEMU with:</p><pre>qemu-system-x86_64 -drive format=raw,file=bootloader.bin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Q77heJxwUq-XzAcJ5J6Bw.png" /></figure><p>A window pops up showing:</p><pre>Welcome Kasturi os</pre><p>Congrats! You just wrote and booted your first program that runs directly on a PC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_J_IVHWrx0iRLDC8NsXe6g.png" /></figure><h3>What Did I Learn?</h3><ul><li><strong>How the BIOS loads the bootloader</strong> at address 0x7c00.</li><li><strong>Using BIOS interrupts</strong> to print characters on the screen.</li><li>The importance of the <strong>boot signature (0xAA55)</strong> for bootable media.</li><li>How low-level assembly communicates directly with hardware.</li></ul><h3>What’s Next?</h3><p>Now that you can print text, the real fun begins. You can explore:</p><ul><li>Handling <strong>keyboard input</strong> to read user commands.</li><li>Implementing a simple <strong>shell</strong> that executes commands.</li><li>Writing a <strong>kernel</strong> in C and linking it with your bootloader.</li><li>Learning about memory management, multitasking, and file systems.</li></ul><h3>Final Thoughts</h3><p>Writing a tiny bootloader might seem daunting, but it’s a rewarding way to get close to the metal and understand how computers really work. I hope this simple tutorial encourages you to experiment with OS development yourself!</p><p>If you want to see my full code or have questions about the next steps, feel free to reach out or leave a comment.</p><p>Here is my GitHub repository link:</p><p><a href="https://github.com/Kasturi-Pushpanathan/simple-os">https://github.com/Kasturi-Pushpanathan/simple-os</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4831048203e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Currently Available Software Licenses: A Comprehensive Overview]]></title>
            <link>https://medium.com/@kaspus2003/currently-available-software-licenses-a-comprehensive-overview-d44ed1901efd?source=rss-390a6f3ecf49------2</link>
            <guid isPermaLink="false">https://medium.com/p/d44ed1901efd</guid>
            <dc:creator><![CDATA[Kasturi Pushpanathan]]></dc:creator>
            <pubDate>Tue, 27 May 2025 06:08:15 GMT</pubDate>
            <atom:updated>2025-05-27T06:08:15.578Z</atom:updated>
            <content:encoded><![CDATA[<p>Software has become a vital part of our daily lives — whether it’s mobile apps, web services, or enterprise tools. However, every piece of software is distributed under a <strong>license</strong>, which governs how it can be used, modified, or redistributed. Understanding <strong>software licenses</strong> is crucial for developers, companies, and users to ensure legal compliance and ethical use of software.</p><p>This blog article explores the <strong>currently available software licenses</strong>, their categories, and their importance in the software development ecosystem.</p><h3>What is a Software License?</h3><p>A <strong>software license</strong> is a legal agreement that defines how software can be used and shared. It protects the rights of the creator while providing clear usage guidelines for the end user. Without a license, using or distributing software is generally illegal.</p><h3>Categories of Software Licenses</h3><p>Currently, software licenses fall into two major categories:</p><h3>1. Proprietary Licenses</h3><p>These licenses are restrictive. The software is owned by an individual or company, and users are only granted limited rights to use it.</p><p><strong>Examples:</strong></p><ul><li>Microsoft Windows License</li><li>Adobe Creative Cloud License</li><li>Oracle License Agreement</li></ul><p><strong>Key Features:</strong></p><ul><li>Source code is closed</li><li>No redistribution or modification</li><li>Often requires payment or subscription</li></ul><h3>2. Open Source Licenses</h3><p>Open-source licenses allow users to access, modify, and share the source code. However, different open-source licenses come with varying levels of restriction.</p><p>Open source licenses can be further classified into:</p><h4>a. Permissive Licenses</h4><p>These are very flexible and allow almost unrestricted use, modification, and redistribution.</p><p><strong>Popular Permissive Licenses:</strong></p><ul><li><strong>MIT License</strong></li><li><strong>Apache License 2.0</strong></li><li><strong>BSD License (2-Clause or 3-Clause)</strong></li></ul><p><strong>Use Case:</strong> Startups and commercial projects that want flexibility without legal complexity.</p><h4>b. Copyleft Licenses</h4><p>These licenses ensure that the software and its derivatives remain open-source. Any modified versions must also be distributed with the same license.</p><p><strong>Popular Copyleft Licenses:</strong></p><ul><li><strong>GNU General Public License (GPL v2 and v3)</strong></li><li><strong>GNU Affero General Public License (AGPL)</strong></li><li><strong>Mozilla Public License (MPL)</strong></li></ul><p><strong>Use Case:</strong> Projects focused on freedom and open collaboration.</p><h3>Popular Software Licenses in 2025</h3><p>Here’s a summary of some widely used software licenses in current open-source projects:</p><p>License Type Key Characteristics <strong>MIT</strong> Permissive Simple, permissive, widely used <strong>Apache 2.0</strong> Permissive Patent protection included <strong>GPLv3</strong> Copyleft Requires modified versions to be open <strong>AGPL</strong> Copyleft Similar to GPL but includes network use <strong>BSD 3-Clause</strong> Permissive Similar to MIT, used in academic projects <strong>MPL 2.0</strong> Weak Copyleft Allows mixing proprietary and open code <strong>Proprietary</strong> Restricted No access to source, limited rights</p><h3>Importance of Understanding Software Licenses</h3><p>Understanding software licenses helps:</p><ul><li><strong>Avoid legal issues</strong></li><li><strong>Promote ethical software us</strong></li><li><strong>Encourage open collaboration</strong></li><li><strong>Choose the right software for business needs</strong></li></ul><h3>Tips for Choosing a License for Your Project</h3><p>When selecting a license for your own software:</p><ul><li>If you want to <strong>maximize usage and adoption</strong>: choose <strong>MIT</strong> or <strong>Apache 2.0</strong></li><li>If you want to <strong>ensure your code remains open</strong>: choose <strong>GPL</strong></li><li>If your software interacts with <strong>remote servers</strong>: consider <strong>AGPL</strong></li><li>If you’re developing in a <strong>commercial or academic setting</strong>: <strong>BSD</strong> or <strong>MPL</strong> may suit better</li></ul><p>You can also visit <a href="https://choosealicense.com/">https://choosealicense.com</a> for help selecting the best license.</p><h3>Conclusion</h3><p>In 2025, software licenses continue to play a critical role in how software is shared, improved, and used. Whether you are a developer, company, or student, understanding the currently available software licenses helps you make informed, ethical, and legally sound decisions. Always review the license before using or sharing software, and when in doubt, consult legal or open-source experts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d44ed1901efd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Article on Stored Procedures in MySQL]]></title>
            <link>https://medium.com/@kaspus2003/article-on-stored-procedures-in-mysql-bba08f6b94a4?source=rss-390a6f3ecf49------2</link>
            <guid isPermaLink="false">https://medium.com/p/bba08f6b94a4</guid>
            <dc:creator><![CDATA[Kasturi Pushpanathan]]></dc:creator>
            <pubDate>Mon, 27 Jan 2025 14:08:19 GMT</pubDate>
            <atom:updated>2025-01-27T14:08:19.845Z</atom:updated>
            <content:encoded><![CDATA[<h3>What are Stored Procedures?</h3><p>A stored procedure is a precompiled collection of SQL statements and optional control-flow statements, stored on the database server. It allows users to encapsulate logic and reuse it multiple times without rewriting the SQL code. Once created, stored procedures can be executed by simply calling them, which makes them highly efficient for repetitive tasks and complex operations.</p><p>Stored procedures are particularly useful for:</p><ul><li>Encapsulating business logic within the database.</li><li>Improving database security by restricting direct access to underlying tables.</li><li>Reducing network traffic by performing multiple operations in a single call.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*sh_mIgcPfTR1Ycda.jpg" /></figure><h3>Advantages of Stored Procedures</h3><p><strong>Performance Improvement</strong>: Stored procedures are precompiled and cached by the database, reducing parsing and execution time for repetitive operations.</p><p><strong>Code Reusability</strong>: Once written, the same procedure can be reused across applications, ensuring consistency and reducing development effort.</p><p><strong>Security</strong>: Permissions can be set at the procedure level, restricting direct table access to users.</p><p><strong>Reduced Network Traffic</strong>: Since stored procedures are executed on the server, multiple SQL statements can be executed in a single call, reducing communication between client and server.</p><p><strong>Easier Maintenance</strong>: Centralized logic within stored procedures simplifies updates, as changes only need to be made in one place.</p><h3>Disadvantages of Stored Procedures</h3><p><strong>Complex Debugging</strong>: Debugging stored procedures can be challenging as tools and support for debugging vary between database systems.</p><p><strong>Vendor Lock-in</strong>: Stored procedures are often written in a database-specific language, making it harder to migrate to another database system.</p><p><strong>Scalability Issues</strong>: In some scenarios, using stored procedures can lead to scalability challenges, especially when significant business logic is embedded within the database.</p><p><strong>Maintenance Overhead</strong>: As the number of stored procedures grows, managing and maintaining them can become cumbersome.</p><h3>How to Write and Execute Stored Procedures in MySQL</h3><h4>Writing a Stored Procedure</h4><p>In MySQL, stored procedures are written using the CREATE PROCEDURE statement. Here is the syntax:</p><pre>DELIMITER //<br>CREATE PROCEDURE procedure_name ([IN|OUT|INOUT] parameter_name datatype, ...)<br>BEGIN<br>    -- SQL statements go here<br>END //<br>DELIMITER ;</pre><ul><li><strong>IN</strong>: Input parameter passed to the procedure.</li><li><strong>OUT</strong>: Output parameter returned by the procedure.</li><li><strong>INOUT</strong>: Parameter used for both input and output.</li><li><strong>DELIMITER</strong>: Used to define a custom statement delimiter to avoid conflicts with the default semicolon (;).</li></ul><h4>Executing a Stored Procedure</h4><p>After creating a stored procedure, it can be executed using the CALL statement:</p><pre>CALL procedure_name(parameter1, parameter2, ...);</pre><h3>Example Use Case</h3><p><strong>Problem:</strong> Consider a scenario where you need to retrieve the total sales for a specific product within a given date range. Instead of writing the SQL query repeatedly, you can create a stored procedure.</p><h4>Step 1: Create the Stored Procedure</h4><pre>DELIMITER //<br>CREATE PROCEDURE GetTotalSales(IN product_id INT, IN start_date DATE, IN end_date DATE, OUT total_sales DECIMAL(10,2))<br>BEGIN<br>    SELECT SUM(sales_amount) INTO total_sales<br>    FROM sales<br>    WHERE product_id = product_id<br>      AND sale_date BETWEEN start_date AND end_date;<br>END //<br>DELIMITER ;</pre><h4>Step 2: Execute the Stored Procedure</h4><pre>CALL GetTotalSales(101, &#39;2025-01-01&#39;, &#39;2025-01-15&#39;, @total);<br>SELECT @total AS TotalSales;</pre><h4>Explanation</h4><ul><li><strong>Input Parameters</strong>: product_id, start_date, and end_date specify the product and the date range for sales data.</li><li><strong>Output Parameter</strong>: total_sales contains the sum of sales, which is stored in the variable @total.</li><li><strong>Query</strong>: The SQL statement computes the total sales and stores it in the OUT parameter.</li></ul><h4>Output</h4><p>The SELECT @total query will display the total sales for the specified product and date range.</p><h3>Conclusion</h3><p>Stored procedures in MySQL offer a powerful way to encapsulate and reuse SQL logic. They enhance performance, simplify application design, and improve security. However, they should be used judiciously, considering their limitations, such as debugging complexity and potential scalability challenges. By understanding their advantages and disadvantages, developers can effectively integrate stored procedures into their database solutions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bba08f6b94a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CIA Triad in Cyber Security]]></title>
            <link>https://medium.com/@kaspus2003/cia-triad-in-cyber-security-03fd60fdd5a6?source=rss-390a6f3ecf49------2</link>
            <guid isPermaLink="false">https://medium.com/p/03fd60fdd5a6</guid>
            <dc:creator><![CDATA[Kasturi Pushpanathan]]></dc:creator>
            <pubDate>Mon, 15 Jul 2024 08:55:21 GMT</pubDate>
            <atom:updated>2024-07-15T08:55:21.301Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>What is the CIA Triad?</strong></h3><p>The three letters in “CIA triad” stand for Confidentiality, Integrity, and Availability. The CIA triad is a common model that forms the basis for the development of security systems. They are used for finding vulnerabilities and methods for creating solutions.</p><p>The confidentiality, integrity, and availability of information is crucial to the operation of a business, and the CIA triad segments these three ideas into separate focal points. This differentiation is helpful because it helps guide security teams as they pinpoint the different ways in which they can address each concern.</p><p>Ideally, when all three standards have been met, the security profile of the organization is stronger and better equipped to handle threat incidents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NrmR3VwPwL8BUwTIN-jjzg.jpeg" /><figcaption>Figure 1: The CIA Triad representing Confidentiality, Integrity, and Availability. Source: CyberMaxx. (n.d.). CIA Triad [Image]. Retrieved from <a href="https://cybermaxx.com/what-is-the-cia-triad/">https://cybermaxx.com/what-is-the-cia-triad/</a></figcaption></figure><h4><strong>Confidentiality</strong></h4><p>The dictionary meaning of the word confidentiality states: the state of keeping or being kept secret or private. Confidentiality, in the context of information security, implies keeping the information secret or private from any unauthorized access, which is one of the primary needs of information security. The following are some examples of information that we often wish to keep confidential:</p><ul><li>Passwords</li><li>PIN numbers</li><li>Credit card number, expiry date, and CVV</li><li>Business plans and blueprints</li><li>Financial information</li><li>Social security numbers</li><li>Health records</li></ul><p>Common attacks on confidentiality include:</p><ul><li>Password attacks</li><li>Port scanning and ping sweeps</li><li>Dumpster driving</li><li>Shoulder surfing</li><li>Packet sniffing</li></ul><h4>Integrity</h4><p>Integrity in the context of information security refers to the quality of the information, meaning the information, once generated, should not be tampered with by any unauthorized entities. For example, if a person sends X amount of money to his friend using online banking, and his friend receives exactly X amount in his account, then the integrity of the transaction is said to be intact. If the transaction gets tampered at all in between, and the friend either receives X + (n) or X-(n) amount, then the integrity is assumed to have been tampered with during the transaction.</p><p>Common attacks on integrity include:</p><ul><li>Salami attacks</li><li>Data diddling attacks</li><li>Trust relationship attacks</li><li>Man-in-the-middle attacks</li><li>Session hijacking</li></ul><h4>Availability</h4><p>The availability principle states that if an authorized individual makes a request for a resource or information, it should be available without any disruption. For example, a person wants to download his bank account statement using an online banking facility. For some reason, the bank’s website is down and the person is unable to access it. In this case, the availability is affected as the person is unable to make a transaction on the bank’s website. From an information security perspective, availability is as important as confidentiality and integrity. For any reason, if the requested data isn’t available within time, it could cause severe tangible or intangible impact.</p><p>Common attacks on availability include the following:</p><ul><li>Denial of service attacks</li><li>SYN flood attacks</li><li>Distributed denial of service attacks</li><li>Electrical power attacks</li><li>Server room environment attacks</li><li>Natural calamities and accidents</li></ul><h3>When should you use the CIA triad?</h3><p>You should use the CIA triad in the majority of security situations, particularly because each component is critical. However, it is particularly helpful when developing systems around <a href="https://www.fortinet.com/resources/cyberglossary/data-classification"><strong>data classification</strong></a> and managing permissions and access privileges. You should also stringently employ the CIA triad when addressing the cyber vulnerabilities of your organization. It can be a powerful tool in disrupting the Cyber Kill Chain, which refers to the process of targeting and executing a cyberattack. The CIA security triad can help you hone in on what attackers may be after and then implement policies and tools to adequately protect those assets.</p><p>In addition, the CIA triad can be used when training employees regarding cybersecurity. You can use hypothetical scenarios or real-life case studies to help employees think in terms of the maintenance of confidentiality, integrity, and availability of information and systems</p><h3>Why should you use the CIA Triad?</h3><p>The CIA triad forms the core foundation for the development of security systems and policies for organizations. As such, the CIA triad plays a crucial role in keeping your data safe and secure against growing cyberthreats. When a security incident, such as data theft or a security breach occurs, it is deemed that an organization has been unsuccessful in appropriately implementing one or more of these principles. The CIA triad is vital to information security since it enhances security posture, helps organizations stay compliant with complex regulations and ensures business continuity.</p><p>In conclusion, The CIA Triad is crucial in cybersecurity, providing a robust framework for protecting sensitive information and data, ensuring smooth operations in today’s connected world.</p><h4>References</h4><p><em>1)What is the CIA Triad and Why is it important? | Fortinet</em>. (n.d.). Fortinet. <a href="https://www.fortinet.com/resources/cyberglossary/cia-triad">https://www.fortinet.com/resources/cyberglossary/cia-triad</a></p><p>2)Unitrends. (2024, March 12). <em>The CIA triad and its importance in data security</em>. Unitrends. <a href="https://www.unitrends.com/blog/cia-triad-confidentiality-integrity-availability">https://www.unitrends.com/blog/cia-triad-confidentiality-integrity-availability</a></p><p>3)Gipson, K. (2023, January 12). <em>The CIA triad: What is it?</em> <a href="https://www.cybermaxx.com/resources/what-is-the-cia-triad/">https://www.cybermaxx.com/resources/what-is-the-cia-triad/</a></p><p>4)Rahalkar, S. (2018).<em> Network Vulnerability Assessment</em>: Identify security loopholes in your network’s infrastructure.</p><p>5)Death, D. (2017). <em>Information security handbook: </em>Develop a threat model and incident response strategy to build a strong information security framework.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03fd60fdd5a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>