SSZcreate/Pentab_server / .agents/skills/cybersecurity/skills/implementing-google-workspace-admin-security
implementing-google-workspace-admin-security
VerifiedHardens a Google Workspace tenant via Admin Console configuration: phishing-resistant MFA enforcement, DLP policies, email authentication (SPF/DKIM/DMARC), OAuth third-party app control, and external sharing restrictions. Use when hardening a Google Workspace or G Suite tenant, enforcing MFA and OAuth app controls, or configuring cloud office security administration.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 11.0 KB |
| SKILL.md | skill md | 16.9 KB |
| references/api-reference.md | markdown | 2.2 KB |
| scripts/agent.py | script | 8.3 KB |
references/api-reference.md
View on GitHub# API Reference: Implementing Google Workspace Admin Security
## Libraries
### google-api-python-client + google-auth
- **Install**: `pip install google-api-python-client google-auth`
- **Docs**: https://developers.google.com/admin-sdk/directory/reference/rest
## Admin SDK Directory API
| Method | Description |
|--------|-------------|
| `users().list(domain, projection="full")` | List users with full profile |
| `users().get(userKey)` | Get specific user details |
| `users().update(userKey, body)` | Update user settings |
| `users().list(query="isAdmin=true")` | List admin users |
| `orgunits().list(customerId)` | List organizational units |
| `roles().list(customer)` | List admin roles |
| `roleAssignments().list(customer)` | List role assignments |
## Reports API (Audit Logs)
| Method | Description |
|--------|-------------|
| `activities().list(userKey, applicationName)` | Get audit events |
| Application names: `login`, `admin`, `drive`, `token`, `mobile` |
## Key User Fields for Security
| Field | Description |
|-------|-------------|
| `isEnrolledIn2Sv` | User enrolled in 2-Step Verification |
| `isEnforcedIn2Sv` | 2SV enforcement applied |
| `isAdmin` | Super admin status |
| `isDelegatedAdmin` | Delegated admin status |
| `lastLoginTime` | Last login timestamp |
| `recoveryEmail` | Recovery email (risk if external) |
| `recoveryPhone` | Recovery phone number |
| `isSuspended` | Account suspended |
## OAuth Scopes Required
- `admin.directory.user` -- User management
- `admin.directory.domain` -- Domain settings
- `admin.reports.audit.readonly` -- Audit log access
- `admin.directory.orgunit` -- Org unit management
## Login Event Names
- `login_success` -- Successful login
- `login_failure` -- Failed login attempt
- `login_challenge` -- 2FA challenge issued
- `suspicious_login` -- Flagged by Google
- `account_disabled_password_leak` -- Compromised password
## External References
- Admin SDK: https://developers.google.com/admin-sdk
- Workspace Security Best Practices: https://support.google.com/a/answer/7587183
- CIS Google Workspace Benchmark: https://www.cisecurity.org/benchmark/google_workspace
- Reports API: https://developers.google.com/admin-sdk/reports/reference/rest
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |