Protective Programming

  1. Authentication and Authorization in One Request

    Authentication establishes an account or other principal. Authorization decides which operations that principal can perform on the identified resource.

    Undergraduate
  2. Defaulting to No Permission

    A permission policy can require an explicit reason to allow an action. Unrecognized actions and unsupported states then have a predictable default outcome.

    Undergraduate
  3. Checking Permission for the Selected Resource

    Permission to perform an action depends on the actual resource and the requester, along with the policy's relevant context.

    Undergraduate
  4. Roles and Ownership in a Permission Rule

    Roles can grant broad capabilities. Resource ownership or membership can refine which objects those capabilities apply to.

    Undergraduate
  5. Modeling Public and Private Records

    A record's visibility is a property of the application and should guide lists, direct reads, and related navigation under the same policy.

    Undergraduate
  6. Least Privilege for a Background Job

    A component can receive the operations and data it needs for a defined task, keeping unrelated capabilities outside its normal role.

    Undergraduate
  7. Public Errors and Internal Diagnostics

    A public response should explain the relevant outcome and how to proceed. Internal diagnostics can record technical context appropriate to designated readers.

    Undergraduate
  8. Input Validation and Output Encoding

    Validation checks that input fits its allowed domain. Output encoding represents data safely and correctly within a particular output grammar.

    Undergraduate
  9. Sending Only the Data a Component Needs

    A narrow interface can pass the fields needed for a feature without copying unrelated personal data or internal state.

    Undergraduate
  10. Designing Privacy-Aware Event Logs

    An event log should contain enough information to understand an operation while avoiding unnecessary sensitive values.

    Undergraduate
  11. Secret Values and Ordinary Configuration

    A process can receive settings that select behavior and secrets that grant capabilities. These data need different storage and display rules.

    Undergraduate
  12. Separating Development and Production Data

    Development and test environments can use isolated configuration and synthetic data so experiments do not alter live state or disclose real records.

    Undergraduate
  13. Password Verification Without Storing Password Text

    A password verifier should store an appropriate salted, costed verification value under a maintained implementation and current guidance.

    Undergraduate
  14. Lifetime and Single Use for a Recovery Grant

    Account recovery grants should follow a deliberate expiration and consumption policy so the granted action remains limited in scope and time.

    Undergraduate
  15. Keeping Private Content Out of Shared Reuse

    Private views may depend on session identity and permissions. Their cache policy must reflect who is allowed to receive the underlying representation.

    Undergraduate
  16. Public Reads and Authenticated State Changes

    A public representation can be readable while editing it requires a separate protected operation with its own method and permission rule.

    Undergraduate
  17. Trust Boundaries in a Data Flow

    A trust boundary marks where information or authority moves between components with different assumptions about what can be relied on.

    Undergraduate
  18. Reviewing Dependency Changes for a Release

    A dependency update can change both direct and transitive components. Review the resolved versions and the interfaces used by the application.

    Undergraduate
  19. A Checksum and the Authority of Its Expected Value

    An integrity comparison checks bytes against a known digest. The trustworthiness of that expected digest depends on where it came from.

    Undergraduate
  20. Protecting a Public Operation with Resource Budgets

    A public operation can define limits for input size, concurrent work, or execution time to preserve a predictable service.

    Undergraduate
  21. Separating an Error Report from an Audit Event

    An operational error helps maintainers understand a failed request. An audit event records a relevant action and outcome according to an accountability policy.

    Undergraduate
  22. Using a Decision Table to Review Permission Rules

    A decision table turns a small access policy into explicit cases that reviewers and tests can compare.

    Undergraduate
  23. Explicit Configuration for Shared Service Access

    A component should receive a defined service identity and narrow operational role under an explicit environment configuration.

    Undergraduate
  24. Checking a Backup by Restoring a Representative Copy

    A backup is useful when its data can be recovered under the intended version and storage conditions. A restore test exercises that promise.

    Undergraduate
  25. Applying a Visibility Rule to Exported Data

    An export can expose more fields or records than a page displays if its access policy and field selection are not explicit.

    Undergraduate
  26. Reviewing an Upload Feature for Defensive Behavior

    An upload feature can check size, structural compatibility, visibility, and storage outcome across its normal workflow.

    Undergraduate
  27. How Long an Identity Decision Should Be Used

    An authentication result establishes a requester within a defined lifetime. A later request can require a current identity or permission decision under policy.

    Undergraduate
  28. Verifying That a Rejected Update Leaves State Intact

    A defensive test should inspect relevant persisted state after a request is rejected. A failure response alone cannot establish that no update occurred.

    Undergraduate
  29. Giving Useful Feedback at a Protective Limit

    A rejected operation can explain which input must change without including unnecessary implementation or personal details.

    Undergraduate
  30. Reviewing Where a Feature's Data Goes

    A feature's data lifecycle covers collection, storage, sharing, and removal. Reviewing it can reveal where access and retention assumptions need documentation.

    Undergraduate