Loading...
private.me Docs
Get AWS Bedrock xLink
private.me · Technical White Paper

Identity-Based Authentication for AWS Bedrock AI

Drop-in replacement for AWS Bedrock SDK with cryptographic identity. Every message signed, every agent verified, zero cascading failures. Supports Claude, Titan, and all Bedrock models.

603× faster auth Zero cascading failures Information-theoretic security Multi-agent collaboration
Section 01

Quick Start (15 seconds)

Get started with AWS Bedrock xLink in 15 seconds. Replace AWS SDK import, keep everything else the same. Identity generation and message signing happen automatically.

Installation
npm install @private.me/aws-bedrock-xlink @aws-sdk/client-bedrock-runtime
Basic Usage
import { BedrockXLinkClient } from '@private.me/aws-bedrock-xlink';

// Create client (generates identity automatically)
const client = new BedrockXLinkClient({
  region: 'us-east-1',
  modelId: 'anthropic.claude-v2'
});

// Simple chat with auto-signed message
const result = await client.chat('Explain quantum computing simply');

if (result.ok) {
  console.log(result.value.content);
  console.log('Tokens:', result.value.usage);
}
THAT'S IT
No identity configuration, no key management, no signature handling. xLink identity is auto-generated, messages are auto-signed, verification is built-in.
Section 02

The Problem: Credential-Based Authentication

AWS credentials authenticate infrastructure access, but not AI agent identity. Multi-agent systems can't verify which agent sent a message, audit trails are incomplete, and cascading failures happen when credentials expire.

Traditional Approach Problem
AWS Access Keys Authenticate infrastructure, not agent identity
IAM Roles Can't verify which specific agent sent a message
Credential Rotation Cascading failures when keys expire
Audit Trails No cryptographic proof of message authorship
Multi-Agent Systems Agents can't verify each other's messages

The core issue: One expired OAuth token can restart 500 AI agents simultaneously. Credentials authenticate access but don't prove identity. Cascading failures are inevitable.

Section 03

Solution: Cryptographic Identity

xLink provides every Bedrock client with a cryptographic identity (DID). Messages are signed with Ed25519, responses can be verified, and identity persists independent of AWS credentials.

603×
Faster Auth
0.36ms
Auth Overhead
Zero
Cascading Failures
100%
Audit Coverage

How It Works

Each Bedrock client gets a unique xLink DID. Every message is signed before sending to Bedrock. Other agents can verify signatures. Identity survives credential rotation.

Information Flow
┌─────────────┐
│ Agent A     │
│ DID: z6Mk.. │
└──────┬──────┘
       │
       ├── Message: "Analyze this data"
       │   Signed: Ed25519 signature
       │
       ▼
┌────────────────────────────┐
│ AWS Bedrock                │
│ - Claude v2                │
│ - Receives signed message  │
│ - Processes request        │
└────────────────────────────┘
       │
       ├── Response with agent metadata
       │
       ▼
┌─────────────┐
│ Agent B     │
│ Verifies    │
│ signature   │
└─────────────┘

Benefits

  • Cascading Failure Elimination: Identity persists through credential rotation
  • Redo Multiplication: 603× speedup vs OAuth (91ms vs 54,853ms)
  • Multi-Agent Collaboration: Agents verify each other's messages
  • Audit Trails: Cryptographic proof of who said what
  • Zero-Trust Architecture: No reliance on network security
Section 04

Features

Auto-Generated Identity

Zero-Config Setup
const client = new BedrockXLinkClient({ region: 'us-east-1', modelId: 'anthropic.claude-v2' });
// Automatically:
// - Generates Ed25519 keypair
// - Creates DID (did:key:z6Mk...)
// - Ready for secure communication

console.log('Agent DID:', client.did);

Multi-Turn Conversations

Conversation Context
const conv = client.createConversation();

await client.chatInConversation(conv, 'My name is Alice');
await client.chatInConversation(conv, 'What is my name?');
// Model responds: "Your name is Alice"

Streaming Support

