Skip to content
Valkyrie/tech

//Documentation · v1

Build on Valkyrie

Everything a department's engineering team needs to put a system behind Sentinel, move its data into Vault and run an exam through ExamShield.

Introduction

Valkyrie exposes one REST API at https://api.valkyrie.example/v1 and SDKs for TypeScript, Python and Java. Every request is authenticated, every response carries an audit ID, and every write lands in the hash-chained ledger before it is acknowledged.

Workspaces map to departments. A workspace owns its systems, its officers and its encryption keys; nothing is shared across workspaces unless both sides sign a data-sharing policy.

Quickstart

Install the SDK and register your first system. You need a workspace admin token from the dashboard.

Terminalbash
npm install @valkyrie/sdk
export VALKYRIE_TOKEN="vk_admin_…"
register-system.tsts
import { Valkyrie } from "@valkyrie/sdk";

const vk = new Valkyrie({ token: process.env.VALKYRIE_TOKEN });

const system = await vk.systems.create({
  name: "results-publisher",
  environment: "production",
  scopes: ["read", "deploy"],
  credentialTtl: "15m",
});

console.log(system.id, system.auditId);
New systems start in needs_review. A second admin must approve them before any credential is issued. The two-person rule is on by default and can't be switched off in production.

Authentication

Officers sign in with a FIDO2 security key or a one-time code. Services authenticate with short-lived credentials minted by Sentinel; the default lifetime is 15 minutes and the maximum is 60.

Exchange a service credentialhttp
POST /v1/sentinel/token
Authorization: Bearer vk_svc_…
Content-Type: application/json

{ "system": "sys_01HX…", "scope": ["read"], "ttl": "10m" }

Sentinel policies

Policies decide who can do what, on which system, from where and when. They are written in JSON, versioned, and evaluated on every request in under two milliseconds at the gateway.

policy.jsonjson
{
  "system": "exam-paper-vault",
  "allow": [
    { "role": "exam_controller", "actions": ["read"], "hours": "08:00-18:00", "network": "nic-intranet" },
    { "role": "custodian", "actions": ["unseal"], "quorum": 3 }
  ],
  "deny": [{ "role": "vendor", "actions": ["*"] }]
}

Vault keys & residency

Vault encrypts each sensitive field with its own data key, wrapped by a master key in a hardware security module the department controls. Valkyrie staff can operate the service but cannot decrypt the data.

  • Primary and replica regions are both inside India; you choose the pair at workspace creation.
  • Master keys rotate every 90 days by default; data keys rotate on every write.
  • Key ceremonies need a quorum of custodians: three of five unless you configure otherwise.

ExamShield custody

A paper is encrypted the moment it is finalised. Its key is split between custodians and recombined only when the time lock opens at each centre. Every hand-off (setter, moderator, printer, centre) is a signed event in the custody chain.

Time locks use the exam board's own NTP sources. If a centre's clock drifts more than 30 seconds, ExamShield refuses to unseal and alerts the control room.

Audit API

Query the ledger by system, officer or time range. Exports come pre-formatted for CERT-In incident reports so you can file inside the six-hour window.

Export the last six hoursbash
curl https://api.valkyrie.example/v1/audit/export \
  -H "Authorization: Bearer $VALKYRIE_TOKEN" \
  -d since=6h -d format=cert-in

Webhooks

Subscribe to session.revoked, policy.violated, key.rotated and custody.broken. Payloads are signed with Ed25519; verify the Valkyrie-Signature header before acting on one.

Rate limits

Each workspace gets 1,200 requests per second by default, adjustable per gateway from the dashboard. Responses over the limit return 429 with a Retry-After header.

Need a hand integrating? Your briefing includes an engineer.

Request a briefing