Skip to content

Commit

Permalink
category renames based on OWASP#802
Browse files Browse the repository at this point in the history
  • Loading branch information
Elar Lang committed Apr 11, 2021
1 parent 8d63bfd commit 5a0d8d6
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 69 deletions.
30 changes: 15 additions & 15 deletions 4.0/en/0x10-V1-Architecture.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# V1: Architecture, Design and Threat Modeling Requirements
# V1 Architecture, Design and Threat Modeling

## Control Objective

Expand All @@ -10,7 +10,7 @@ If developers had invested in a single, secure identity provider model, such as

In this chapter, the ASVS covers off the primary aspects of any sound security architecture: availability, confidentiality, processing integrity, non-repudiation, and privacy. Each of these security principles must be built in and be innate to all applications. It is critical to "shift left", starting with developer enablement with secure coding checklists, mentoring and training, coding and testing, building, deployment, configuration, and operations, and finishing with follow up independent testing to assure that all of the security controls are present and functional. The last step used to be everything we did as an industry, but that is no longer sufficient when developers push code into production tens or hundreds of times a day. Application security professionals must keep up with agile techniques, which means adopting developer tools, learning to code, and working with developers rather than criticizing the project months after everyone else has moved on.

## V1.1 Secure Software Development Lifecycle Requirements
## V1.1 Secure Software Development Lifecycle

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
Expand All @@ -23,7 +23,7 @@ In this chapter, the ASVS covers off the primary aspects of any sound security a
| **1.1.7** | Verify availability of a secure coding checklist, security requirements, guideline, or policy to all developers and testers. | ||| 637 |
| **1.1.8** | [ADDED] Verify availability of a publicly available security.txt file at the root or .well-known directory of the application that clearly defines a link or e-mail address for people to contact owners about security issues. | ||| 1059 |

## V1.2 Authentication Architectural Requirements
## V1.2 Authentication Architecture

When designing authentication, it doesn't matter if you have strong hardware enabled multi-factor authentication if an attacker can reset an account by calling a call center and answering commonly known questions. When proving identity, all authentication pathways must have the same strength.

Expand All @@ -34,11 +34,11 @@ When designing authentication, it doesn't matter if you have strong hardware ena
| **1.2.3** | Verify that the application uses a single vetted authentication mechanism that is known to be secure, can be extended to include strong authentication, and has sufficient logging and monitoring to detect account abuse or breaches. | ||| 306 |
| **1.2.4** | Verify that all authentication pathways and identity management APIs implement consistent authentication security control strength, such that there are no weaker alternatives per the risk of the application. | ||| 306 |

## V1.3 Session Management Architectural Requirements
## V1.3 Session Management Architecture

This is a placeholder for future architectural requirements.

