# README
RDAP Service
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
- Clone the repository:
git clone https://github.com/ohelal/rdap.git
cd rdap
- Install dependencies:
go mod download
- Run Redis and Kafka (using Docker):
docker-compose up -d redis kafka
- 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
- 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
- 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - 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:
- LICENSE - Full AGPL-3.0 license text
- COPYING - Additional terms and conditions
- AUTHORS - List of contributors
- CODE_OF_CONDUCT.md - Community guidelines
- CONTRIBUTING.md - Contribution guidelines
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