OIDC Support

Published
Length
3 min read

Luis Felipe Dias

All posts

To enable oidc support, link your identity provider to your internal tools using OpenID Connect. This setup lets engineers log in with one work account instead of static passwords. Most teams map identity groups to broad database or server roles during setup. Broad roles make setup fast, but they give users too much power after login. One bad query or command can still change or delete live data. How oidc support works in a standard setup OpenID Connect sits on top of the OAuth 2.0 protocol.

K8s OIDC Authentication + Customer Support Access to Production: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

To enable oidc support, link your identity provider to your internal tools using OpenID Connect. This setup lets engineers log in with one work account instead of static passwords. Most teams map identity groups to broad database or server roles during setup. Broad roles make setup fast, but they give users too much power after login. One bad query or command can still change or delete live data.

How oidc support works in a standard setup

OpenID Connect sits on top of the OAuth 2.0 protocol. It checks who a user is before they enter a system. First, an engineer tries to log in to an internal app or database tool. The tool sends the user to the central identity provider. The provider checks the user's password and multi-factor prompt. Once checked, the provider issues a signed JSON Web Token, called an ID token.

This token holds claims about the user, such as their email and group list. The target system reads the public keys from the provider to check the signature. If the signature matches, the system trusts the claims inside the token. It then maps the user's group claim to a local role. That local role sets what the user can read or write during the session.

Planning group claims and token lifetimes

Good setup starts with clean group names in your identity provider. Teams often create groups based on job titles, like backend engineers or data analysts. When you set up the provider, you pick which claims go into the token. Keep the token small by sending only the groups needed for that specific tool. Some tools fail to read tokens if a user belongs to hundreds of groups.

You also need to set a clear lifetime for each ID token and refresh token. Short token lifetimes limit the risk if an attacker steals a session file. If a user leaves the company, you revoke their account in the central provider. Once the active token expires, the user can no longer start a new session. Still, any open database or server session might stay alive until the connection drops.

K8s OIDC Authentication + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native login setup solves and what it misses

Adding OpenID Connect removes the need to share static passwords across the engineering team. You do not have to rotate shared keys every time someone changes teams. Central login logs also show you who logged in and when they did it. This helps security teams pass basic audit checks for user login controls.

Still, identity providers only check the user at the front door. Once the session starts, oidc support does not watch what commands the user runs. A developer with a valid token and a write role can still drop a table. They can also run a broad query that pulls thousands of customer card numbers. Standard role mapping cannot pause a single risky command for peer review. It also cannot rewrite sensitive fields like emails or phone numbers in query results. To control actions in flight, you need controls that work at the command level.

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 beside the service as an open-source proxy, a sidecar for your database or API.

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 review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

What is the difference between OIDC and SAML?

Both protocols let users log in with a central identity provider. SAML uses heavy XML files and works mostly for older web apps. OpenID Connect uses light JSON tokens and works well for modern apps and CLI tools.

Does OIDC replace database roles and permissions?

No, OpenID Connect only checks who the user is during login. The database still uses its own internal roles to allow or block table reads. You must map identity claims to those local roles during setup.

How do short token lifetimes affect active sessions?

A short token lifetime forces the client tool to check in with the provider often. If an admin blocks the user, the next token check fails. Existing long-lived connections may still run until the server closes them.

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.