## V1.4 Access Control Architectural Requirements
## V1.4 Access Control Architecture

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
Expand All @@ -49,7 +49,7 @@ This is a placeholder for future architectural requirements.
| **1.4.5** | Verify that attribute or feature-based access control is used whereby the code checks the user's authorization for a feature/data item rather than just their role. Permissions should still be allocated using roles. ([C7](https://owasp.org/www-project-proactive-controls/#div-numbering)) | ||| 275 |
| **1.4.6** | [ADDED] Verify that communications between application components, including APIs, middleware and data layers, are performed with the least necessary privileges. ([C3](https://owasp.org/www-project-proactive-controls/#div-numbering)) | ||| 272 |

## V1.5 Input and Output Architectural Requirements
## V1.5 Input and Output Architecture

In 4.0, we have moved away from the term "server-side" as a loaded trust boundary term. The trust boundary is still concerning - making decisions on untrusted browsers or client devices is bypassable. However, in mainstream architectural deployments today, the trust enforcement point has dramatically changed. Therefore, where the term "trusted service layer" is used in the ASVS, we mean any trusted enforcement point, regardless of location, such as a microservice, serverless API, server-side, a trusted API on a client device that has secure boot, partner or external APIs, and so on.

Expand All @@ -62,7 +62,7 @@ The "untrusted client" term here refers to client-side technologies that render
| **1.5.3** | [MOVED TO 5.1.6] | | | | |
| **1.5.4** | Verify that output encoding occurs close to or by the interpreter for which it is intended. ([C4](https://owasp.org/www-project-proactive-controls/#div-numbering)) | ||| 116 |

## V1.6 Cryptographic Architectural Requirements
## V1.6 Cryptographic Architecture

Applications need to be designed with strong cryptographic architecture to protect data assets as per their classification. Encrypting everything is wasteful, not encrypting anything is legally negligent. A balance must be struck, usually during architectural or high level design, design sprints or architectural spikes. Designing cryptography as you go or retrofitting it will inevitably cost much more to implement securely than simply building it in from the start.

Expand All @@ -75,53 +75,53 @@ Architectural requirements are intrinsic to the entire code base, and thus diffi
| **1.6.3** | Verify that all keys and passwords are replaceable and are part of a well-defined process to re-encrypt sensitive data. | ||| 320 |
| **1.6.4** | Verify that the architecture treats client-side secrets--such as symmetric keys, passwords, or API tokens--as insecure and never uses them to protect or access sensitive data. | ||| 320 |

## V1.7 Errors, Logging and Auditing Architectural Requirements
## V1.7 Errors, Logging and Auditing Architecture

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
| **1.7.1** | Verify that a common logging format and approach is used across the system. ([C9](https://owasp.org/www-project-proactive-controls/#div-numbering)) | ||| 1009 |
| **1.7.2** | Verify that logs are securely transmitted to a preferably remote system for analysis, detection, alerting, and escalation. ([C9](https://owasp.org/www-project-proactive-controls/#div-numbering)) | ||| |

## V1.8 Data Protection and Privacy Architectural Requirements
## V1.8 Data Protection and Privacy Architecture

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
| **1.8.1** | Verify that all sensitive data is identified and classified into protection levels. | ||| |
| **1.8.2** | Verify that all protection levels have an associated set of protection requirements, such as encryption requirements, integrity requirements, retention, privacy and other confidentiality requirements, and that these are applied in the architecture. | ||| |

## V1.9 Communications Architectural Requirements
## V1.9 Communications Architecture

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
| **1.9.1** | Verify the application encrypts communications between components, particularly when these components are in different containers, systems, sites, or cloud providers. ([C3](https://owasp.org/www-project-proactive-controls/#div-numbering)) | ||| 319 |
| **1.9.2** | Verify that application components verify the authenticity of each side in a communication link to prevent person-in-the-middle attacks. For example, application components should validate TLS certificates and chains. | ||| 295 |

## V1.10 Malicious Software Architectural Requirements
## V1.10 Malicious Software Architecture

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
| **1.10.1** | Verify that a source code control system is in use, with procedures to ensure that check-ins are accompanied by issues or change tickets. The source code control system should have access control and identifiable users to allow traceability of any changes. | ||| 284 |

## V1.11 Business Logic Architectural Requirements
## V1.11 Business Logic Architecture

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
| **1.11.1** | Verify the definition and documentation of all application components in terms of the business or security functions they provide. | ||| 1059 |
| **1.11.2** | Verify that all high-value business logic flows, including authentication, session management and access control, do not share unsynchronized state. | ||| 362 |
| **1.11.3** | Verify that all high-value business logic flows, including authentication, session management and access control are thread safe and resistant to time-of-check and time-of-use race conditions. | | || 367 |

## V1.12 Secure File Upload Architectural Requirements
## V1.12 Secure File Upload Architecture

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
| **1.12.1** | Verify that user-uploaded files are stored outside of the web root. | ||| 552 |
| **1.12.2** | Verify that user-uploaded files - if required to be displayed or downloaded from the application - are served by either octet stream downloads, or from an unrelated domain, such as a cloud file storage bucket. Implement a suitable Content Security Policy (CSP) to reduce the risk from XSS vectors or other attacks from the uploaded file. | ||| 646 |

## V1.13 API Architectural Requirements
## V1.13 API Architecture

This is a placeholder for future architectural requirements.

## V1.14 Configuration Architectural Requirements
## V1.14 Configuration Architecture

| # | Description | L1 | L2 | L3 | CWE |
| :---: | :--- | :---: | :---:| :---: | :---: |
Expand Down
22 changes: 11 additions & 11 deletions 4.0/en/0x11-V2-Authentication.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# V2: Authentication Verification Requirements
# V2 Authentication

## Control Objective

Expand Down Expand Up @@ -30,7 +30,7 @@ Applications can always exceed the current level's requirements, especially if m
| o | Recommended, but not required |
|| Required |

## V2.1 Password Security Requirements
## V2.1 Password Security

Passwords, called "Memorized Secrets" by NIST 800-63, include passwords, PINs, unlock patterns, pick the correct kitten or another image element, and passphrases. They are generally considered "something you know", and often used as single-factor authenticators. There are significant challenges to the continued use of single-factor authentication, including billions of valid usernames and passwords disclosed on the Internet, default or weak passwords, rainbow tables and ordered dictionaries of the most common passwords.

Expand All @@ -56,7 +56,7 @@ Credential Service Providers (CSPs) provide federated identity for users. Users

Note: The goal of allowing the user to view their password or see the last character temporarily is to improve the usability of credential entry, particularly around the use of longer passwords, passphrases, and password managers. Another reason for including the requirement is to deter or prevent test reports unnecessarily requiring organizations to override built-in platform password field behavior to remove this modern user-friendly security experience.

## V2.2 General Authenticator Requirements
## V2.2 General Authenticator Security

Authenticator agility is essential to future-proof applications. Refactor application verifiers to allow additional authenticators as per user preferences, as well as allowing retiring deprecated or unsafe authenticators in an orderly fashion.

Expand All @@ -72,7 +72,7 @@ NIST considers email and SMS as ["restricted" authenticator types](https://pages
| **2.2.6** | Verify replay resistance through the mandated use of One-time Passwords (OTP) devices, cryptographic authenticators, or lookup codes. | | || 308 | 5.2.8 |
| **2.2.7** | Verify intent to authenticate by requiring the entry of an OTP token or user-initiated action such as a button press on a FIDO hardware key. | | || 308 | 5.2.9 |

## V2.3 Authenticator Lifecycle Requirements
## V2.3 Authenticator Lifecycle

Authenticators are passwords, soft tokens, hardware tokens, and biometric devices. The lifecycle of authenticators is critical to the security of an application - if anyone can self-register an account with no evidence of identity, there can be little trust in the identity assertion. For social media sites like Reddit, that's perfectly okay. For banking systems, a greater focus on the registration and issuance of credentials and devices is critical to the security of the application.

Expand All @@ -84,7 +84,7 @@ Note: Passwords are not to have a maximum lifetime or be subject to password rot
| **2.3.2** | Verify that enrollment and use of subscriber-provided authentication devices are supported, such as a U2F or FIDO tokens. | ||| 308 | 6.1.3 |
| **2.3.3** | Verify that renewal instructions are sent with sufficient time to renew time bound authenticators. | ||| 287 | 6.1.4 |

## V2.4 Credential Storage Requirements
## V2.4 Credential Storage

Architects and developers should adhere to this section when building or refactoring code. This section can only be fully verified using source code review or through secure unit or integration tests. Penetration testing cannot identify any of these issues.

Expand All @@ -102,7 +102,7 @@ This section cannot be penetration tested, so controls are not marked as L1. How

Where US standards are mentioned, a regional or local standard can be used in place of or in addition to the US standard as required.

## V2.5 Credential Recovery Requirements
## V2.5 Credential Recovery

| # | Description | L1 | L2 | L3 | CWE | [NIST §](https://pages.nist.gov/800-63-3/sp800-63b.html) |
| :---: | :--- | :---: | :---:| :---: | :---: | :---: |
Expand All @@ -114,7 +114,7 @@ Where US standards are mentioned, a regional or local standard can be used in pl
| **2.5.6** | Verify forgotten password, and other recovery paths use a secure recovery mechanism, such as time-based OTP (TOTP) or other soft token, mobile push, or another offline recovery mechanism. ([C6](https://owasp.org/www-project-proactive-controls/#div-numbering)) |||| 640 | 5.1.1.2 |
| **2.5.7** | [MODIFIED] Verify that if OTP or multi-factor authentication factors are lost, that evidence of identity proofing is performed at the same level as during enrollment. |||| 308 | 6.1.2.3 |

## V2.6 Look-up Secret Verifier Requirements
## V2.6 Look-up Secret Verifier

Look up secrets are pre-generated lists of secret codes, similar to Transaction Authorization Numbers (TAN), social media recovery codes, or a grid containing a set of random values. These are distributed securely to users. These lookup codes are used once, and once all used, the lookup secret list is discarded. This type of authenticator is considered "something you have".

Expand All @@ -124,7 +124,7 @@ Look up secrets are pre-generated lists of secret codes, similar to Transaction
| **2.6.2** | Verify that lookup secrets have sufficient randomness (112 bits of entropy), or if less than 112 bits of entropy, salted with a unique and random 32-bit salt and hashed with an approved one-way hash. | ||| 330 | 5.1.2.2 |
| **2.6.3** | Verify that lookup secrets are resistant to offline attacks, such as predictable values. | ||| 310 | 5.1.2.2 |

## V2.7 Out of Band Verifier Requirements
## V2.7 Out of Band Verifier

In the past, a common out of band verifier would have been an email or SMS containing a password reset link. Attackers use this weak mechanism to reset accounts they don't yet control, such as taking over a person's email account and re-using any discovered reset links. There are better ways to handle out of band verification.

Expand All @@ -143,7 +143,7 @@ Unsafe out of band authenticators such as e-mail and VOIP are not permitted. PST
| **2.7.5** | Verify that the out of band verifier retains only a hashed version of the authentication code. | ||| 256 | 5.1.3.2 |
| **2.7.6** | Verify that the initial authentication code is generated by a secure random number generator, containing at least 20 bits of entropy (typically a six digital random number is sufficient). | ||| 310 | 5.1.3.2 |

## V2.8 Single or Multi-factor One Time Verifier Requirements
## V2.8 One Time Verifier

Single-factor One-time Passwords (OTPs) are physical or soft tokens that display a continually changing pseudo-random one-time challenge. These devices make phishing (impersonation) difficult, but not impossible. This type of authenticator is considered "something you have". Multi-factor tokens are similar to single-factor OTPs, but require a valid PIN code, biometric unlocking, USB insertion or NFC pairing or some additional value (such as transaction signing calculators) to be entered to create the final OTP.

Expand All @@ -158,7 +158,7 @@ Single-factor One-time Passwords (OTPs) are physical or soft tokens that display
| **2.8.7** | Verify that biometric authenticators are limited to use only as secondary factors in conjunction with either something you have and something you know. | | o || 308 | 5.2.3 |
| **2.8.8** | [ADDED] Ensure that generation of the time-based multi-factor OTP token is based on the server's system time and not the client's machine. | | o || 367 | 5.1.4.2 / 5.1.5.2 |

## V2.9 Cryptographic Software and Devices Verifier Requirements
## V2.9 Cryptographic Verifier

Cryptographic security keys are smart cards or FIDO keys, where the user has to plug in or pair the cryptographic device to the computer to complete authentication. Verifiers send a challenge nonce to the cryptographic devices or software, and the device or software calculates a response based upon a securely stored cryptographic key.

Expand All @@ -170,7 +170,7 @@ The requirements for single-factor cryptographic devices and software, and multi
| **2.9.2** | [LEVEL L2 > L3] Verify that the challenge nonce is at least 64 bits in length, and statistically unique or unique over the lifetime of the cryptographic device. | | || 330 | 5.1.7.2 |
| **2.9.3** | Verify that approved cryptographic algorithms are used in the generation, seeding, and verification. | ||| 327 | 5.1.7.2 |

## V2.10 Service Authentication Requirements
## V2.10 Service Authentication

This section is not penetration testable, so does not have any L1 requirements. However, if used in an architecture, coding or secure code review, please assume that software (just as Java Key Store) is the minimum requirement at L1. Clear text storage of secrets is not acceptable under any circumstances.

Expand Down
Loading

0 comments on commit 5a0d8d6

Please sign in to comment.