Real-Time Responses
await client.streamChat(
  'Write a story about a robot',
  undefined,
  {
    onDelta: (chunk) => process.stdout.write(chunk),
    onComplete: (full) => console.log('\n\nGenerated', full.length, 'characters'),
    onError: (error) => console.error('Stream failed:', error.message)
  }
);

Multi-Agent Collaboration

Agent Verification
// Create two agents with separate identities
const researcher = new BedrockXLinkClient({
  region: 'us-east-1',
  modelId: 'anthropic.claude-v2',
  agentName: 'researcher'
});

const writer = new BedrockXLinkClient({
  region: 'us-east-1',
  modelId: 'amazon.titan-text-express-v1',
  agentName: 'writer'
});

// Each has a unique DID
console.log('Researcher DID:', researcher.did);
console.log('Writer DID:', writer.did);

// They can verify each other's messages
const researchResult = await researcher.chat('Find facts about AI');
// Writer can verify researcher's signature
Section 05

Use Cases

🤖
Multi-Agent Systems
Agent Collaboration

Multiple AI agents working together, each with unique identity. Researcher agent gathers data, analyst agent processes it, writer agent generates reports. Each verifies others' messages cryptographically.

verified messages
📊
Enterprise
Audit-Ready AI

Cryptographic audit trails for all AI conversations. Every message signed with agent DID, every response verifiable. Compliance teams can prove exactly which agent said what, when. SOC2, ISO27001 ready.

compliance audit
🔐
Government
Zero-Trust AI Systems

AI agents in classified environments with zero-trust architecture. No reliance on network security. Each agent cryptographically identified. Message integrity verified end-to-end. FISMA, FedRAMP compliant.

zero-trust verified
🏥
Healthcare
HIPAA-Compliant AI

AI agents processing patient data with cryptographic accountability. Every agent identified, every message signed. Audit logs show exactly which agent accessed which patient record. HIPAA BAA satisfied.

HIPAA audit trail
Section 06

Purchase & Subscription

Pricing

Standard pricing: $5/month Basic • $10/month Middle • $15/month Enterprise

Tier Price Features
Basic $5/month Bedrock integration, identity auth, signature verification, unlimited requests
Middle $10/month Everything in Basic + trust registry integration, multi-agent verification
Enterprise $15/month Everything in Middle + air-gapped deployment + white-label + SSO + SLA

3-month trial - No credit card required

Start Free Trial

API Purchase Endpoint

Purchase via API
curl -X POST https://private.me/api/purchase \
  -H "Content-Type: application/json" \
  -d '{
    "product": "aws-bedrock-xlink",
    "tier": "basic",
    "customer": {
      "email": "user@example.com",
      "connection_id": "conn_abc123"
    }
  }'

Error Handling

All errors follow RFC 7807 Problem Details format:

RFC 7807 Error Response
{
  "type": "https://private.me/errors/invalid-tier",
  "title": "Invalid subscription tier",
  "status": 400,
  "fields": {
    "tier": "Provided value 'premium' is not valid"
  }
}
Section 07

API Reference

BedrockXLinkClient

Main class for AWS Bedrock integration with xLink identity.

constructor(config: BedrockXLinkConfig)
Creates a new Bedrock client with xLink identity. Generates cryptographic keypair automatically if not provided.
chat(content: string, systemPrompt?: string): Promise<Result<BedrockResponse, Error>>
Single-turn chat with Bedrock model. Message is automatically signed before sending.
createConversation(): string
Creates a new conversation context for multi-turn chats. Returns conversation ID.
chatInConversation(conversationId, content, systemPrompt?): Promise<Result<BedrockResponse, Error>>
Chat within a conversation. Maintains history across turns. All messages signed.
streamChat(content, systemPrompt?, streamConfig?): Promise<Result<void, Error>>
Stream responses in real-time. Callbacks: onDelta (chunks), onComplete (full text), onError (failures).
verifyMessage(message: SignedMessage): Promise<Result<boolean, Error>>
Verify an xLink signature on a message. Returns true if signature valid, false otherwise.

Properties

Client Properties
client.did        // The xLink DID for this client
client.agent      // The underlying xLink Agent instance

Configuration Interface

