Authentication and Permission Sanity Testing for Websites

Authentication and permission sanity testing answers two fundamental questions:

Can the right user get in?

and:

Can that user access only what they are supposed to access?

These questions cover two related but different areas.

Authentication verifies identity.

It answers:

Who is this user?

Examples include:

  • login;
  • logout;
  • password reset;
  • session handling.

Authorization determines what an authenticated user is allowed to do.

It answers:

What can this user access or change?

Examples include:

  • viewing a page;
  • editing a record;
  • deleting data;
  • accessing billing;
  • managing users;
  • opening administrative tools.

A website can have perfectly functioning login and still contain serious permission defects.

For example:

A Viewer cannot see the Edit button, but can still open the edit URL directly.

That is primarily an authorization failure.

Authentication and permission sanity testing gives ordinary QA teams a practical way to detect obvious, high-impact access-control defects before release.

It does not replace penetration testing.

For a broader security-oriented QA baseline, see Website Security QA Checklist.

Authentication vs Authorization

These terms are often confused.

Authentication

Authentication verifies identity.

Example:

Is this really the user associated with john@example.com?

Authorization

Authorization verifies access.

Example:

Is this authenticated user allowed to edit customer records?

The distinction matters because a user can authenticate successfully and still receive the wrong permissions.

A complete sanity pass should test both:

Authentication → Identity

and:

Authorization → Access

What Does “Sanity Testing” Mean Here?

Sanity testing is intentionally narrower than a full security assessment.

It focuses on obvious, high-value checks that normal QA teams can perform safely within the approved test environment.

Examples include:

  • protected pages require login;
  • logout removes access;
  • lower roles cannot perform restricted actions;
  • direct URLs do not bypass permissions;
  • one user cannot access another user’s private data;
  • one tenant cannot access another tenant’s records.

These checks can reveal serious problems without using advanced exploitation techniques.

Sanity Testing Is Not Penetration Testing

QA should not conclude:

The website is secure.

after completing these checks.

A specialist penetration test may examine:

  • vulnerability classes;
  • APIs;
  • infrastructure;
  • attack paths;
  • security configuration;
  • exploitability.

Authentication and permission sanity testing has a more practical objective:

Find obvious identity and access-control failures before release.

For the distinction, see Security Testing vs Penetration Testing.

Start With the Access Model

Before testing permissions, define what each user type should be allowed to do.

A simple matrix might look like this:

ActionAdminManagerViewer
View ContactsYesYesYes
Create ContactYesYesNo
Edit ContactYesYesNo
Delete ContactYesNoNo
Manage UsersYesNoNo
BillingYesNoNo

This gives QA objective expected behavior.

Without a defined access model, permission testing easily turns into guessing.

Do not assume:

Viewer probably cannot edit.

or:

Manager probably cannot access billing.

Role names do not guarantee specific permissions.

Test against actual product rules.

Identify High-Risk Protected Areas

Create a short inventory of important authenticated areas.

Examples:

  • dashboard;
  • account settings;
  • customer records;
  • billing;
  • reports;
  • admin panel;
  • downloads;
  • user management.

Then identify which roles should access each one.

You do not need every page in the application for a sanity pass.

Prioritize:

  • sensitive data;
  • destructive actions;
  • administrative functionality;
  • billing;
  • cross-user or cross-tenant boundaries.

Authentication Sanity Checks

Authentication sanity testing should verify the core identity flow without recreating a full login QA guide.

Valid Login

Start with:

Valid Account + Valid Password → Successful Login

Verify:

  • user is authenticated;
  • expected landing page loads;
  • correct account is shown;
  • correct role is applied.

A successful redirect alone is not enough.

The session should belong to the correct user.

Invalid Login

Test at least one invalid scenario.

Example:

Valid Email + Invalid Password

Expected:

  • login rejected;
  • user remains logged out;
  • understandable error displayed.

Also verify that an unknown user does not receive access.

Password Reset Sanity

If password reset is part of the product, include a simple end-to-end sanity check:

Request Reset → Receive Reset Link → Set New Password → Login With New Password

The deeper functional coverage belongs in How to Test Login, Signup and Password Reset Flows.

Correct Role After Login

Authentication and authorization meet immediately after login.

For example:

Viewer Login → Viewer Permissions

