India’s Leading Domain & Web Hosting Provider

  • Chat
    Live Chat 24 X 7 online support
  • Contact NTSPL Hosting support
    Call Now +91 - 8260003333
Google CloudAd-tech (programmatic demand-side platform)Other Industries

Ad-tech DSP vaults 340 hard-coded credentials and rotates exchange keys in minutes

DSP processing 1.8 billion bid requests a day for Indian and Southeast Asian advertisers · Google Cloud asia-south1 (Mumbai), with bidders in asia-southeast1 · 12 weeks

Amazon Web Services
01

As-is situation

The bidder, campaign management and reporting services ran on GKE and Dataflow, built over six years by a team that had grown from 8 to 90 engineers. A Gitleaks scan of 140 repositories found 340 live credentials: ad exchange API keys, BigQuery service account keys, Redis passwords and two payment gateway keys. Four exchange keys had been exposed in a public fork for eleven months. Rotating any credential meant redeploying 20 or more services, so nothing had been rotated since launch, and one exchange had already threatened suspension.

  • 340 live credentials across 140 repositories, 4 exposed publicly
  • No rotation in six years because each change required redeploying 20+ services
  • 41 downloaded service account keys used by GKE workloads
02

Approach, tools and architecture

NTSPL rotated the four publicly exposed keys and the payment keys within 48 hours, coordinating with exchanges and the gateway. Remaining credentials moved into Secret Manager with one project per environment, read at runtime by GKE workloads through Workload Identity Federation for GKE and the Secret Manager add-on, with a 10-minute refresh. The 41 service account keys were replaced by Workload Identity bindings and the iam.disableServiceAccountKeyCreation constraint was enforced. Rotation schedules on exchange keys publish Pub/Sub notifications to a Cloud Run function that calls each exchange's key API, keeps both keys valid for an hour, then revokes the old one. Gitleaks now runs in pre-commit and Cloud Build.

Gitleaks scan → emergency rotation → Secret Manager (per-environment projects) → GKE Workload Identity + Secret Manager add-on → rotation schedule → Pub/Sub → Cloud Run rotation function
Secret ManagerSecret Manager add-on for GKEWorkload Identity Federation for GKECloud Run functionsPub/SubGitleaks
03

Implementation approach

Weeks 1-2 · Scan and emergency rotationLive checks confirmed 340 working credentials, and the six most exposed were rotated.
Weeks 3-7 · Vault migrationServices moved to runtime retrieval in order of bid-path criticality.
Weeks 8-10 · Keyless workloadsAll 41 service account keys were replaced and key creation was blocked.
Weeks 11-12 · Rotation automationExchange key rotation functions went live for nine exchanges.
04

Measured results

Live credentials in repositories
340→0
Downloaded service account keys
41→0
Time to rotate an exchange API key
2-3 days with redeploys→Under 15 minutes, no redeploy
Secrets with scheduled rotation
0%→86%

Operational improvements

  • Pre-commit and pipeline scanning blocked 23 new secrets in the first quarter
  • Exchange partners receive rotation confirmations automatically
05

Cost considerations

Secret Manager charges for about 420 secret versions and access calls, cached by the add-on, run under INR 12,000 a month. Cloud Run rotation functions are negligible. NTSPL's fee was INR 13 lakh. Pipeline scanning runs on existing Cloud Build capacity.

06

Return on investment

ROI indicator

The threatened exchange suspension would have cut roughly 12% of daily bid volume. Removing 340 live credentials and all service account keys eliminates the most common cloud breach path, and engineers no longer coordinate multi-service redeploys for each rotation.

Illustrative scenario: a composite based on typical NTSPL engagement patterns for this industry and service. It does not describe a named customer. The figures are indicative, and actual results depend on the workload, its scale and the commercial terms.