Freeradius OIDC

Published
Length
3 min read

Luis Felipe Dias

All posts

A freeradius oidc setup links traditional network login servers to modern identity providers. You do this by running an external helper script or module during login. Many teams use this setup to keep one source of user identities. It lets network switches and wireless tools check cloud user accounts. Still, teams often map entire user groups to broad network permissions. When roles are too wide, any logged-in user can reach sensitive servers. A single stolen token can then expose internal datab

K8s OIDC Authentication: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

A freeradius oidc setup links traditional network login servers to modern identity providers. You do this by running an external helper script or module during login. Many teams use this setup to keep one source of user identities. It lets network switches and wireless tools check cloud user accounts. Still, teams often map entire user groups to broad network permissions. When roles are too wide, any logged-in user can reach sensitive servers. A single stolen token can then expose internal databases and hosts.

How a freeradius oidc workflow operates

FreeRADIUS speaks the RADIUS protocol, which relies on older packet formats. OpenID Connect uses web redirects and JSON tokens over standard HTTPS. Because these two protocols differ, the server cannot run web flows alone. Instead, the server passes the login request to an external script. That helper program talks to the identity provider over the web.

Most setups use either a password grant or a device code flow. In a password flow, the user types a username and password. The RADIUS server sends those details to the identity provider token endpoint. The provider checks the user and sends back a signed token. The helper script reads the group claims inside that token. Finally, the RADIUS server grants or denies network entry based on groups.

In a device flow, the user gets a short code to verify. They open a browser and log in with their cloud account. Meanwhile, the RADIUS module polls the identity provider until login succeeds. This approach supports multi-factor checks much better than basic password flows. Once verified, the server places the user on the right network segment.

Managing token checks and group mappings

Setting up this link requires careful handling of network timeouts. RADIUS clients expect a fast reply within a few seconds. Web calls to cloud identity providers can take longer during peak hours. If the user must approve a push prompt, the request might fail. Admins must tune timeout settings on both the switch and server.

Teams also need a clear way to map claims to network roles. Identity tokens carry group names, job titles, and email addresses. The RADIUS server reads these fields and picks a network VLAN. If a user belongs to the engineering group, they get prod access. Yet group names often change inside the identity provider over time. When a group name shifts, the network rule can fail or misroute users.

Caching tokens helps speed up repeat logins across wireless access points. Without a local cache, every roam event triggers a new web call. High traffic can hit rate limits set by the cloud identity provider. A short cache stores the valid state for a few minutes. Still, admins must keep cache times short so revoked users lose entry fast.

K8s OIDC Authentication: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What network login solves and what keeps the session active

Linking network admission to your cloud directory solves account sprawl. Admins no longer maintain separate password files on local RADIUS servers. When a worker leaves the company, disabling one cloud account blocks network entry. It also brings multi-factor checks to legacy VPNs and office networks.

Still, network login only decides who gets onto the wire or VPN. Once the RADIUS server approves the session, its job is done. It cannot see what queries a user runs against a database. It does not check which commands an engineer types on a host. Network segments group many databases and servers into one flat zone.

A user on that segment still needs separate database or server keys. Teams often share static database passwords among everyone on the network. Moreover, RADIUS logs only show when a device joined the network. They do not record SQL statements, kubectl commands, or read results. Sensitive fields like emails, phone numbers, card numbers, and national IDs stay exposed. To control real actions, teams must govern sessions at the command level.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Can FreeRADIUS speak OpenID Connect without extra modules?

No, the core server only handles RADIUS packets and standard directory lookups. You must use an external script or rest module to call OIDC endpoints.

How does multi-factor login work with a freeradius oidc setup?

The server triggers a push prompt or uses a device flow link. The user approves the login on their phone before the RADIUS check finishes.

Does OIDC network login control database queries after a user connects?

No, RADIUS only grants entry to the network or VPN tunnel. It cannot inspect, log, or restrict database queries or shell commands in flight.

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.