Web Development · Foundations

Web Security Basics

Want it in plain words first? Jump to Eli explains — the same idea, no jargon.
On this page 9 sections
  1. In 30 seconds
  2. Why this matters
  3. The college version
  4. Eli explains
  5. Worked example
  6. Key takeaway
  7. Quick check
  8. Study tools
  9. Sources & references

In 30 seconds

is the practice of reducing avoidable risk while a site is designed, built, operated, and used. It is not one feature and it cannot promise that nothing will go wrong. Basic habits include protecting accounts, giving people only the access they need, keeping components reviewed and updated, handling reports responsibly, and treating unexpected behavior as a reason to investigate. Good security combines people, process, and technical controls in layers.

Why this matters

A web application can handle personal information, course work, payments, or internal records, so small design choices can affect real people. Students who distinguish from can reason more clearly about account features. Students who recognize , multi-factor authentication, maintenance, and incident reporting can participate responsibly in a development team. These ideas also help users evaluate whether a request for credentials or access is appropriate without pretending that any one control is a complete guarantee.

The college version

Security is a continuing design responsibility

Web security is the work of reducing risk to an application's users, data, and operations. It is not a seal that makes a site invulnerable, nor is it a task that happens only after the interface is complete. Decisions about accounts, permissions, software components, data handling, monitoring, recovery, and team communication all contribute to a system's security posture. A useful starting question is: what should this part of the application be able to do, who should be allowed to do it, and what should happen when the expected conditions are not met? That framing keeps security connected to the application's purpose rather than treating it as a list of scary terms.

Controls work in layers. A strong account process does not remove the need for careful permission checks; a reviewed software update does not remove the need for incident reporting; a clear process does not remove the need for people to use it. The goal is to make harmful outcomes less likely and to make them easier to detect and handle when they occur. Teams should state their boundaries plainly. A student working on a course project can practice safe design and report concerns through the instructor or project owner. They should not probe services they do not own or have permission to test. This lesson focuses on defensive habits and decision-making, not on finding ways around controls.

Authentication answers who; authorization answers what is allowed

Authentication is the process of verifying that someone controls one or more authenticators associated with a digital identity. A password is one kind of : a secret intended to be chosen and remembered or recorded by the subscriber. After authentication, an application still has a different question to answer: is this authenticated identity allowed to perform this particular action on this particular resource? That second decision is authorization. OWASP illustrates the distinction with an ordinary user and an administrator: both may sign in successfully, but their permitted actions need not be the same.

Confusing these questions creates weak reasoning. A successful sign-in does not mean a user should be able to view every record, change every setting, or administer every account. Conversely, some public resources may be intentionally available without sign-in. Authorization therefore belongs wherever the protected action is requested, not only on a screen that happens to be hidden from a particular role. A defensible design begins by listing roles or other relevant attributes, the resources involved, and the operations each role truly needs. It then gives access deliberately rather than assuming access is normal. OWASP recommends a deny-by-default posture: when no permission rule supports a request, the application should deny it.

Least privilege is the companion principle: grant only the access required for the intended task and review access as roles or responsibilities change. It is easier to add a justified permission later than to discover that broad access has become routine. This is not a promise that every access decision will be correct. It is a design discipline that makes permissions visible, reviewable, and narrower by default.

Account protection needs more than one habit

Accounts deserve particular care because they connect a person or service to actions in an application. Passwords are secrets, not evidence of a person's real-world character. They should not be shared casually, reused without thought, or exposed in project files, messages, or screenshots. NIST's digital-identity guidance distinguishes authentication factors and explains that higher assurance can require proof of control of two distinct factors. This is the basic idea behind : a sign-in process asks for more than one independent kind of evidence. MFA adds a layer; it does not make every account risk disappear, so recovery, support, and notification processes still matter.

For developers, account protection also means designing interfaces and processes that do not encourage unsafe workarounds. Authentication and authorization must remain separate in the implementation and in discussion. Sensitive account changes merit deliberate review, and logs can help a team notice failures or unexpected activity. For users, a calm response to an unexpected sign-in prompt or account notice is safer than rushing: use known support channels, avoid disclosing credentials to an unverified requester, and report the concern through the service's documented path. Reporting is a defensive action, not a request to investigate another person's account.

No lesson can choose an organization's assurance level or recovery policy. Those decisions depend on the system's purpose, legal obligations, users, and risk assessment. The transferable principle is to use layered account controls, explain their limits honestly, and make it possible for users and staff to report concerns.

Maintenance and response are part of secure delivery

A web project often relies on third-party libraries and services. Those dependencies can save time, but their condition affects the application's security posture. OWASP's dependency guidance recommends that teams become aware of security issues in dependencies and apply an appropriate mitigation. When a patched version is available, the guidance describes updating in a testing environment and using tests to check that the affected feature still works before release. The important lesson is not to update blindly or to chase a tool output mechanically. It is to know what the application depends on, assess a reported issue in context, use the team's approved maintenance process, and validate the result.

Unexpected behavior needs a response path. First preserve useful context: what was observed, when, which account or environment was involved, and what normal behavior was expected. Avoid collecting or sharing unnecessary sensitive information. Next, notify the appropriate owner—such as a course instructor, project maintainer, security contact, or support channel—using a documented route. Do not try to prove a concern by accessing other users' data, bypassing controls, or running unapproved tests. The owner can decide whether to investigate, contain, notify, or update. This division of responsibility protects both the reporter and other users.

