Design secure defaults: reduce risk before users change settings
Secure defaults let people start using a product without first hunting for security options: unnecessary access and functions are restricted from the initial installation or first use. The goal is not to select the strictest value everywhere. Teams should consider real threats and user workflows so that essential work remains usable while the default state limits avoidable risk. This guide is for application developers deciding and verifying product settings.
Design secure defaults: reduce risk before users change settings
Secure defaults let people start using a product without first hunting for security options: unnecessary access and functions are restricted from the initial installation or first use. The goal is not to select the strictest value everywhere. Teams should consider real threats and user workflows so that essential work remains usable while the default state limits avoidable risk. This guide is for application developers deciding and verifying product settings.
These product and first-use defaults differ from operational procedures for comparing deployed servers with a hardening baseline. For that work, see the guide to reducing security misconfiguration with deployment baselines. This article focuses on the starting state users encounter: permissions, visibility, enabled features, and data handling.
Why do defaults matter?
Many users keep initial settings or accept the recommended option. Defaults can therefore become repeated security decisions in real environments. Broad access, unnecessary administration features, or public visibility can leave risk in place without the user noticing. But blocking every feature can disrupt work and encourage workarounds.
OWASP describes secure by default as starting in a secure state without extensive setup. NIST SSDF PW.9 calls for secure defaults for security-relevant settings, implementation in the software, and documentation for administrators. Neither provides one set of values for every product. Decide based on the feature’s risks and usability needs.
Which settings should be reviewed?
Include settings that affect permissions, resource visibility, data retention, external connections, network exposure, administration, or failure behavior, whether or not their names contain “security.”
| Area | Question | Common direction and caveat |
|---|---|---|
| Permissions and roles | What can a new user or resource do by default? | Grant only necessary access and deny actions that were not explicitly allowed. Also design safe initial administrator setup and recovery. |
| Visibility | Who can see a new document, project, or storage area? | Start sensitive resources with restricted visibility and explain the audience before making them public. A service built around public sharing may choose a different default, but should make its scope clear. |
| Optional features and integrations | Are unused administration tools, APIs, plugins, or file features enabled? | Disable features that are not needed or require an explicit setup choice. Explain support or compatibility effects. |
| Data handling | How do analytics, diagnostics, sharing, or retention begin? | Explain purpose and impact, and review actual need and service requirements. Do not generalize legal duties across jurisdictions. |
| Failure and exceptions | What happens when authorization, a policy service, or required configuration fails? | For sensitive actions, fail safely when checks cannot be completed while providing a recovery path. Denial is not necessarily appropriate for every public or read-only feature. |
| Installation and initial accounts | Are shared administrator passwords or sample accounts left in place? | Avoid shared default secrets. Use unique initial credentials or a safe enrollment process, and make account recovery hard to abuse. |
This table is a set of questions, not a universal prescription. A public document service may need public sharing as a core feature; that does not justify exposing an organization’s administration API to anonymous users. Explain each setting’s purpose instead of hiding unrelated choices under one “security level” switch.
How should a team choose and verify defaults?
1. Identify users and resources
List who installs, administers, and uses the product, plus its resources and operations. Distinguish regular users, organization administrators, automation identities, and anonymous visitors. Separate reading, creating, changing, deleting, and sharing. Login status alone does not define all permissions: authenticated users do not need every resource, while some content such as a login page may be public.
2. Describe a concrete risk in the initial state
Instead of asking only “Is this default safe?”, state what an attacker or mistaken user could do before customization. If a new team space is visible to “anyone with the link,” ask whether a forwarded invitation lets a nonmember read sensitive material. If invitations are entirely disabled, an administrator may be unable to start collaboration. Record both the risk reduced and the work that must remain possible.
3. Document defaults, alternatives, and operational effects
For each setting, document its default, other choices, scope, security effect, operational or compatibility impact, and relationships to other settings. If administrators can change it, consider required privileges and change records. Explain who can do what and which resources are affected; do not make a risky choice look recommended through its label or preselection.
4. Start permissions with explicit grants and least privilege
The OWASP Authorization Cheat Sheet recommends denying access by default when no allow rule matches and explicitly configuring the intended behavior instead of assuming a library’s defaults. Set permissions when adding features or resources. “Deny by default” does not mean making every service unavailable: mark public resources explicitly and check authorization consistently for protected resources and actions.
5. Test normal, failure, and recovery paths
Test fresh installation, upgrade, new users, reset settings, policy-service timeouts, and missing or invalid values. Check that unauthorized requests are denied, new resources have the intended visibility, and failures do not silently turn into allow decisions. Also verify that legitimate administration and recovery work and do not lock users out. A security option working is not proof that the whole product is secure.
Hypothetical example: suppose new projects default to organization-only sharing. Check that a project does not open through an anonymous link, members can read and edit the files they need, and an administrator who explicitly enables external sharing can see its audience and impact. This is an illustrative scenario, not a claim about a real service or test.
6. Plan safe changes and recovery
Stricter defaults may unexpectedly block existing users or break an upgrade. Decide whether new and existing installations receive the same migration, whether earlier values are preserved, and how risky configurations will be identified and changed gradually. If a security change causes an outage, use an approved recovery path; record the owner, expiry, and impact of any temporary exception, then verify that the system returned to a safe state.
What trade-offs should be considered?
A more restrictive value does not always produce a better outcome. If security friction makes essential work too difficult, people may disable controls or use informal sharing channels. Conversely, exposing every resource or granting broad administrator rights for convenience can magnify a breach. Use risk and usability review to choose the narrowest workable permission and scope, and make exceptions easy to find and reverse.
Products with different organizational policies can separate safe initial values from administrator-selectable policies. Explain the risk and impact of each option; do not present a lower-security choice as the recommended default without warning. The fact that a setting can be changed does not show that users understood or accepted its risks.
How can a team tell the design is ready?
Security-relevant settings should be inventoried; each default should have a purpose and rationale; permission, visibility, and failure behavior should be tested in normal and error conditions; and installation, upgrade, and recovery paths should be safe. Confirm that setting descriptions and authorized roles are clear, unauthorized changes are blocked, and important changes can be reviewed. Revisit defaults and tests when the threat model or platform changes.
Secure defaults do not eliminate every vulnerability or replace deployment and operations checks. The goal is to prevent unnecessary exposure and privilege when users take no action, while making needed exceptions understandable and reviewable.
References
OWASP Developer Guide, Secure by Default — a secure starting state and project-specific risk and usability review.
NIST SP 800-218, Secure Software Development Framework (SSDF) Version 1.1 — PW.9 on secure settings by default, implementation, and administrator documentation.
OWASP Authorization Cheat Sheet — deny by default, permission checks on every request, and least privilege.
OWASP Secure Product Design Cheat Sheet — secure defaults, least privilege, and secure failure behavior.