EndPointBlank for Ruby and Rails

Authorize service-to-service calls and report every request from Rails, Sinatra or any Rack app. Add the end_point_blank gem and one configure block.

Package
end_point_blank
Requires
Ruby 3.3 or later
Works with
Rails, Sinatra and any Rack app

1. Install

Published on RubyGems.

# Gemfile
gem "end_point_blank"

2. Configure and report every request

Use the client ID and secret of an application environment you created in EndPointBlank.

EndPointBlank.configure do |config|
  config.client_id     = ENV["ENDPOINTBLANK_CLIENT_ID"]
  config.client_secret = ENV["ENDPOINTBLANK_CLIENT_SECRET"]
  config.app_name      = "orders-service"
end

In a Rails app that is all: a railtie inserts the reporting middleware after ActionDispatch::DebugExceptions, so every request and response is reported and exceptions are captured. In Sinatra or plain Rack, add use EndPointBlank::Middleware::Rack::ReportInteraction yourself.

3. Protect a route

class OrdersController < ApplicationController
  include EndPointBlank::Rails::Authorized
  include EndPointBlank::Rails::Versioned

  version ["v1", "v2"], only: [:index]
end

Authorized checks each inbound call against your grants before the action runs and raises EndPointBlank::UnauthorizedError when it is refused; rescue it in ApplicationController to choose the response.

Next

The README covers every setting: masking rules, the authorization cache, authorizing outbound calls and the management API client. The quickstart walks through creating the application and credentials this page assumes.

Ready to deprecate with confidence?

Sign up in under a minute. No credit card, no sales call.