보안
Astreus 에이전트에서 민감한 데이터를 보호하기 위한 필드 수준 암호화
Overview#
Astreus는 데이터베이스에 저장된 민감한 데이터를 보호하기 위한 내장 AES-256-GCM 암호화를 포함하고 있습니다. 이 기능은 대화, 시스템 프롬프트, 작업 데이터, 지식 베이스 콘텐츠에 대한 투명한 필드 수준 암호화를 제공합니다.
Quick Setup#
1. Generate Encryption Key#
# Generate a cryptographically secure 256-bit key
openssl rand -hex 322. Configure Environment#
# Enable encryption
ENCRYPTION_ENABLED=true
# Your secure master key (keep this secret!)
ENCRYPTION_MASTER_KEY=your-256-bit-encryption-key-here
# Optional: specify algorithm (default: aes-256-gcm)
ENCRYPTION_ALGORITHM=aes-256-gcm3. Use Normally#
import { Agent } from '@astreus-ai/astreus';
// Create agent with sensitive system prompt
const agent = await Agent.create({
name: 'SecureAgent',
systemPrompt: 'Your confidential business logic here', // ← Automatically encrypted
memory: true,
knowledge: true
});
// All interactions automatically encrypted
const response = await agent.ask('Sensitive question here');
// Knowledge uploads automatically encrypted
await agent.knowledge.addDocument(
'Confidential Document',
'Sensitive content here' // ← Automatically encrypted
);Key Management#
Master Key Requirements#
- 최소 길이: 32자 (256비트)
- 생성: 암호학적으로 안전한 난수 생성기를 사용하세요
- 저장: 코드베이스 외부에 안전하게 저장하세요
- 교체: 주기적인 키 교체를 계획하세요