Security foundations Fail open vs. fail closed 2 min read

Fail open vs. fail closed

Someone opens a link to a private invoice. The file is available, but the permission check times out. Should the app return the file?

  1. The app has no access decision

    The timeout tells the app it couldn’t complete the check. In this example, failing open would send the invoice anyway. Failing closed would withhold it and report that access could not be verified.

    When the permission check times out, fail open sends the invoice and fail closed withholds it. Permission check times outFail openSends the invoiceFail closedWithholds the invoice

    In short Treat an unavailable check as its own outcome.

  2. Withhold the file and explain the problem

    The invoice service chooses to fail closed. It returns a temporary error and allows the reader to retry later. The error explains the interruption without suggesting that the person’s permission was removed.

    In short Keep the protected action blocked until you can verify access.

Where this example stops

Failing closed can interrupt legitimate work during an outage. Design a retry path or a limited mode that leaves the protected action blocked.

Keep this

Decide what happens when the check cannot finish.

Test the timeout path and confirm the protected file stays private.

Sources

Last reviewed 21 November 2026.

Next byte · Security foundations What is defense in depth?