Skip to content

Add ngauth OAuth/OIDC server module#174

Open
yaodintsov wants to merge 1 commit intotestcontainers:mainfrom
yaodintsov:add-ngauth-module
Open

Add ngauth OAuth/OIDC server module#174
yaodintsov wants to merge 1 commit intotestcontainers:mainfrom
yaodintsov:add-ngauth-module

Conversation

@yaodintsov
Copy link
Copy Markdown

Module: ngauth

Adds support for ngauth, a lightweight OAuth 2.0 and OpenID Connect server designed for integration testing.

Why ngauth?

  • Fast & Lightweight: 2-3 second startup, ~50MB memory usage, 171MB Docker image
  • Zero Configuration: Works out-of-the-box with sensible defaults
  • Full Standards Compliance: OAuth 2.0 (RFC 6749) and OpenID Connect 1.0
  • Testing Focus: Designed specifically for integration testing and development
  • Multi-Language Support: Examples provided for Java, .NET, Python, Go, and Node.js

Features

  • Authorization Code Flow with PKCE
  • Client Credentials Flow
  • Dynamic Client Registration (RFC 7591)
  • JWT tokens with RS256 signing
  • OIDC Discovery and JWKS endpoints
  • Health check endpoints (/health/ready, /health/live)
  • Rate limiting and security features
  • Comprehensive audit logging

Quality Metrics

  • ✅ 174 automated tests (100% passing)
  • ✅ Production-ready v1.0.0 release
  • ✅ Comprehensive documentation and CHANGELOG
  • ✅ Examples in 5 programming languages
  • ✅ Active maintenance and support
  • ✅ MIT License

Repository Information

Example Usage

Java

@Container
static GenericContainer<?> ngauthServer = new GenericContainer<>("ngauth/server:1.0.0")
    .withExposedPorts(3000)
    .waitingFor(Wait.forHttp("/health/ready").forStatusCode(200));

Node.js

const container = await new GenericContainer('ngauth/server:1.0.0')
  .withExposedPorts(3000)
  .withWaitStrategy(Wait.forHttp('/health/ready', 3000))
  .start();

Python

with GenericContainer("ngauth/server:1.0.0") \
        .with_exposed_ports(3000) \
        .with_wait_strategy(HttpWaitStrategy("/health/ready", port=3000)) as container:
    # Use the container

See full examples for all languages.

Use Cases

  • Integration Testing: Test OAuth/OIDC clients in automated tests
  • Development: Local OAuth server for app development
  • CI/CD: Fast, disposable OAuth server in pipelines
  • Learning: Study OAuth 2.0 and OIDC implementations
  • Prototyping: Quick OAuth server for demos and POCs

Comparison to Alternatives

Feature ngauth Keycloak WireMock OAuth
Startup Time 2-3s 30-60s 5-10s
Memory Usage ~50MB ~500MB ~100MB
Full OIDC
Zero Config ⚠️
Production Use Testing only Testing only

Checklist

  • Module descriptor follows YAML schema
  • Docker image is publicly available on Docker Hub
  • Documentation is comprehensive
  • Examples provided for Java, Node.js, Python, Go, .NET
  • Repository has MIT license
  • Project is actively maintained
  • Version 1.0.0 released and stable
  • Health checks implemented
  • GitHub release created with notes

Additional Information

This module fills a gap in the Testcontainers ecosystem by providing a fast, lightweight OAuth/OIDC server specifically designed for testing. Unlike Keycloak (which is excellent for production but heavy for testing) or WireMock (which lacks full OIDC support), ngauth offers the perfect balance of features and performance for integration tests.

The project has been in development since January 2026 and reached production-ready status with comprehensive testing, documentation, and multi-language support.


Thank you for considering this submission! Happy to address any feedback or questions.

ngauth is a lightweight OAuth 2.0 and OpenID Connect server perfect for integration testing.

Features:
- Full OAuth 2.0 and OIDC compliance (RFC 6749, OIDC Core 1.0)
- Fast startup (2-3s) and minimal resources (~50MB memory, 171MB image)
- Zero configuration required - works out-of-the-box
- RS256 JWT signing with JWKS discovery
- Dynamic client registration (RFC 7591)
- Examples in Java, .NET, Python, Go, and Node.js
- 174 automated tests (100% passing)
- Production-ready v1.0.0 release

Perfect for:
- Integration testing with Testcontainers
- Development environments
- CI/CD pipelines
- Learning OAuth 2.0 and OIDC

Repository: https://github.com/ngauth/server
Docker Hub: https://hub.docker.com/r/ngauth/server
Documentation: https://github.com/ngauth/server#readme
@mdelapenya
Copy link
Copy Markdown
Member

@yaodintsov thanks for sending this PR, unfortunately, the modules catalog is a collection of modules of the given technology, so we'd need you to create dedicated testcontainers modules for all the languages you added in the description.

Once created, we can link them here. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants