Any app that stores or transmits Gmail or Drive data obtained through a restricted OAuth scope must pass an independent security assessment, and repeat it at least every 12 months, or lose access to that data. Google runs this through the App Defense Alliance (ADA) Cloud Application Security Assessment, known as CASA, whose requirements are built on the OWASP Application Security Verification Standard (ASVS). Teams often meet it late, after the consent screen and demo video are done, and discover findings in OAuth handling, token storage or dependency hygiene that take weeks to fix. This guide covers who needs an assessment, how the two assurance levels work, what each requirement family in the current specification tests, how to prepare evidence, and how to stay ready for the yearly reassessment. It is for SaaS engineering leads, security teams and founders building on Google Workspace APIs.
This is an independent guide from NHI Mgmt Group, based on Google's public documentation as of November 2026. It is not sponsored or reviewed by Google. Product features change, so confirm settings against Google's current documentation.
Key takeaways
- The trigger is server-side handling of restricted data. Google's Gmail and Drive scope pages say that if you store restricted scope data on servers, or transmit it, you must go through a security assessment.
- Scope choice is the biggest lever. drive.file is non-sensitive and gmail.send is sensitive, not restricted. Narrowing scopes can remove the assessment entirely.
- There are two assurance levels. AL1 is a verified self assessment, where an ADA approved lab reviews your evidence; AL2 is a lab assessment, where the lab tests the application directly. Google assigns the level, not you.
- The specification is short and testable. CASA Specification v2.1.1 (June 2026) has seven requirement families, from authentication to webhook security, each with numbered audit test cases.
- Plan for every year, not once. Reverification is due at least every 12 months, a new restricted scope can trigger reassessment, and an app validated at AL2 stays at AL2 in later years.
Who needs a CASA assessment
Google classifies OAuth scopes as non-sensitive, sensitive or restricted. Restricted scopes give wide access to Google user data and require restricted scope verification unless the app qualifies for an exception. Google's restricted scope verification page states that apps able to access restricted data from or through a third-party server must complete a security assessment with a Google-empanelled assessor.
| API | Restricted scopes (examples) | Lower-classification alternatives |
|---|---|---|
| Gmail | https://mail.google.com/, gmail.readonly, gmail.modify, gmail.compose, gmail.insert, gmail.metadata, gmail.settings.basic, gmail.settings.sharing | gmail.send (sensitive), gmail.labels (non-sensitive), add-on scopes such as gmail.addons.current.message.readonly (sensitive) |
| Drive | drive, drive.readonly, drive.metadata, drive.metadata.readonly, drive.activity, drive.activity.readonly, drive.meet.readonly, drive.scripts | drive.file and drive.appdata (non-sensitive), drive.apps.readonly (sensitive) |
Google's Drive documentation recommends non-sensitive scopes wherever possible, says many apps can move to per-file access through drive.file, and suggests the Google Picker API for apps that built their own file picker. It also limits restricted Drive scopes to backup and sync, productivity and education, and reporting and security apps. Google's Gmail example is blunt: an app that only sends occasional email should not request full mailbox access.
Exceptions that remove the review
- Personal use: you are the only user, or the few users are all known to you personally (a user cap still applies).
- Development and testing: the app is available only to users on the test users list.
- Service-owned data only: the app uses a service account and does not access any user data linked to a Google Account.
- Internal use only: the app is used only by people in your own Google Workspace or Cloud Identity organisation.
Domain-wide installation is not an exception for restricted scopes: Google notes brand verification is not needed, but app verification still is, because an administrator can grant access to users' data. If your product uses domain-wide delegation, read the Google Workspace Domain-Wide Delegation Security Guide alongside this page.
Where CASA sits in restricted scope verification
The assessment is the last step. Google's Trust and Safety team contacts you when it is time to begin, after the earlier verification steps are complete.
- Branding and domains: verified authorised domains in Google Search Console, a public home page, and a privacy policy on the same domain that discloses how the app accesses, uses, stores and shares Google user data.
- Scope declaration and justification: declare every scope in the Cloud Console, choose a permitted application type and explain why narrower scopes are not sufficient.
- Demonstration video: an unlisted video showing the grant flow and how each sensitive and restricted scope is used.
- Policy compliance: the Google API Services User Data Policy, including its Limited Use requirements.
- Security assessment: CASA through an ADA authorised lab, ending in a letter from the assessor. Google's CASA page calls it a Letter of Validation (LOV); the restricted scope page counts the 12-month cycle from the Letter of Assessment approval date. Treat them as the same milestone and track its date.
Assurance levels: AL1 and AL2
Earlier CASA material and many developer discussions describe tiers. The current ADA and Google pages describe assurance levels instead, and that is the language to use with your lab.
| Aspect | AL1: Verified Self Assessment | AL2: Lab Assessment |
|---|---|---|
| Who tests | You provide evidence and statements of compliance for each audit test case | The ADA approved lab evaluates each audit test case directly against the application |
| Lab role | Reviews your evidence against the requirements; does not directly assess the application | Tests the application, its deployment infrastructure and user data storage location where applicable |
| Your input | Full evidence pack: configuration, scan output, code snippets, policies | Limited information or code snippets in some cases, plus test access |
| Requirements | All requirements must be satisfied at every level; the levels differ only in assessment method | |
| Who decides the level | Google, based on user count, requested scopes and other application-specific signals | |
Two consequences follow. First, AL1 is not lighter in substance: the same controls must exist, and you must prove them with evidence good enough for a reviewer who never touches the app. Second, growth changes your level. Google states the required level can rise as user base or data handling changes, and an app validated at AL2 stays at AL2 in later years.
CASA Accelerator: the ADA describes an accelerator that maps existing certifications to CASA requirements. You share current certifications with an ADA approved assessor, who validates them and customises the remaining checks. Neither ADA nor Google lists which certifications qualify, so ask your lab before you book.
What the CASA specification tests
The App Defense Alliance CASA Specification v2.1.1, dated 3 June 2026, is the continuation of CASA v2, maintained by the ADA Application Security Assessment Working Group and published on GitHub with a companion test guide. It focuses on testable requirements with clear acceptance criteria and favours automation where possible.
| Family | Audit test cases (selected) | What assessors look for |
|---|---|---|
| 1 Authentication | 1.1.1 brute force resistance; 1.1.3 offline-resistant password storage; 1.2.1 no default credentials; 1.3.x out of band verifiers expire, are single use and random | Rate limiting or lockout, modern password hashing, one-time codes with expiry |
| 2 Session Management | 2.1.1 no tokens in URLs; 2.2.1 logout invalidates stateful tokens including refresh tokens; 2.2.3 non-revocable stateless tokens expire within 24 hours; 2.3.1 and 2.3.2 Secure and HttpOnly cookies | Session lifecycle, refresh token revocation, cookie flags |
| 3 Access Control | 3.1.1 least privilege on a trusted service layer; 3.1.4 IDOR protection; 3.1.5 anti-CSRF; 3.2.1 authorisation code flow or code flow with PKCE, no implicit or password flows; 3.2.2 redirect_uri and state validation; 3.3.1 MFA on admin interfaces | Tenant isolation, OAuth client hygiene, admin MFA |
| 4 Communications | 4.1.1 TLS for all connections, defaulting to TLS 1.2 or later; 4.1.2 trusted certificates; 4.1.3 no weak cryptography on confidential data | TLS configuration on every endpoint, internal CA trust |
| 5 Data Validation | 5.1.2 allowlisted redirects; 5.1.5 SSRF; 5.1.7 XSS; 5.1.8 database injection; 5.1.9 OS command injection; 5.2.1 file uploads | Injection classes found by dynamic testing |
| 6 Configuration | 6.1.1 no components with known exploitable vulnerabilities; 6.2.1 debug off; 6.4.1 no subdomain takeover; 6.5.1 no credentials in logs; 6.6.1 browser storage cleared at logout; 6.7.1 secure storage of access tokens and server-side secrets | Dependency scanning, DNS hygiene, logging and secret storage |
| 7 Webhook Security | 7.1.1 HTTPS with TLS 1.2 or higher; 7.2.1 HMAC-SHA256 or stronger signatures; 7.2.2 timing-safe comparison; 7.2.3 signed timestamps for replay protection; 7.3.1 SSRF controls on callback URLs; 7.3.2 signing secrets out of source control | Inbound and outbound webhook design |
Scoping rules that change the work
- First-party scope: the target application is a group of components providing a logical set of services, and shared first-party backends or APIs it uses are in scope.
- Third-party APIs: third-party APIs that support sensitive operations (authentication, accessing or changing user data, account recovery) are in scope, but only for the Authentication, Session Management and Access Control families, and only for the components your app uses.
- Out of scope: third-party APIs you do not use, and non-sensitive operations such as an analytics gateway that handles no user data.
Define the boundary in writing before the lab starts. A loosely scoped assessment that pulls in an unrelated admin portal or marketing site adds findings without adding assurance.
Preparing: a phased plan
- Minimise scopes first (week 1): list every Google scope requested and the feature that needs it. Replace drive with drive.file plus Google Picker, and Gmail full access with gmail.send or add-on scopes, wherever the product allows. Each restricted scope removed reduces the data you must protect and justify.
- Map the data flow (week 1): where restricted data enters, where it is stored (databases, queues, caches, logs, backups, analytics), who and what can read it, and how it is deleted on user request. Google's verification requires showing you can delete user data on request.
- Self-test against the test guide (weeks 2 to 4): walk the CASA Test Guide case by case. Run authenticated dynamic testing against staging, software composition analysis for 6.1.1, a TLS scan of every public hostname for 4.1.1, and a DNS review for dangling records under 6.4.1. See the DAST vs IAST guide.
- Fix by family (weeks 3 to 6): start with OAuth and token handling (3.2, 2.2, 6.7), which are the most Google-specific, then injection and configuration findings.
- Build the evidence pack: for AL1, one folder per audit test case with a statement, screenshots or configuration export, and code snippets (the specification accepts partial snippets that demonstrate the control). For AL2, prepare test accounts in two tenants so the lab can check IDOR and tenant isolation.
- Engage the lab: choose from the ADA authorised labs list, confirm level, scope and accelerator use, and agree a retest window for findings.
- Close and record: store the letter, the final report, and the dates in your compliance calendar with a reminder at least three months before expiry.
Keep owner and editor accounts and contact details on the Cloud project current: Google sends recertification notices by email, so a notice sent to a former employee's address can go unseen.
Where identity fits: tokens and secrets your app holds
A CASA-scoped app is, by design, a store of user OAuth refresh tokens: long-lived non-human credentials that unlock other people's mailboxes and files. Three requirement areas concentrate on them.
- Secure storage (6.7.1): keep refresh tokens and client secrets in a secrets manager or encrypted with keys held in a key management service, never in source, environment files in repositories or plain database columns. See the Secrets Management Guide.
- Revocation (2.2.1, 2.2.2): logout and password change must invalidate your own sessions and refresh tokens; when a user disconnects, revoke the Google grant as well as deleting the stored token. See the OAuth Refresh Token Rotation and Expiry Guide.
- Flow and client hygiene (3.2.1, 3.2.2): authorisation code flow with PKCE, exact redirect URI matching and state validation. Apps still on the implicit flow should follow the OAuth Implicit Flow Migration guide.
- Logging (6.5.1): no credentials in logs; session tokens only in irreversible, hashed form. Check request logging middleware, error trackers and API gateway logs, which often capture Authorization headers.
Decision guidance
| Situation | Recommended approach |
|---|---|
| Feature needs only files the user picks | Move to drive.file with Google Picker and avoid restricted verification |
| Feature only sends mail | Use gmail.send (sensitive) rather than any restricted Gmail scope |
| Processing can happen entirely in the client | Keep restricted data off your servers; the assessment trigger is storing or transmitting it server-side. Confirm with Google during verification |
| Internal tool for your own Workspace organisation | Set the app to internal; review is not required |
| Startup with a small team and an AL1 assignment | Invest in the evidence pack; reuse it every year with updated scan output |
| Larger SaaS or AL2 assignment | Run an internal pre-assessment against the test guide each quarter so the annual lab test finds nothing new |
| Existing ISO/IEC 27001 or SOC 2 programme | Ask the lab whether the CASA Accelerator applies before scoping |
Staying ready between assessments
- Scope change control: treat any new restricted scope as a compliance change, because Google notes it may require reassessment.
- Continuous dependency hygiene: 6.1.1 is tested on the day; a single newly published critical advisory can turn a pass into a finding. Apply security updates within a defined time frame (OWASP ASVS 5.0 V15.2.1).
- Pipeline checks: add the dynamic scan, TLS check and secret scanning to CI so regressions surface before the lab sees them.
- Monitoring: alert on failed logins and lockouts (1.1.1), admin logins without MFA (3.3.1), webhook signature failures (7.2.1) and access to stored tokens outside the service that uses them.
| Metric | Target |
|---|---|
| Restricted scopes requested versus justified features | One documented feature per scope |
| Open high or critical findings against CASA test cases | Zero before the lab window |
| Days remaining on the current letter | Reassessment booked with at least 90 days left |
| Dependencies with known exploitable vulnerabilities in production | Zero past the remediation time frame |
| Stored refresh tokens for disconnected users | Zero |
Common failure patterns
- Requesting broad scopes by habit: requesting drive or mail.google.com when drive.file or gmail.send would do creates the assessment obligation in the first place.
- Tokens in logs: verbose HTTP logging that records Authorization headers or OAuth callback query strings fails 6.5.1 and 2.1.1.
- Refresh tokens that never die: logout clears the browser cookie but the server-side refresh token remains valid, failing 2.2.1.
- Forgotten hostnames: an old staging subdomain pointing at a deleted cloud resource fails 6.4.1. See the Subdomain Takeover and Dangling DNS Guide.
- Unsigned webhooks: webhook receivers that accept unsigned payloads, or compare signatures with a plain string equality check, fail 7.2.1 and 7.2.2.
- Missed renewal email: recertification notices go to a departed owner, and the 12-month deadline passes unnoticed.
Framework mapping
CASA is built on ASVS, and the table below is NHI Mgmt Group's cross-reference to related ASVS 5.0 requirements and other frameworks, not an official ADA mapping.
| CASA family | Related OWASP ASVS 5.0 | NIST SP 800-53 Rev 5 |
|---|---|---|
| 1 Authentication | V6.3.1 brute force and credential stuffing controls | IA-2 |
| 2 Session Management | V7.4.1 session termination | IA-2, SC-8 |
| 3 Access Control and OAuth | V10.2.1 CSRF protection in the code flow; V10.2.3 request only required scopes | AC-6 |
| 4 Communications | V12.1.1 TLS 1.2 and 1.3 | SC-8 |
| 6 Configuration | V15.2.1 component update time frames; V13.3.1 secrets management; V16.2.5 sensitive data in logs | SC-28, SI-2 |
| Assessment itself | ASVS as the verification basis | SA-11 Developer Testing and Evaluation; CA-8 Penetration Testing |
For ISO/IEC 27001:2022, the closest Annex A controls are A.8.28 Secure coding and A.8.29 Security testing in development and acceptance. The OWASP ASVS Guide explains the standard CASA builds on.
Practitioner checklist
- Inventory every Google scope and remove or downgrade each restricted scope you can.
- Confirm whether an exception applies (internal, testing, personal, service-owned data only).
- Document the restricted data flow, storage locations and deletion path.
- Walk the CASA Test Guide case by case and fix OAuth, token and logging findings first.
- Store refresh tokens and client secrets in a secrets manager or KMS-encrypted store, and revoke grants on disconnect.
- Sign and verify webhooks with HMAC-SHA256 or stronger, timing-safe comparison and signed timestamps.
- Prepare an evidence pack per audit test case, reusable each year.
- Ask the lab about the CASA Accelerator if you hold existing certifications.
- Keep Cloud project owner contacts current and book reassessment 90 days before expiry.
Standards and references
- App Defense Alliance: CASA Specification
- App Defense Alliance: CASA Test Guide
- App Defense Alliance: CASA Assurance Levels
- App Defense Alliance: CASA Accelerator
- Google: Restricted scope verification
- Google Cloud: Security assessment for restricted scopes
- Google: Choose Gmail API scopes
- Google: Choose Google Drive API scopes
Related NHI Mgmt Group resources: OWASP ASVS Guide · Google Workspace Domain-Wide Delegation Security Guide · OAuth Refresh Token Rotation and Expiry Guide · Secrets Management Guide