Self-hosted IAM

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up self hosted iam by running an open identity server on your hardware. This central system checks user logins and maps each person to a set of roles. Teams often start by linking their main user list to internal apps and servers. Over time, admins grant broad roles so engineers can fix urgent bugs faster. Those wide roles stay active long after the ticket closes. Soon, many people hold full admin keys to live data stores and cloud hosts. How a self hosted iam architecture works A sel

Self-Service Access Portals + AWS IAM Policies: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up self hosted iam by running an open identity server on your hardware. This central system checks user logins and maps each person to a set of roles. Teams often start by linking their main user list to internal apps and servers. Over time, admins grant broad roles so engineers can fix urgent bugs faster. Those wide roles stay active long after the ticket closes. Soon, many people hold full admin keys to live data stores and cloud hosts.

How a self hosted iam architecture works

A self hosted iam platform runs inside your private network or virtual cloud. It stores user accounts, group rules, and login keys in a backing database. When an engineer opens an internal tool, the tool asks the identity server for proof. The user enters a password and a second code to log in. Then the identity server signs a token that lists the user groups and roles.

Downstream apps read this signed token to see what the user can do. You can link the server to your existing directory so team changes sync on schedule. Admins group users by job function, such as backend developers, data analysts, or support staff. Each group maps to a role inside your cloud consoles, code hosts, and cluster tools. When someone leaves the company, you disable one account to stop new logins everywhere. Your security team keeps full control over the user store and its backup schedule. No outside vendor holds your login logs or user secrets.

What native identity roles solve and where gaps remain

Running your own identity server solves the problem of scattered accounts across dozens of servers. You no longer need to create local users on every single Linux box or database. It also gives you one place to enforce strong passwords and hardware keys. Auditors can review one group list to see who can log in to production.

Still, an identity server only checks who a user is at the moment they log in. Once the database or server accepts the role, the identity system steps out of the way. It cannot see the actual queries or shell commands that run inside the session. If a developer role allows table reads, that person can pull every customer row at once. Raw emails, phone numbers, and card numbers flow straight to the local screen. If a role allows writes, one bad command can drop a live table in seconds. Shared database users make this worse because many people share one native role. The database log shows the shared role name instead of the real person who ran the query.

Self-Service Access Portals + AWS IAM Policies: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Keeping role scope tight in daily operations

To reduce risk, teams try to split broad roles into smaller, task-specific profiles. You might build separate read roles for each database schema or service group. You also set short token lifetimes so users must log in again each work day. Regular reviews help managers spot and remove old group assignments that engineers no longer need.

Still, splitting roles in a directory takes constant work as new tables and services appear. Engineers get blocked when their standard role lacks a small right for a production check. Admins then fall back to granting temporary admin groups by hand during busy shifts. Without controls on the live session itself, directory roles remain a blunt tool for safety.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits inline in the protocol beside the service as an open-source proxy, a sidecar for your database or API. On every production query an agent or human runs, hoop.dev decides whether to pass, mask, block, or escalate it for review.

Before a query runs, hoop.dev guardrails check the statement against your rules, an AI Analyzer you configure can score intent or hold risky calls for human approval, and hoop.dev data masking rewrites sensitive fields in responses in memory. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Why do teams run their own identity server instead of a cloud service?

Teams self-host identity tools to keep user data inside their own private networks. This setup also lets internal apps work even if the public internet goes down.

How do you prevent data leaks during a self-hosted identity outage?

You run at least two identity server nodes behind a load balancer with database backups. If one node fails, the second node handles user logins without dropping active sessions.

Can an identity server filter out sensitive columns inside a SQL query?

No, an identity server only handles the initial login and passes role claims to the app. It does not read or rewrite SQL queries or mask fields like national IDs.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.