A practical web-security routine is therefore modest and repeatable: define required access, apply authentication and authorization controls appropriately, review dependencies and changes, observe abnormal behavior, and report it through the right channel. It improves resilience without claiming certainty or turning a beginner lesson into an offensive testing guide.

Eli, the EliExplains learning guide

Eli explains

The same idea, in plain words

Explain it like I’m 10

Web security is like looking after a clubhouse that has people, supplies, and different rooms. You do not protect it with one magic lock. You decide who may enter, which rooms each person needs, and how to notice a problem. A sign-in check asks, “Are you the account you say you are?” A permission check asks, “May that account use this room or tool?” Having both questions matters. Keeping the clubhouse's equipment in good condition and telling the right adult about a broken lock also help.

Picture it like this

Imagine a library. A library card helps identify a patron; it is like authentication. The rules about who may enter the staff office or alter the catalog are like authorization. Giving a volunteer only the key they need is least privilege. An extra check before a sensitive task is like MFA. Staff keep a repair list and report a damaged door instead of asking visitors to test it themselves.

Where the picture stops working

A web application is not a building: software permissions are evaluated by systems and can involve many resources and conditions. A library card is also not a complete model of an authenticator. The analogy only helps separate identity, permission, maintenance, and reporting; it does not replace a real security design or policy.

Worked example

A student team builds a course event site with two roles: attendee and coordinator. Both roles authenticate to use their accounts. The team writes down the actions each role needs: attendees can view events and edit their own RSVP, while coordinators can create an event and view the attendee list for events they manage. The team does not grant coordinator actions to attendees simply because both can sign in; that is authorization and least privilege. Before updating a scheduling library, the team reads the maintainer's notice, makes the approved update in a test environment, and runs its normal event-create and RSVP checks. Later, a student sees an unexpected account notice. They record the time and the message without sharing credentials, then report it through the course project's support contact rather than trying to inspect anyone else's account.

Key takeaway

Web security is ongoing risk reduction. Keep identity checks separate from permission checks, grant only justified access, use layered account protection, maintain dependencies thoughtfully, and report unexpected behavior through authorized channels.

Quick check

3 questions here, of 5 in this lesson’s practice set. Answers stay hidden until you check.

Question 1 of 3foundational

In a web application, what question does authentication primarily answer?

Choose an answer, then check it.
Question 2 of 3intermediate

A signed-in attendee tries to open a coordinator-only event dashboard. What control should determine whether the dashboard is available?

Choose an answer, then check it.
Question 3 of 3intermediate

Which access-control choice best reflects least privilege for a volunteer who only needs to update event descriptions?

Choose an answer, then check it.
Practice all 5

Keep learning

Ready to build on this? Continue to the next lesson.

Practice this lesson
Study tools & related lessonsYou’ll learn to · Common mistakes · Easily confused · Key vocabulary · Related

You’ll learn to

  • Define web security as ongoing risk reduction rather than a single product or promise.
  • Distinguish authentication from authorization in a web application.
  • Explain how multi-factor authentication and least privilege reduce different kinds of risk.
  • Apply a defensive response process to an unexpected account or application concern.
  • Identify why teams review dependencies and validate updates before release.

Common mistakes

  • Treating a successful sign-in as permission to do every action.

    Separate authentication from authorization and check the permission needed for the requested action.

  • Giving a role broad access because it may be convenient later.

    Start with the minimum justified access and add permissions through a reviewed decision.

  • Assuming MFA or any single control makes an account completely safe.

    Use layered controls and maintain reporting, recovery, and review processes.

  • Applying an update directly to production without validation.

    Follow the team's maintenance process, test the change in an appropriate environment, and verify relevant behavior.

  • Trying to investigate a suspicious account event by probing other users or systems.

    Preserve relevant context and report through the authorized owner or support channel.

Easily confused

Authentication vs. Authorization

Authentication verifies control of an authenticator tied to an identity; authorization decides whether that identity may perform a requested action.

Least privilege vs. Deny by default

Least privilege narrows granted access to what work requires; deny by default refuses access unless an explicit rule permits it.

Dependency update vs. Blind upgrade

A managed update is assessed and validated through the team's process; a blind upgrade changes software without understanding or checking its effect.

Key vocabulary

web security
The ongoing practice of reducing avoidable risk to a web application's users, data, and operations.
authentication
The process of verifying that a claimant controls an authenticator associated with a digital identity.
authorization
The decision about whether an identity is allowed to perform a requested action on a resource.
authenticator
A secret, device, or other mechanism used as evidence in an authentication process.
multi-factor authentication (MFA)
Authentication that requires proof of control of more than one distinct factor.
least privilege
The practice of granting only the access needed for an intended task.
deny by default
An access-control posture in which a request is refused unless a rule explicitly permits it.
dependency
A third-party library, component, or service that a project relies on.

Sources & references

  1. NIST Special Publication 800-63B: Authentication and Authenticator Management — National Institute of Standards and Technology
  2. Authentication Cheat Sheet — OWASP Cheat Sheet Series
  3. Authorization Cheat Sheet — OWASP Cheat Sheet Series
  4. Vulnerable Dependency Management Cheat Sheet — OWASP Cheat Sheet Series

EliExplains lessons are original prose written from the open, credible references above. See Copyright & Licensing.

Researched 2026-08-20

Educational content only. It is not medical, legal or professional advice. Found an error? Tell us.