not:

Viewer Login → Admin Permissions

Confirm that the user receives the expected authorization context.

Logout and Session Sanity

Logout should do more than change the visible navigation.

After logout:

  • user should be treated as unauthenticated;
  • protected pages should be denied;
  • protected actions should stop working.

Test Direct URL Access After Logout

This is one of the highest-value sanity checks.

Example:

  1. Log in.
  2. Open /account/settings/.
  3. Copy the URL.
  4. Log out.
  5. Open /account/settings/ again.

Expected behavior may be:

  • redirect to login;
  • access-denied screen;
  • 401/403 response.

What should not happen:

The protected account page remains fully usable.

Browser Back After Logout

After logout, use the browser Back button.

A previously loaded page may appear from cache.

That alone does not necessarily prove the session still exists.

Try:

  • refresh;
  • opening another protected page;
  • performing a protected action.

The application should still enforce authentication.

Session Expiration

If sessions expire, verify the user is handled predictably.

For example:

Session Expires → User Attempts Protected Action

Expected behavior might be:

  • redirect to login;
  • reauthentication request;
  • clear session-expired message.

The application should not falsely report a successful protected action after the session is no longer valid.

For deeper session coverage, see Cookie and Session Security Checks for Web Applications.

Test Protected Routes While Logged Out

Create a small list of important routes, for example:

/dashboard/

/account/

/billing/

/admin/

Open each one without authentication.

Protected routes should enforce the intended access rule.

Do not test only whether the navigation hides the link.

A hidden menu item is not access control.

Hidden UI Is Not Permission Enforcement

Suppose a Viewer does not see:

Edit Contact

That is appropriate UI behavior.

But QA should also verify that the underlying edit route is protected.

For example:

/contacts/123/edit

should not become accessible simply because the user knows or guesses the URL.

Likewise:

  • hidden Delete button;
  • hidden Billing menu;
  • hidden Admin menu;

do not prove authorization is enforced.

The application itself must reject unauthorized access.

Permission Sanity Testing

A sanity pass should test representative allowed and denied actions.

You do not need to exhaust every possible permission combination.

The objective is to verify the access model works at the most important boundaries.

Positive Permission Tests

Verify authorized users can perform actions they are supposed to perform.

Example:

Manager → Edit Contact → Save → Success

Permission testing is not only about blocking access.

A fix that blocks legitimate users is also defective.

Negative Permission Tests

Then test the same important action with a restricted role.

Example:

Viewer → Edit Contact → Denied

Test both:

Allowed user succeeds

and:

Restricted user fails

Use a Representative Permission Matrix

Instead of testing every feature independently, use representative high-value actions.

For example:

AreaAdminManagerViewer
View RecordsAllowAllowAllow
CreateAllowAllowDeny
EditAllowAllowDeny
DeleteAllowDenyDeny
ExportAllowAllowDeny
Manage UsersAllowDenyDeny
BillingAllowDenyDeny

Then test:

  • visible UI;
  • direct route;
  • actual server-side action.

This gives broad sanity coverage without turning the article into a full RBAC test specification.

For deeper role and permission testing, see Role and Permission Testing for SaaS Applications.

Test High-Risk Actions

Some permissions deserve more attention because the impact is greater.

Prioritize:

  • delete;
  • bulk delete;
  • export;
  • import;
  • billing;
  • user management;
  • role changes;
  • administrative settings.

A permission defect around Export may expose many records at once.

A permission defect around user management may allow privilege escalation inside the application.

A hidden button is still not enough.

Test whether the actual action is protected.

Test Across Multiple Entry Points

The same action may be reachable from:

  • list page;
  • detail page;
  • modal;
  • dashboard shortcut;
  • bulk action;
  • direct URL.

Permissions should remain consistent.

Example:

A Viewer may correctly be blocked from Edit on the detail page but accidentally gain Edit access through a modal launched from the list.

Sanity testing should include at least the major alternate route where the action is business-critical.

Resource Ownership Testing

Role testing alone is not enough.

Two users may have the same role while still being allowed to access only their own data.

Example:

User A owns Order 123

Test whether User B can open:

/orders/123

If ownership rules require isolation, expected result is:

Denied

This is a different type of boundary from role-based permissions.

The user may have permission to view orders generally but not someone else’s order.

