Bruce Weygandt
All posts

Writing the validators before the fetcher

FedRAMP 20x, Evidence fetchers, Google Workspace. 3 min read.

How I scoped a Google Workspace evidence fetcher for FedRAMP 20x by starting from the 23 checks it had to pass.

The usual way to build an evidence fetcher is to pull everything an API offers and work out later what proves what. On a Google Workspace fetcher for KSI-IAM and KSI-SVC, I went the other way and wrote the validators first.

Why start from the end

FedRAMP 20x asks for persistent, machine-readable validation. A validator is a regex over JSON with a pass rule, so it tells you exactly which fields you need and nothing more.

Google Workspace holds a lot of identity posture: MFA enforcement, admin roles, session and sharing policies. Its admin APIs don't take simple API keys, though, and the easy request to an administrator is "give me broad admin scopes." I didn't want to make that request.

Tracing 23 checks back to the API

I broke KSI-IAM and KSI-SVC down to their Rev 5 controls, then to the Workspace settings that implement them. That produced 23 validators. For each one I recorded the regex, the pass rule, the summary field it reads, the raw JSON path, the API call, and the OAuth scope that call needs. That traceability matrix turned out to be the most useful thing the project produced.

Two things fell out of it. An audit scope I'd assumed I needed wasn't used by any validator, so it went. Another scope only supported one optional check, so it became optional. The request dropped from eight scopes to six required and one optional.

# Required (read-only)
cloud-identity.policies.readonly
admin.directory.user.readonly
admin.directory.rolemanagement.readonly
admin.directory.orgunit.readonly
admin.directory.domain.readonly
admin.reports.usage.readonly

# Optional: only for the OAuth-grant inventory check
admin.directory.token.readonly

# Dropped: no validator uses it
# admin.reports.audit.readonly
The final scope set. Every line maps to at least one validator.

Things I chose not to fake

Several SVC indicators are inherited from Google's own FedRAMP authorization. Fetching data for them would look thorough and prove nothing, so they point to Google's attestation instead.

Just-in-time privileged access has no native Workspace feature at all. That one is written down as a gap rather than forced into a pass.

Asking for access

The last piece was the request itself. I wrote two versions: one where the administrator sets up the service account and hands it off, and one built around a 30-minute pairing session. Both keep credentials out of email and chat, and both recommend Workload Identity Federation over a long-lived key.

What I'd tell someone starting a fetcher

Write the checks first. The access request, the shape of the fetcher, and the conversation with the assessor all get easier when every field you collect already has a validator waiting for it.