langfuse-security-basics

Featured

Implement Langfuse security best practices for API keys and data privacy. Use when securing Langfuse integration, protecting API keys, or implementing data privacy controls for LLM observability. Trigger with phrases like "langfuse security", "langfuse API key security", "langfuse data privacy", "secure langfuse", "langfuse PII".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Langfuse Security Basics ## Overview Security practices for Langfuse LLM observability: credential management, PII scrubbing before tracing, self-hosted hardening, data retention, and secret scanning. ## Prerequisites - Langfuse instance (cloud or self-hosted) - API keys provisioned - Understanding of data privacy requirements (GDPR, SOC2, HIPAA) ## Instructions ### Step 1: Credential Security Langfuse uses two keys with different security profiles: ```typescript // Startup validation -- catch misconfigurations early function validateLangfuseCredentials() { const publicKey = process.env.LANGFUSE_PUBLIC_KEY; const secretKey = process.env.LANGFUSE_SECRET_KEY; if (!publicKey || !secretKey) { throw new Error("LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY are required"); } // Catch key swap (common mistake) if (secretKey.startsWith("pk-lf-")) { throw new Error("LANGFUSE_SECRET_KEY contains a public key (pk-lf-). Keys are swapped."); } if (publicKey.startsWith("sk-lf-")) { throw new Error("LANGFUSE_PUBLIC_KEY contains a secret key (sk-lf-). Keys are swapped."); } return { publicKey, secretKey }; } // Use validated credentials const { publicKey, secretKey } = validateLangfuseCredentials(); ``` **Key security rules:** - Public key (`pk-lf-...`): Identifies the project. Safe in client-side code. - Secret key (`sk-lf-...`): Grants write access. **Server-side only.** - Store in environment variables or secret manager -- never in source code. -...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category