Information & AI guides →

Information & AI · Security

Security basics: verify identity and limit permission

Edited by: Hitoiki Arcade / Hitoiki Learning team · Published: · References and presentation updated: · Editorial policy

Being able to sign in is different from being allowed to read every file. Replace the single label secure with more specific questions: whose identity is verified, which actions are permitted, and how far a failure could spread. Each question requires different evidence.

This guide starts with credentials and access permissions. One defense does not prevent every possible attack. Understand the available mechanisms, the scope required for your work and the paths used to recover access.

Authorization still matters after authentication

Authentication verifies identity; authorization decides what that identity may do. A signed-in member of a shared workspace does not necessarily have permission to change administrative settings or read another person's records. Explain who the user is separately from which actions are allowed.

Consider whether a read-only task also needs permission to edit or delete. Least privilege limits access to what the task requires. Hiding a button is not a complete access-control decision: the system that actually handles a request must enforce the applicable permission.

Try a quiz on Security

Each section link opens a quiz on related topics. Questions may cover more than that section, so check the range and difficulty before starting.

Identify how one breach can spread

Credential stuffing tests username/password pairs stolen from one service against another. Reusing the same credentials creates an opportunity for a breach in one place to affect other accounts. Separate companies can still be attacked with the same pair if that pair remains valid.

A password manager can help generate and store different long passwords for different services. Its own protection and recovery arrangements also matter. Compare the convenience of reusing one memorable credential with the wider exposure that reuse creates after a breach.

Combine different factors rather than repeated questions

Multifactor authentication combines distinct categories such as knowledge, possession and an inherent personal characteristic. A password and a possessed authenticator use different categories; a password and a PIN are both knowledge. Two screens or two questions do not automatically constitute two different factors.

Additional factors also need recovery paths when unavailable. Recovery codes and factor changes should not be treated as unrelated to account protection. Rather than using MFA as a universal seal of safety, identify the factors checked and the ways they can be reset.

MFA means Multifactor Authentication, OTP means One-Time Password and TOTP means Time-based One-Time Password. Single-use conditions, time-varying codes and combining distinct factors describe different properties. No one abbreviation establishes the safety of an entire authentication design, including recovery.

Protect authentication values in storage and transmission

A session ID associates later requests with a signed-in state, so it needs protection even if it contains no password text. Secure mainly controls HTTPS cookie transmission; HttpOnly restricts script access. Neither is the same as encrypting stored contents or eliminating XSS. Identify which value and exposure path each setting addresses.

Password verification storage uses password-specific hashing rather than recovery by decryption. Distinct per-user salts prevent identical passwords from sharing a hash and reduce the efficiency of reusing one candidate calculation across accounts. A salt is not a secret decryption key. An unreadable representation and resistance to attacks after stored hashes leak are separate concerns.

Choose a defense for the place where data is interpreted

Use a text-handling path such as textContent to display input as ordinary text in a div. Input containing <b> should not silently become an HTML instruction. SQL search values likewise belong in parameters supplied separately from the predefined command structure. Both cases preserve a boundary between data and unintended commands.

SQL column and table names are structural identifiers, not search values. Map a permitted user choice such as “price order” to an application-approved price column. Ordinary value parameters do not select arbitrary structure. Hiding a UI control is also not authorization: the server receiving each request must still check permission. Match the control to the actual interpretation or enforcement point.

An API, or Application Programming Interface, provides a software-access contract. XSS (Cross-Site Scripting) involves untrusted content becoming executable code; CSRF (Cross-Site Request Forgery) induces unwanted requests through an authenticated browser; SSRF (Server-Side Request Forgery) abuses server request capabilities. Compare the interpretation point and request origin to locate the relevant protection.

Keep query structure and values apart

Keep query structure and values apartA predefined query contains a parameter slot. A separate search value points only to that slot, not to the query structure.Predefinedquery structureparameterSearch valueNumber or textSeparate from structure
The value has a designated destination. Selecting a column or table name is a separate task from supplying an ordinary value parameter.

TRY & READ

Check your understanding with examples

Compare the choices before opening the answer and explanation. Reading an example does not save a test answer or score.

Example 1 · Security

After establishing a user's identity, what decides whether that user may read a file?

  1. Authorization
  2. Auditing
  3. Encryption
  4. Authentication
Read the answer and explanation

Answer: Authorization

Authentication establishes who the user is; authorization decides what that identity may do. A successful login does not imply permission to read another person’s files or administrative settings. This question asks whether the identified person may read a particular file, so it concerns authorization.

Read reasoning and more detail

Check identity separately from the permitted action and the resource to which that permission applies.

Sources for this example

Example 2 · Security

Which habit increases risk when credentials stolen from one service are tried on another?

  1. Reusing a password across services
  2. Using different strong passwords per service
  3. Removing unnecessary accounts
  4. Adding two-factor authentication
Read the answer and explanation

Answer: Reusing a password across services

Credential stuffing tries stolen username/password pairs against other services. Reusing a pair makes it possible for a breach at one service to expose an account elsewhere, without requiring the attacker to guess a new password. The attack exploits already obtained combinations.

Read reasoning and more detail

Distinct credentials for different services reduce this path of cross-service exposure rather than making separate companies safe merely because they are separate.

Sources for this example

Example 3 · Security

What is the main purpose of combining a password with verification using an authenticator the user possesses?

  1. Strengthen authentication with distinct factor types
  2. Ask for the same knowledge factor twice
  3. Use two encryption keys
  4. Merge identity verification with access authorization
Read the answer and explanation

Answer: Strengthen authentication with distinct factor types

Multifactor authentication combines distinct categories, such as something known and something possessed. A password is knowledge; checking an authenticator held by the user supplies a possession factor. Asking for the same password twice only repeats the knowledge check.

Read reasoning and more detail

Count the different kinds of evidence being verified rather than the number of screens or questions, and remember that the wider authentication design still matters.

Sources for this example

Sources for this guide

Continue with a quiz

Topics: Security. Range: Everyday knowledge, Broader knowledge, General knowledge. Difficulty: Basic, Standard. These are selected initially. You can change these on the setup screen.

Try this topic in a quiz

This opens the setup screen with this subject and topic selected. Check the mode and question count before you start.

A test shows explanations after submission. Continuous challenge explains each answer. Review uses unresolved mistakes recorded on this device. Casual mode does not update learning records.

Enjoyed it? Share the link

Only the page address is shared. Your saves and results are not included.

Link to this page