Categorygithub.com/ohelal/rdap
modulepackage
1.0.0
Repository: https://github.com/ohelal/rdap.git
Documentation: pkg.go.dev

# README

RDAP Service

License: AGPL v3 Go Report Card Go Reference Go Version Release Build Status codecov

A high-performance Registration Data Access Protocol (RDAP) service implementation in Go, with support for IP addresses, ASNs, and domain lookups. The service includes caching with Redis and event streaming with Apache Kafka.

Features

  • Full RDAP protocol implementation
  • High-performance Go implementation
  • Redis caching for improved response times
  • Kafka integration for event streaming
  • Automatic RDAP bootstrap file updates
  • Docker and Kubernetes ready
  • CLI tool for easy querying

Prerequisites

  • Go 1.22 or later
  • Docker
  • Kubernetes (optional, for deployment)
  • Redis
  • Apache Kafka

Quick Start

Local Development

  1. Clone the repository:
git clone https://github.com/ohelal/rdap.git
cd rdap
  1. Install dependencies:
go mod download
  1. Run Redis and Kafka (using Docker):
docker-compose up -d redis kafka
  1. Build and run the service:
go run ./cmd/rdap/main.go

Running Tests

Run all tests (including integration tests):

go test ./... -v

Run only unit tests (skips integration tests):

go test ./... -v -short

Using Docker

# Build the image
docker build -t rdap:latest .

# Run the container
docker run -p 8080:8080 rdap:latest

Kubernetes Deployment

  1. Apply the Kubernetes manifests:
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/configmap.yaml -n rdap
kubectl apply -f k8s/kafka -n rdap
kubectl apply -f k8s/redis.yaml -n rdap
kubectl apply -f k8s/zookeeper -n rdap
kubectl apply -f k8s/rdap.yaml -n rdap
  1. Get the service URL:
minikube service rdap-service -n rdap --url

Using the CLI

The RDAP service includes a CLI tool for easy querying. For local Minikube deployment, use:

# Get Minikube IP
MINIKUBE_IP=$(minikube ip)

# IP lookup
go run ./cmd/rdap/main.go --base-url http://$MINIKUBE_IP:31080 ip 8.8.8.8

# Domain lookup
go run ./cmd/rdap/main.go --base-url http://$MINIKUBE_IP:31080 domain google.com

# ASN lookup
go run ./cmd/rdap/main.go --base-url http://$MINIKUBE_IP:31080 asn 15169

The service exposes the following ports:

  • HTTP API: 31080
  • Metrics: 31090

Configuration

The service can be configured using environment variables or a configuration file. See the configuration documentation for details.

API Documentation

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the following files for details:

Commercial Use

Commercial use requires explicit written permission from the author. Please contact [email protected] for licensing inquiries.

License Terms

This software is free to use for:

  • Personal projects
  • Open source projects
  • Non-commercial use
  • Educational purposes
  • Research and development

All modifications and distributions must comply with AGPL-3.0 requirements, including:

  • Making source code available
  • Maintaining copyright notices
  • Sharing modifications under AGPL-3.0

Acknowledgments

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Constants

Version is the current version of the RDAP package.