Test Own Resource vs Other User’s Resource

A simple pattern is:

User A → Own Record → Allowed

User A → User B Record → Denied

Apply this to high-value resources such as:

  • orders;
  • reports;
  • invoices;
  • private files;
  • customer records;
  • projects.

Do not assume that hiding another user’s records from search is sufficient.

Test direct access as well.

Multi-Tenant Isolation

For SaaS applications, tenant isolation is one of the most important sanity checks.

Example:

Tenant A User → Tenant A Record = Allowed

Tenant A User → Tenant B Record = Denied

Test representative resources such as:

  • contacts;
  • reports;
  • invoices;
  • projects;
  • downloads.

A user may have perfectly correct role permissions inside their own organization while still being able to access another organization’s data.

That is why:

role authorization

and:

tenant isolation

should be treated as separate checks.

Search, Reports and Exports

Unauthorized records may be correctly hidden from a normal list but still appear through:

  • search;
  • reports;
  • exports;
  • autocomplete;
  • dashboards.

For sensitive applications, test at least one alternate data surface.

Example:

Viewer cannot open private customer records directly, but Export All includes them.

That is still an authorization defect.

Protected Downloads

A protected page can link to an unprotected file.

For example:

  1. Authorized user opens a private document.
  2. Copy the direct file URL.
  3. Log out or use an incognito window.
  4. Open the URL.

Expected behavior depends on the product.

If the file is supposed to be private, direct unauthenticated access should not bypass the intended restriction.

For broader file testing, see How to Test WordPress Forms, Media and Downloads.

State Changes and Access Revocation

Authorization should remain correct when user state changes.

These transitions often expose stale permission or session problems.

Role Change

Example:

Manager → Viewer

After the change, verify:

  • old permissions disappear;
  • Viewer permissions apply;
  • navigation updates;
  • direct routes are reevaluated.

Do not assume the permission change works merely because the profile displays the new role.

Deactivated Account

Deactivate a user.

Verify:

  • new login is blocked;
  • existing access follows the defined security policy.

If the product expects immediate revocation, the user should not remain indefinitely active through an old session.

Password Change

Depending on the product’s policy, changing a password may:

  • preserve current sessions;
  • invalidate other sessions;
  • require reauthentication.

QA should verify the defined behavior rather than assume one universal rule.

Subscription-Based Access Changes

Some SaaS permissions depend on the current subscription.

Example:

Professional → Starter

Verify premium features are removed according to the product’s intended timing.

Billing state and authorization should remain synchronized.

For broader coverage, see Subscription and Billing QA for SaaS Products.

Sanity Check the Server-Side Boundary

The UI is only one layer.

Where normal QA access permits it, verify that protected actions remain denied even when reached through their normal direct application route.

For example:

  • direct edit URL;
  • direct billing page;
  • direct download URL;
  • direct report URL.

The objective is not to exploit the application.

It is simply to verify:

Does the application still enforce the documented permission when the UI is bypassed?

Stay Within the Approved QA Scope

Authentication and permission testing can touch security-sensitive areas.

Use:

  • approved accounts;
  • approved test environments;
  • known routes;
  • normal application workflows.

Do not attempt destructive or unauthorized exploitation.

The goal is functional access-control verification, not offensive security testing.

Report Access-Control Defects Precisely

Avoid:

Permissions broken.

Instead document:

  • user role;
  • account or tenant;
  • resource;
  • route/action;
  • expected access;
  • actual access.

Example:

Title: Viewer can edit contacts through direct URL

Role: Viewer

Route: /contacts/123/edit

Expected Result:
Viewer should be denied access to contact editing.

Actual Result:
The edit page loads and changes can be saved successfully.

This is much easier to understand and retest.

For broader defect structure, see Expected Result vs Actual Result.

Example: Logged-Out Protected Route Bug

Expected Result:
Logged-out users opening /billing/ should be redirected to login.

Actual Result:
The billing page loads and displays subscription details.

Example: Cross-User Access Bug

Expected Result:
User A should only access orders belonging to User A.

Actual Result:
Changing the order ID allows User A to open User B’s order.

Example: Tenant Isolation Bug

Expected Result:
Tenant A users should not access Tenant B reports.