BedrockXLinkConfig
interface BedrockXLinkConfig {
  region: string;              // AWS region (e.g., "us-east-1")
  modelId: string;             // Model ID (e.g., "anthropic.claude-v2")
  accessKeyId?: string;        // AWS access key (optional)
  secretAccessKey?: string;    // AWS secret key (optional)
  sessionToken?: string;       // Session token for temporary credentials
  agentName?: string;          // Name for xLink identity
  registryUrl?: string;        // Trust registry URL
  verbose?: boolean;           // Enable debug logging
}
Section 08

Supported Models

Anthropic Claude

  • anthropic.claude-v2
  • anthropic.claude-v2:1
  • anthropic.claude-instant-v1
  • anthropic.claude-3-sonnet-20240229-v1:0
  • anthropic.claude-3-haiku-20240307-v1:0

Amazon Titan

  • amazon.titan-text-express-v1
  • amazon.titan-text-lite-v1

Other Models

Most Bedrock models are supported with automatic format detection. If you encounter a model that doesn't work, contact us at contact@private.me.

Example: Using Amazon Titan
const client = new BedrockXLinkClient({
  region: 'us-west-2',
  modelId: 'amazon.titan-text-express-v1'
});

const result = await client.chat('Generate a product description for headphones');
Section 09

Architecture

Component Stack

┌─────────────────────────────┐
│ Your Application            │
└──────────┬──────────────────┘
           │
           ▼
┌─────────────────────────────┐
│ BedrockXLinkClient          │
│ - Auto-generates DID        │
│ - Signs messages            │
│ - Verifies responses        │
└──────────┬──────────────────┘
           │
           ├─────────┬─────────
           │         │
           ▼         ▼
    ┌──────────┐  ┌──────────┐
    │ xLink    │  │ AWS SDK  │
    │ Agent    │  │ Bedrock  │
    └──────────┘  └──────────┘
           │         │
           └─────────┘
                 │
                 ▼
         ┌──────────────┐
         │ AWS Bedrock  │
         │ Claude/Titan │
         └──────────────┘

Message Flow

  1. Application sends message: Call client.chat('query')
  2. xLink signs message: Ed25519 signature added automatically
  3. AWS SDK sends to Bedrock: Standard Bedrock API call
  4. Model processes request: Claude/Titan generates response
  5. Response returned: Includes model output + token usage
  6. Optional verification: Other agents can verify signature

Identity Persistence

xLink identities can be exported and restored across sessions:

Export and Restore
// Export identity
const identity = await client.agent.exportIdentity();
// Store securely (OS keychain, secrets manager)

// Restore later (same DID, same access rights)
const restoredClient = new BedrockXLinkClient({
  region: 'us-east-1',
  modelId: 'anthropic.claude-v2',
  identity: identity.value  // Pass existing identity
});
Section 10

Security Model

Five-Layer Security

  1. Identity Generation: Ed25519 keypair generated using Web Crypto API (FIPS 186-5)
  2. Message Signing: Every message signed before sending to Bedrock
  3. DID Creation: Decentralized identifier follows did:key specification
  4. Signature Verification: Other agents verify signatures cryptographically
  5. Audit Trail: Every message includes DID + timestamp + signature

Security Guarantees

  • Non-repudiation: Agent can't deny sending a signed message
  • Message Integrity: Tampering invalidates signature
  • Identity Persistence: DID survives credential rotation
  • Zero Trust: No reliance on network or infrastructure security
  • Audit Trail: Cryptographic proof of who said what, when

AWS Credential Handling

This library uses standard AWS SDK credential resolution:

  1. Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
  2. Shared credentials file (~/.aws/credentials)
  3. IAM roles (when running on EC2/ECS/Lambda)
  4. Explicit credentials in config (not recommended)
SECURITY NOTE
Private keys stay in memory, never sent to AWS. AWS credentials handled by AWS SDK (not exposed to xLink). Signatures stored separately from AWS metadata.
COMPLIANCE
The cryptographic model supports HIPAA, SOC2, ISO27001, FISMA, and FedRAMP requirements. Actual compliance depends on deployment, audit logging, and operational practices.