VerityNgn Authentication Guide
Deep dive into Google Cloud authentication options for VerityNgn.Overview
VerityNgn requires Google Cloud authentication for:- Vertex AI (required): Gemini multimodal analysis
- Google Custom Search API (optional): Evidence gathering
- YouTube Data API v3 (optional): Enhanced counter-intelligence
- Cloud Storage (optional): Production deployments
Authentication Methods
Method 1: Service Account (Production)
Best for:- Production deployments
- Automated workflows
- CI/CD pipelines
- Long-running services
- ✅ No browser interaction needed
- ✅ Consistent credentials
- ✅ Fine-grained permission control
- ✅ Secure key management
- ✅ Works in containers/cloud
- ⚠️ Must manage JSON key files
- ⚠️ Key rotation required
Setup Steps
- Create Service Account:
- Grant Permissions:
- Create JSON Key:
- Configure Environment:
Method 2: Application Default Credentials (Development)
Best for:- Local development
- Interactive use
- Quick prototyping
- Developer workstations
- ✅ Quick setup
- ✅ No key file management
- ✅ Uses your personal credentials
- ✅ Easy for development
- ⚠️ Requires browser login
- ⚠️ May expire and need re-authentication
- ⚠️ Not suitable for production
- ⚠️ Doesn’t work in containers
Setup Steps
- Install Google Cloud SDK:
- Authenticate:
- Set Project:
- Verify:
Method 3: Workload Identity (Kubernetes/GKE)
Best for:- Kubernetes deployments
- Google Kubernetes Engine (GKE)
- Cloud Run
- Cloud Functions
- ✅ No key files
- ✅ Automatic credential rotation
- ✅ Enhanced security
- ✅ Integrated with GCP services
- ⚠️ Only works in GCP environments
- ⚠️ More complex setup
Setup Steps
- Enable Workload Identity:
- Configure Service Account:
- Use in Pod:
Required Permissions
Minimum Required (Core Functionality)
- Vertex AI API
- Gemini models
- Multimodal analysis
Recommended (Full Features)
Custom Role (Least Privilege)
Create a custom role with only necessary permissions:API Keys (Optional Services)
Google Custom Search API
Purpose: Web evidence gathering Setup:- Enable API:
- Create API Key:
- Create Custom Search Engine:
- Go to https://programmablesearchengine.google.com/
- Click “Add”
- Configure to search entire web
- Copy Search Engine ID
- Add to .env:
YouTube Data API v3
Purpose: Enhanced counter-intelligence Setup:- Enable API:
- Create API Key:
- Add to .env:
Security Best Practices
Service Account Security
- Principle of Least Privilege:
- Key Rotation:
- Key Storage:
API Key Security
- Restrict API Keys:
- Use Environment Variables:
- Rotate Keys:
Multi-Environment Setup
Development:Troubleshooting
”Could not automatically determine credentials”
Cause: No valid credentials found Check:“Permission denied” for Vertex AI
Cause: Service account lacks required role Fix:“Reauthentication is needed”
Cause: OAuth2 credentials expired (ADC) Fix:“API key not found”
Cause: API keys not configured (optional) Impact: Limited functionality, not critical Fix (optional):- Works without Search API (limited verification)
- Works without YouTube API (uses yt-dlp fallback)
Verification
Test Authentication
Test Vertex AI Access
Test API Keys
Next Steps
- Setup Guide - Complete setup walkthrough
- Quick Start - Run your first verification
- Testing Guide - Test authentication
Last Updated: October 28, 2025
Version: 2.0
