PCDS Tutors — Home • Online • Academic • Professional LearningServing 10+ launch cities • Expanding across India
Practical learning guideIntermediate

Cyber Security: Tutorial, Projects & Course Syllabus

Security foundations, secure systems, web security and defensive practices.

Who this is for

Students, developers and IT professionals

Before you start

JavaScript, HTTP APIs and authentication concepts. Work on synthetic data only.

Practical lesson

Test record ownership with a defensive authorization rule

Authentication identifies a caller; authorization determines which operations that caller may perform.

A record identifier supplied by a client is not evidence of ownership. Ownership must come from trusted stored data.

Set up your practice environment

Save as ownership.mjs and run node ownership.mjs. This is an isolated authorization predicate, not an authentication implementation.

javascript
import assert from 'node:assert/strict';
function canRead(caller, record) {
  return Boolean(caller && record &&
    (caller.role === 'ADMIN' || caller.id === record.ownerId));
}
const row = {id: 7, ownerId: 12};
assert.equal(canRead({id:12,role:'USER'}, row), true);
assert.equal(canRead({id:13,role:'USER'}, row), false);
assert.equal(canRead(null, row), false);
console.log('Ownership checks passed');

Expected result

Ownership checks passed

Walk through the example

  1. The caller must be derived from an authenticated, server-verified session.
  2. The ownerId must come from the database, not from the request body.
  3. The negative tests verify that a different user and an unauthenticated caller are denied.

Common mistake

Never accept role or owner identity directly from untrusted JSON as proof of authorization.

Try it yourself

Add a test for an authorized administrator and for a missing record. Which response would avoid exposing another user’s private data?

Reveal suggested solution

Assert true for a trusted ADMIN on an existing record and false for a null record. Return a consistent denial response (often 404 for resource concealment), without including the record body.

Portfolio project brief

Prepare a defensive security review for a synthetic tutor directory: authentication, access control, input validation, redacted logs and automated negative tests.

Acceptance criteria

  • Use least privilege and server-verified identity.
  • Test unauthorized access in a local application you control.
  • Do not use actual personal information or production secrets.

This is a project specification, not a completed downloadable project. Build and test it independently or with a mentor.

Quick self-test

Choose one answer per question, then check your score. No sign-in required.

1. Where must the caller role come from?
2. Can knowing a record ID prove ownership?

Complete learning roadmap

These are suggested course modules, not a claim that every module has a full tutorial on this site.

  1. 01Security fundamentals
  2. 02Networking security
  3. 03Identity & access
  4. 04Web application security
  5. 05Vulnerability management
  6. 06Incident response & secure project

Learning outcomes

  • Recognise common risks
  • Apply secure practices
  • Understand defensive workflows

Continue with official documentation

Original PCDS learning material. Check the official documentation for your installed software version; these guides are not vendor-endorsed courses.

OWASP Authorization Cheat Sheet →

Need help learning Cyber Security?

Choose a city and describe your learning goal in the enquiry form. Mention Cyber Security, your current level and whether you prefer home or online learning. Tutor availability and pricing are subject to confirmation.

Browse Cyber Security tutoring options in Mira Road or select a city above.

Cyber Security Tutorial, Practical Project & Course Syllabus | PCDS Learning