惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
爱范儿
爱范儿
WordPress大学
WordPress大学
V
V2EX
宝玉的分享
宝玉的分享
小众软件
小众软件
B
Blog
博客园 - 叶小钗
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
H
Help Net Security
P
Proofpoint News Feed
D
Docker
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
月光博客
月光博客

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Zero-Trust Logging: Secure Vector.dev Pipelines on GCP wi...
Vagner Miran · 2026-04-24 · via DEV Community

Vagner Miranda

(Introduction)
Modern observability pipelines require more than just moving data from point A to point B; they require enterprise-grade security. When running Vector.dev on Google Cloud Platform (GCP), many engineers fall into the trap of using static JSON Service Account keys. These keys are a security liability.

In this tutorial, I’ll show you how to implement a more secure approach using GCP Workload Identity, allowing Vector to authenticate natively and securely.

(The Architecture)
Our setup involves:

Vector.dev running on Kubernetes (GKE).

Google Service Account (GSA) with specific permissions (e.g., Pub/Sub Publisher).

Workload Identity Federation to link the Kubernetes Service Account (KSA) to the GSA.

(Step 1: Create the Google Service Account)
First, create a dedicated service account for Vector and grant it only the necessary permissions:

Bash

gcloud iam service-accounts create vector-aggregator \
    --display-name="Vector Aggregator Service Account"

Enter fullscreen mode Exit fullscreen mode

gcloud projects add-iam-policy-binding [YOUR_PROJECT_ID] \
    --member="serviceAccount:vector-aggregator@[YOUR_PROJECT_ID].iam.gserviceaccount.com" \
    --role="roles/pubsub.publisher"

Enter fullscreen mode Exit fullscreen mode

(Step 2: Bind Kubernetes to GCP IAM)
Now, we allow the Kubernetes service account to act as the Google service account:

Bash

gcloud iam service-accounts add-iam-policy-binding \
    vector-aggregator@[YOUR_PROJECT_ID].iam.gserviceaccount.com \
    --role="roles/iam.workloadIdentityUser" \
    --member="serviceAccount:[YOUR_PROJECT_ID].svc.id.goog[vector-namespace/vector-ksa]"

Enter fullscreen mode Exit fullscreen mode

(Step 3: Configure Vector to use Identity)
In your vector.yaml, you don't need to specify a key_file. Vector is smart enough to use the environment's default credentials provided by Workload Identity:

YAML

sinks:
  gcp_pubsub:
    type: google_cloud_pubsub
    inputs:
      - your_log_source
    project: "[YOUR_PROJECT_ID]"
    topic: "vector-logs-topic"
    # No credentials_path needed!

Enter fullscreen mode Exit fullscreen mode

(Conclusion)
By removing static keys, you reduce the risk of credential leakage and align your infrastructure with Zero-Trust principles. This setup is scalable, secure, and easier to manage in large-scale GCP environments.