qmetrics.net

Action Policy

Composable authorization framework for Ruby and Rails

Action Policy screenshot

Action Policy provides policy classes and controller helpers to authorize actions in Ruby and Rails apps. It follows a Pundit-like model with rules per resource.

Overview

Action Policy is an authorization framework for Ruby and Rails applications. It centers on resource-specific policy classes, similar in spirit to Pundit, so teams express who may perform which actions in dedicated policy objects rather than scattering checks through controllers.

Setup typically starts from an application-wide base policy with shared configuration, then per-model policies that define rules such as whether a user may update or destroy a record. In Rails, controllers call authorize helpers; failed checks raise an unauthorized error, while views can use predicate helpers to conditionally show UI.

Policies are composable with aliases, pre-checks, and scoping, with Rails integration across controllers, views, and channels. Caching avoids repeating authorization checks unnecessarily within a request. Testing matchers support RSpec and Minitest; failure reasons aid debugging, and error messages can be internationalized.

Non-Rails Ruby projects can integrate authorization as well. The gem is added via Bundler; generators can install the base policy and scaffold resource policies.

Key features

  • Resource-specific policy classes
  • Rails controller authorization
  • View-friendly allowed-to predicates
  • Policy composition and scoping
  • Per-request authorization caching
  • RSpec and Minitest testing matchers
  • Authorization failure reason tracking
  • Non-Rails Ruby usage

Use cases

  • Rails controller access control
  • Scoped database collections per user
  • Fine-grained record update rules
  • Authorization logic in plain Ruby apps

Tags

Similar software

Sa-Token

Java lightweight permission and session framework

Sa-Token adds login, permission checks, SSO, OAuth2, and microservice gateway auth to Java web projects with minimal boilerplate.

★ 19.1k⟳ 10 days agoApache-2.0

Node Jsonwebtoken

Node.js library for signing and verifying JSON Web Tokens

jsonwebtoken implements JWT creation and verification for Node.js using HMAC, RSA, ECDSA, and related algorithms. It exposes sign, verify, and decode helpers built on node-jws.

★ 18.2k⟳ 5 months agoMIT
Application SecurityDesktop/CLI app

OAuth2 Proxy

OAuth2 and OIDC reverse proxy authentication

OAuth2 Proxy sits before web apps as reverse proxy or middleware, sends users through OAuth2 or OIDC login, supports many identity providers, and can forward user details to upstream apps as headers

★ 15.4k⟳ 19 days agoMIT

SuperTokens

Open-source user login and session management

SuperTokens adds sign-up, sign-in, and session handling to applications through frontend SDKs, backend SDKs, and a core HTTP auth service.

★ 15.3k⟳ todayApache-2.0 · open core
Open Source Alternative to:Amazon CognitoAuth0+2

Casdoor

Self-hosted identity provider with SSO and agent MCP gateway

Casdoor is an IAM server with a web console for users, apps, and providers. It issues tokens via OAuth, OIDC, SAML, CAS, LDAP, SCIM, and WebAuthn, and exposes an MCP gateway for AI tooling

★ 15k⟳ 2 days agoApache-2.0
Open Source Alternative to:Amazon CognitoAuth0+3

CASL

Isomorphic TypeScript authorization for apps and APIs

CASL limits which resources a user may access using declarative rules shared across frontend, backend, and database layers.

★ 7.1k⟳ 4 days agoMIT
Application SecurityDesktop/CLI app