VerityNgn Setup Guide
Complete guide to setting up VerityNgn with Google Cloud authentication.Prerequisites
- Python 3.12+
- Google Cloud account
- Google Cloud project with billing enabled
Installation
1. Clone Repository
2. Install Dependencies
Using Conda (Recommended):Authentication Setup
VerityNgn requires Google Cloud authentication for Vertex AI (Gemini). Choose one of the following methods:Method 1: Service Account (Recommended for Automation)
Best for: Automated workflows, production deployments, CI/CDStep 1: Create Service Account
- Go to Google Cloud Console
- Select your project at the top of the page
- Click “Create Service Account”
- Name:
verityngn-service - Description:
Service account for VerityNgn video verification - Click “Create and Continue”
- Name:
Step 2: Grant Required Permissions
Add these roles:- ✅ Vertex AI User (required for Gemini multimodal analysis)
- ✅ Storage Object Admin (optional, if using GCS)
Step 3: Create & Download JSON Key
- Click on your new service account in the list
- Go to “Keys” tab
- Click “Add Key” → “Create new key”
- Select JSON format
- Click “Create”
- The JSON file will download automatically
Step 4: Configure Environment
Option A: Place in project directory (easiest) Save the JSON file as one of:service-account.jsoncredentials.jsonverityindex-key.json
~/.zshrc:
Step 5: Set Project ID
Create a.env file in the project root:
Method 2: Application Default Credentials (Recommended for Development)
Best for: Local development, interactive useStep 1: Install Google Cloud SDK
macOS:Step 2: Authenticate
Step 3: Set Project Environment Variables
Create.env file:
API Keys (Optional but Recommended)
Google Custom Search API (for evidence gathering)
- Go to Google Cloud Console → APIs & Services → Credentials
- Click “Create Credentials” → “API Key”
- Copy the API key
-
Create Custom Search Engine:
- Go to Programmable Search Engine
- Click “Add”
- Search the entire web
- Copy the Search Engine ID
-
Add to
.env:
YouTube Data API v3 (for enhanced counter-intelligence)
- Go to Google Cloud Console → APIs & Services → Library
- Search for “YouTube Data API v3”
- Click “Enable”
- Go to Credentials → “Create Credentials” → “API Key”
- Copy the API key
.env:
Configuration
Environment Variables Reference
Create/edit.env file in project root:
Verification
Test Authentication
Quick test:Troubleshooting
Error: “Could not automatically determine credentials”
Solution 1: Use service account method- Download service account JSON
- Place in project root as
service-account.json - Restart application
Error: “Reauthentication is needed”
OAuth2 credentials expired. Switch to service account or re-run:Error: “Permission denied” for Vertex AI
Grant Vertex AI User role to your service account:Error: “Google Search API key not configured”
This is optional. System works without it but has limited verification. To fix: See Google Custom Search API section.Error: “ModuleNotFoundError”
Reinstall dependencies:Next Steps
- Quick Start Guide - Run your first verification
- Testing Guide - Test the complete workflow
- Authentication Guide - Deep dive into auth options
- Configuration Guide - Advanced configuration
Security Best Practices
-
Never commit credentials to git:
-
Restrict service account permissions:
- Only grant necessary roles
- Use separate service accounts for dev/prod
-
Rotate keys regularly:
- Delete old service account keys
- Create new keys every 90 days
-
Use environment-specific credentials:
- Development: application-default credentials
- Production: service account with minimal permissions
Last Updated: October 28, 2025
Version: 2.0
