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

Keycloak

Identity and access management for applications and services

Keycloak adds authentication and single sign-on to applications so they do not store or verify users themselves. It supports standard protocols and central admin tools.

  • Single sign-on across applications
  • OpenID Connect, OAuth 2.0, and SAML
  • Social login and identity brokering
JavaDockerDetails →
★ 38.2k⟳ todayApache-2.0
Open Source Alternative to:Amazon CognitoAuth0+7

JumpServer

Open-source bastion host for privileged access

JumpServer is a privileged access management platform that unifies secure access to SSH, RDP, Kubernetes, databases, and web assets.

  • SSH and RDP session access
  • Kubernetes pod connections
  • Database connector via web
PythonWeb, Linux, DockerDetails →
★ 32.1k⟳ todayGPL-3.0
Open Source Alternative to:BeyondTrust

Better Auth

Composable TypeScript authentication and authorization framework

Better Auth is a framework-agnostic authentication and authorization framework for TypeScript. You configure it in code and extend it with plugins for flows like social login, organizations, and enterprise SSO.

  • TypeScript auth configuration in code
  • Email and password sessions
  • Social OAuth providers
TypeScriptDetails →
★ 31k⟳ todayMIT
Open Source Alternative to:Amazon CognitoAuth0+3

Authelia

Self-hosted SSO portal with multi-factor authentication

Authentication and authorization server that sits in front of reverse proxies. Provides a web portal for login, OpenID Connect, and granular access rules with several second-factor methods.

  • OpenID Connect and OAuth 2.0 provider
  • WebAuthn passkeys and FIDO2 keys
  • TOTP and Duo push second factors
GoWeb, DockerDetails →
★ 29.8k⟳ 2 days agoApache-2.0
Open Source Alternative to:Amazon CognitoAuth0+7

Auth.js

Web authentication libraries for JavaScript frameworks

Auth.js (NextAuth) adds sign-in, sessions, and OAuth to modern JavaScript apps. Packages target Next.js, SvelteKit, Express, Qwik, and other runtimes.

  • OAuth 2.0 and OIDC providers
  • Email and passwordless sign-in
  • WebAuthn passkey support
TypeScriptDetails →
★ 28.4k⟳ 4 months agoISC
Open Source Alternative to:Amazon CognitoAuth0+4

authentik

Self-hosted identity provider for SSO protocols

authentik centralizes authentication with SAML, OAuth2, OIDC, LDAP, RADIUS, and related flows. It targets small labs through production clusters you deploy yourself.

  • SAML and OAuth2/OIDC
  • LDAP and RADIUS
  • Application proxy
PythonDockerDetails →
★ 26.6k⟳ todayMIT · open core
Open Source Alternative to:Amazon CognitoAuth0+7