GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - openstack-experimental/keystone: Sandbox Rewrite of OpenStack Keystone in Rust

BranchesTags
Open more actions menu

Latest commit

 

History

1,113 Commits
1,113 Commits

Folders and files

NameName
Last commit message
Last commit date
.cargo
.cargo
 
 
.config
.config
 
 
.github
.github
 
 
crates
crates
 
 
deploy/prometheus
deploy/prometheus
 
 
devstack
devstack
 
 
doc
doc
 
 
fuzz
fuzz
 
 
policy
policy
 
 
supply-chain
supply-chain
 
 
tests
tests
 
 
tools
tools
 
 
.adr-dir
.adr-dir
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CLAUDE.md
CLAUDE.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
Dockerfile
Dockerfile
 
 
Dockerfile.opa
Dockerfile.opa
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
clippy.toml
clippy.toml
 
 
committed.toml
committed.toml
 
 
deny.toml
deny.toml
 
 
dist-workspace.toml
dist-workspace.toml
 
 
docker-compose.yaml
docker-compose.yaml
 
 
gitleaks.toml
gitleaks.toml
 
 
rustfmt.toml
rustfmt.toml
 
 
skaffold-k3s-test.yaml
skaffold-k3s-test.yaml
 
 
skaffold-soak.yaml
skaffold-soak.yaml
 
 
skaffold.yaml
skaffold.yaml
 
 
typos.toml
typos.toml
 
 

Repository files navigation

OpenStack Keystone in Rust

Table of Contents

  • Project documentation
    • Installation guide
    • User documentation
    • Administrator guides
      • CLI documentation
    • Configuration reference
    • Contributor documentation
  • Configuration
  • API and OpenAPI
  • Database
  • Load testing
  • Trying Keystone
  • Talks

The Python Keystone identity service, maintained upstream by the OpenStack community, has served the OpenStack ecosystem reliably for years. It handles authentication, authorization, token issuance, service catalog, project/tenant management, and federation services across thousands of deployments. However, as we embarked on adding next-generation identity features—such as native WebAuthn (“passkeys”), modern federation flows, direct OIDC support, JWT login, workload authorization, restricted tokens and service-accounts—it became clear that certain design and performance limitations of the Python codebase would hamper efficient implementation of these new features.

Consequently, we initiated a project termed “Keystone-NG”: a Rust-based component that augments rather than fully replaces the existing Keystone service. The original plan was to implement only the new feature-set in Rust and route those new API paths to the Rust component, while keeping the core Python Keystone service in place for existing users and workflows.

As development progressed, however, the breadth of new functionality (and the opportunity to revisit some of the existing limitations) led to a partial re-implementation of certain core identity flows in Rust. This allows us to benefit from Rust's memory safety, concurrency model, performance, and modern tooling, while still preserving the upstream Keystone Python service as the canonical “master” identity service, routing only the new endpoints and capabilities through the Rust component.

In practice, this architecture means:

  • The upstream Python Keystone remains the main identity interface, preserving backward compatibility, integration with other OpenStack services, existing user workflows, catalogs, policies and plugins.

  • The Rust “Keystone-NG” component handles new functionality, specifically:

    • Native WebAuthN (passkeys) support for passwordless / phishing-resistant MFA

    • A reworked federation service, enabling modern identity brokering and advanced federation semantics OIDC (OpenID Connect) Direct in Keystone, enabling Keystone to act as an OIDC Provider or integrate with external OIDC identity providers natively JWT login flows, enabling stateless, compact tokens suitable for new micro-services, CLI, SDK, and workload-to-workload scenarios

    • Workload Authorization, designed for service-to-service authorization in cloud native contexts (not just human users)

    • Restricted Tokens and Service Accounts, which allow fine-grained, limited‐scope credentials for automation, agents, and service accounts, with explicit constraints and expiry

By routing only the new flows through the Rust component we preserve the stability and ecosystem compatibility of Keystone, while enabling a forward-looking identity architecture. Over time, additional identity flows may be migrated or refactored into the Rust component as needed, but our current objective is to retain the existing Keystone Python implementation as the trusted, mature baseline and incrementally build the “Keystone-NG” Rust service as the complement.

We believe this approach allows the best of both worlds: the trusted maturity of Keystone's Python code-base, combined with the modern, high-safety, high-performance capabilities of Rust where they matter most.

Documentation

The published documentation uses an audience-first structure inspired by Python Keystone:

  • User documentation covers APIs, authentication, and the client side of each user-visible feature.
  • Administrator guides cover deployment, configuration, policy, storage, operations, and the operator side of each feature.
  • Contributor documentation covers architecture, extension points, testing, security invariants, and contribution requirements.
  • Separate installation and configuration reference sections keep shared material out of audience guides. The CLI documentation is grouped with operator guidance because both commands are administrative tools.

Architecture Decision Records and detailed feature references remain in the documentation book and are linked from the relevant guide instead of being duplicated.

Config

The configuration parser accepts the OpenStack INI format and supports file, site-variable file, and environment overrides. Keystone-NG also defines sections for its Rust-specific services. See the configuration reference for precedence and the current configuration sections.

API + OpenAPI

The OpenAPI document is built directly from the server routers. The generated specification is published at openapi.yaml and can be explored through the Swagger UI.

Database

Sea-ORM is used to access the database. SQLite, PostgreSQL, and MySQL drivers are available. In a parallel Python/Rust deployment, each implementation manages its own schema additions; see Database migrations.

Load test

A very brief load test is implemented in loadtest using Goose framework. It generates test load by first incrementally increasing requests up to the configured amount (defaults to count of the cpu cores), keeps the load for the configured amount of time while measuring the response latency and the throughput (RPS).

For every PR load test suite is being executed. It is absolutely clear that the Rust implementation currently misses certain things original Keystone doe, but the gap is being closed over the time. However test shows difference of factor 10-100 which is already remarkable. New tests will appear to have a more thorough coverage of the exposed API.

Trying

Trying Keystone (assuming you have the Rust build environment or you are in the possession of the binary is as easy as keystone -c etc/keystone.conf -vv

Alternatively you can try it with docker compose -f docker-compose.yaml up.

Talks

Detailed introduction of the project was given as

  • ALASCA tech talk
  • OpenStack Summit 2025

About

Sandbox Rewrite of OpenStack Keystone in Rust

openstack-experimental.github.io/keystone/

Topics

iamkeystoneopenstackrust

Resources

Readme
Apache-2.0 license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

41 stars

Watchers

6 watching

Forks

13 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.