0.0
The project is in a healthy, maintained state
Intercepts and protects Rack-based Ruby web applications (Rails, Sinatra) using the Relintio WAF rules synchronizer.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 2.0, < 4.0
 Project Readme

Relintio WAF Protection Agent SDK (Ruby)

Official Ruby WAF integration for Rack-based web frameworks (Sinatra, Rails, Hanami).

Installation

Add the gem to your application's Gemfile:

gem 'relintio-agent', github: 'Relintio/relintio-ruby-agent'

Dashboard Deployment Workflow

  1. Open Dashboard → Deployment, select Ruby, and choose Rails or Sinatra.
  2. Download the prepared starter and insert the Relintio Rack middleware before the application.
  3. Restart the Rack server, then open one public route.
  4. Enter that exact URL or public IP endpoint in Relintio and select Verify target.

The SDK reports runtime kind ruby and its version during rule synchronization. Policy revisions are received automatically.

And then execute:

bundle install

Features

  • Rule Cache Sync: Periodically syncs active rules in a thread-safe background thread.
  • WAF Check Engine: Instant threat analysis against local cached rules.
  • Rack Middleware: Standard Rack integration supporting all major Ruby web frameworks.
  • Telemetry Loop: Non-blocking telemetry reporting back to the Relintio console.

Quickstart

Sinatra Integration

# config.ru
require 'sinatra'
require 'relintio-agent'

class App < Sinatra::Base
  get '/' do
    "Protected App"
  end
end

# Initialize Relintio Agent
agent = Relintio::Agent.new(
  license_key: "YOUR_LICENSE_KEY",
  domain: "example.com",
  api_url: "https://api.relintio.com/v1"
)
agent.start_sync

# Register Relintio Middleware
use Relintio::Middleware, agent

run App

Rails Integration

Add the middleware in your Rails configuration:

# config/application.rb
module YourApp
  class Application < Rails::Application
    # Initialize Relintio Agent
    config.after_initialize do
      $relintio_agent = Relintio::Agent.new(
        license_key: ENV['RELINTIO_LICENSE_KEY'] || 'YOUR_LICENSE_KEY',
        domain: ENV['RELINTIO_DOMAIN'] || 'example.com'
      )
      $relintio_agent.start_sync
    end

    # Register Rack Middleware
    config.middleware.use Relintio::Middleware, -> { $relintio_agent }
  end
end