Skip to main content

Hardware-anchored identity SDK for AI agents -- 1id.com

Project description

oneid-sdk

Python SDK for 1id.com -- hardware-anchored identity for AI agents.

RFC: draft-drake-email-hardware-attestation-00

Quick start

import oneid

# Enroll at declared tier (no HSM needed, always works)
identity = oneid.enroll(request_tier="declared", display_name="Sparky")
print(f"Enrolled: {identity.handle}")
print(f"URN: {identity.agent_identity_urn}")

# Get an OAuth2 token for API access
token = oneid.get_token()
headers = {"Authorization": f"Bearer {token.access_token}"}

# Check identity
me = oneid.whoami()
print(f"I am {me.handle}, trust tier: {me.trust_tier.value}")

Hardware-backed enrollment

# TPM enrollment (sovereign tier) - requires Windows/Linux with TPM 2.0
identity = oneid.enroll(request_tier="sovereign")

# YubiKey enrollment (portable tier) - requires YubiKey 5 inserted
identity = oneid.enroll(request_tier="portable")

# Virtual TPM (VMware/Hyper-V/QEMU)
identity = oneid.enroll(request_tier="virtual")

Trust tiers

Tier Hardware Sybil Resistant Trust Level
sovereign TPM (Intel, AMD, Infineon) with valid cert Yes Highest
portable YubiKey / Nitrokey / Feitian with PIV attestation Yes High
virtual VMware / Hyper-V / QEMU vTPM No Verified Hardware
declared None (software keys) No Software

request_tier is a requirement, not a preference. You get exactly what you ask for, or an exception. No silent fallbacks.

Key algorithms

Like SSH, agents can choose their preferred key algorithm for declared-tier enrollment:

identity = oneid.enroll(request_tier="declared", key_algorithm="ed25519")     # default, strongest
identity = oneid.enroll(request_tier="declared", key_algorithm="ecdsa-p384")  # NIST P-384
identity = oneid.enroll(request_tier="declared", key_algorithm="rsa-4096")    # RSA compat

Installation

pip install oneid

Requires Python 3.10+.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oneid-1.3.8.tar.gz (103.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oneid-1.3.8-py3-none-any.whl (84.9 kB view details)

Uploaded Python 3

File details

Details for the file oneid-1.3.8.tar.gz.

File metadata

  • Download URL: oneid-1.3.8.tar.gz
  • Upload date:
  • Size: 103.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for oneid-1.3.8.tar.gz
Algorithm Hash digest
SHA256 c09fc0c98da725e2d00b6cb5bda698065d8ef515a4e97a54f0059e032f18ab69
MD5 728b58b88dcfe5b33bf8385fb09630f6
BLAKE2b-256 12fc0df5103d499c7b0169276136bdbaa993e262e5c66c4ed10f731c557b1614

See more details on using hashes here.

File details

Details for the file oneid-1.3.8-py3-none-any.whl.

File metadata

  • Download URL: oneid-1.3.8-py3-none-any.whl
  • Upload date:
  • Size: 84.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for oneid-1.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c1d3c1edd06e162452e960add87bcd13aae89b9b15fd8f266cc7f96f482ccf07
MD5 cb9136422493b9408057bf15896b4370
BLAKE2b-256 1f0adb8997e1d7c5004ad9cf7f47a6e7c607599980156361ae4e047e0569aba5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page