Actual Result:
A Tenant A Manager can open a Tenant B report using the direct report URL.

Example: Positive Permission Regression

Expected Result:
Manager should be allowed to edit contacts.

Actual Result:
After a permission fix for Viewers, Managers now receive Access Denied when opening Edit Contact.

This illustrates why permission fixes need both negative and positive retesting.

Prioritize Access-Control Defects by Impact

Potentially serious defects include:

  • logged-out access to private data;
  • normal users gaining admin capabilities;
  • unauthorized billing changes;
  • unauthorized deletion;
  • cross-user data exposure;
  • cross-tenant data exposure.

These may deserve high release priority.

For defect classification, see Bug Severity vs Priority.

For release-blocking decisions, see Which Bugs Should Block a Website Release?.

Retest Permission Fixes in Both Directions

When development fixes a permission issue, verify:

Unauthorized case → now denied

and:

Authorized case → still allowed

Example:

Viewer should be blocked.

Manager should still be allowed.

A fix that simply blocks everyone is not correct.

Run Related Regression

Authorization logic is often shared.

If a fix affects:

Edit Contact

also consider checking:

  • View;
  • Create;
  • Delete;
  • Bulk Edit;
  • Export;

according to risk.

Likewise, if tenant isolation logic changes, test more than one representative resource type.

Add Important Access Bugs to Regression

If a production issue previously allowed:

  • cross-tenant data access;
  • unauthorized export;
  • stale access after role change;

add that scenario to future regression where practical.

Security-related production defects are especially valuable regression candidates.

Use Risk-Based Coverage

You do not need to retest every permission combination after every minor UI change.

Increase coverage after changes to:

  • authentication;
  • sessions;
  • roles;
  • permissions;
  • subscriptions;
  • tenant logic;
  • user management.

Prioritize:

changed code + business impact + historical defects

For the broader approach, see Risk-Based Testing.

Production Authentication Smoke Test

After an authentication-related deployment, a small controlled production check can provide valuable confidence.

A practical smoke test might be:

Login → Protected Page → Logout → Protected Page Denied

For a role-based application:

Representative Role → Critical Allowed Action

If tenant isolation changed, consider one safe representative tenant boundary test.

Avoid unnecessary modification of real production data.

For the broader process, see How to Verify a Website Deployment After Release.

Production Configuration Differences

Authentication behavior can differ between staging and production because of:

  • domain;
  • HTTPS;
  • cookies;
  • OAuth callback URLs;
  • session configuration.

If the application uses external login, verify the production redirect configuration.

Likewise, ensure production session behavior matches expectations.

Include Authentication Sanity in Release Readiness

Before release, ask:

  • Does valid login work?
  • Does invalid login fail safely?
  • Does logout remove protected access?
  • Are important protected pages actually protected?
  • Can representative roles perform allowed actions?
  • Are representative restricted actions denied?
  • Are important ownership boundaries intact?
  • Is tenant isolation intact where applicable?

These provide a compact but valuable release baseline.

For formal approval, see Release Sign-Off: What Should Be Approved Before Deployment?.

Authentication and Permission Sanity Checklist

Authentication

  • Valid login works.
  • Invalid login is rejected.
  • Correct account loads.
  • Correct role is assigned.
  • Password reset sanity path works where applicable.

Logout and Session

  • Logout works.
  • Protected route is denied after logout.
  • Browser Back does not restore usable authenticated access.
  • Session expiration is handled correctly.
  • Protected actions fail after authentication expires.

Protected Routes

  • Important logged-out routes are denied.
  • Admin areas are protected.
  • Billing pages are protected.
  • Sensitive downloads follow intended access rules.

Permissions

  • Authorized role can perform critical allowed action.
  • Restricted role cannot perform that action.
  • Direct route does not bypass permission.
  • High-impact destructive actions are protected.
  • Export/import permissions are correct where relevant.

Ownership

  • User can access own authorized resources.
  • User cannot access another user’s restricted resource.
  • Direct resource IDs do not bypass ownership rules.

Multi-Tenant

  • Tenant A user can access Tenant A data.
  • Tenant A user cannot access Tenant B data.
  • Search/report/export boundaries remain isolated.

State Changes

  • Role changes take effect correctly.
  • Deactivated accounts follow intended access policy.
  • Subscription changes update entitlements correctly.
  • Stale sessions do not preserve inappropriate access.

Regression

  • Original unauthorized case retested.
  • Authorized case still works.
  • Related shared permissions checked.
  • High-impact historical defects covered where appropriate.

Common Mistakes

Testing Only Login

A successful login says almost nothing about authorization.

Test what happens after authentication.

Testing Only Administrator

Administrators often have access to everything.

Permission defects commonly appear in restricted roles.

Test lower roles deliberately.

Trusting Hidden Buttons

A hidden Edit button is not authorization.

Test the protected action itself.

Testing Only the UI

Important permissions should be enforced by the application, not merely the visible interface.

Testing Only Negative Permissions

Do not forget that valid users must still be allowed.

Permission testing needs both:

Allow

and:

Deny

cases.

Ignoring Ownership

Two users can have the same role but different data ownership.

Test own vs other-user resources.

Ignoring Tenant Isolation

Correct role permissions do not guarantee correct organization isolation.

Test the tenant boundary separately.

Ignoring Search and Export

Sensitive data may be hidden from detail pages but still leak through:

  • search;
  • reports;
  • exports.

Assuming Logout Ends Everything

Verify protected actions after logout.

Do not rely only on the menu changing.

Overstating QA Results

Authentication sanity testing can reveal important defects.

It does not prove the entire application is secure.

Keep the scope clear.

A Practical Authentication and Permission Sanity Workflow

Step 1 — Define Roles and Access Rules

Identify expected access.

Step 2 — Select High-Risk Protected Areas

Prioritize sensitive pages and actions.

Step 3 — Test Authentication

Verify valid and invalid login plus the basic password-reset path where relevant.

Step 4 — Test Logout and Sessions

Confirm protected access disappears when authentication is no longer valid.

Step 5 — Test Protected Routes

Try important URLs while logged out.

Step 6 — Test Representative Permissions

Run one or more critical Allow/Deny scenarios per important role.

Step 7 — Test Direct Access

Verify hidden controls cannot be bypassed through normal direct routes.

Step 8 — Test Ownership Boundaries

Own resource vs another user’s resource.

Step 9 — Test Tenant Isolation

Where the application is multi-tenant.

Step 10 — Test State Changes

Role, account and subscription changes.

Step 11 — Retest and Regress

Verify both restricted and authorized cases after fixes.

Step 12 — Run a Safe Production Smoke Test

For important authentication-related releases.

Combine Sanity Testing With Deeper QA Guides

Authentication and permission sanity testing should remain a compact baseline.

Use deeper focused testing when the risk requires it.

For full login workflows:

How to Test Login, Signup and Password Reset Flows

For sessions:

Cookie and Session Security Checks for Web Applications

For detailed authorization:

Role and Permission Testing for SaaS Applications

For broader security sanity checks:

Website Security QA Checklist

This keeps each article’s search intent clear while still giving QA teams a complete path to deeper coverage.

Build Access Sanity Checks Into Regression

A lightweight recurring regression suite might include:

Valid Login

Invalid Login

Logout

Protected URL Logged Out

Viewer Cannot Edit

Manager Can Edit

Cross-User Resource Denied

Cross-Tenant Resource Denied

A small number of carefully selected checks can protect critical access boundaries across many releases.

Final Thoughts

Authentication and permission sanity testing should answer two simple questions:

Can the right user get in?

and:

Can that user access only what they are supposed to access?

Start with the authentication baseline:

  • valid login;
  • invalid login;
  • logout;
  • password-reset sanity;
  • session enforcement.

Then test the authorization baseline:

  • protected routes;
  • representative role permissions;
  • direct access;
  • sensitive actions;
  • resource ownership;
  • tenant isolation.

Do not rely only on what the UI shows.

A hidden button is not permission enforcement.

A hidden menu item is not permission enforcement.

The application itself should deny unauthorized access.

At the same time, do not test only denial.

Legitimate users must retain the access they actually need.

And keep the scope clear:

This is practical security-oriented QA sanity testing, not a substitute for penetration testing.

The objective is straightforward:

Authenticated users should receive exactly the access their identity, role, ownership, tenant and subscription state require — no more and no less.

That is the foundation of reliable authentication and permission sanity testing for modern websites and web applications.

Similar Posts