Locking down the LiteLLM Admin UI

Close the default LiteLLM admin sign-in paths before go-live: SSO for every administrator, disabled username, password and master key login, trusted proxy ranges and the master key kept out of applications.

On this page

Why the LiteLLM Admin UI needs locking down before go-live

A self-hosted LiteLLM gateway can answer requests correctly and still leave its admin paths open. Before production, two things must close: every administrator signs in through SSO, and the username, password and master key sign-in paths are disabled once that works. The admin UI is where virtual keys, per-key and per-team budgets, model restrictions, spend reports and request logs are created and changed, so anyone who can reach it with a weaker credential can change who gets access to which models and how much they can spend. The default settings are built for getting a proxy running, not for controlling who administers it.

This matters most when more than one person administers the gateway, when platform, security and finance staff each need a view of spend and logs, or when the gateway is reachable from a corporate network rather than a single engineer's laptop. Every extra administrator with a local account is another credential to issue, rotate, revoke and audit. The master key is the most sensitive of these, because it works at the level of full administration. The reader should confirm which identity provider will front the admin UI, which people will hold administrator roles, and how a departing administrator's access will be removed in that provider rather than in LiteLLM alone.

Login protection also depends on the network path. Failed sign-ins are limited per source address only when general_settings.trusted_proxy_ranges lists the load balancer or ingress ranges in front of the proxy. Without that setting, only a weaker per-username limit applies, so a guessing attempt can rotate usernames and avoid the throttle. Before go-live, confirm the actual CIDR ranges of your load balancer or ingress with your platform team, test that a failed sign-in from one address is counted, and keep the master key in a secret manager rather than in application configuration. The LiteLLM production best practices page is the next read for these settings.

How administrator sign-in paths fit together

The diagram starts with an administrator reaching the load balancer or ingress, which is the trust boundary. Traffic then passes to the LiteLLM proxy, where the SSO login through the identity provider is the only path that should remain open for administrators. The trusted_proxy_ranges setting tells the proxy which upstream addresses to trust, so failed sign-ins are rate limited by source address. The disabled environment credential login is drawn as a blocked path. Check that each administrator can sign in through SSO before that path is turned off.

Administrator sign-in paths through the ingress, identity provider and LiteLLM proxy.

Which sign-in paths to close and why

A LiteLLM gateway can accept administrator sign-in through several routes at once, and each one bypasses the others' controls. Closing them in a deliberate order leaves one identity path that your identity provider governs, with a short list of break-glass steps you can document and test.

SSO for every administrator

Single sign-on through Google, Microsoft Entra ID, Okta or a generic OIDC provider is the path you want to keep. It ties each administrator to a named identity, so offboarding in your directory removes Admin UI access too. Before you close anything else, confirm that every administrator can sign in through SSO and that the roles they receive match what they need. Note that SSO is free for up to 5 users from v1.76.0, and an Enterprise license is needed beyond that.

Admin UI SSO docs

Username and password login

Local username and password accounts sit outside your identity provider, so they keep working after a person leaves the organization and they lack your multi-factor policy. Find every local admin account, remove it or disable it, and check that no shared accounts remain. Confirm this with a sign-in attempt from a clean session after the change, not only from the configuration file.

Master key login

The LITELLM_MASTER_KEY grants full administrative rights and does not map to any person, so anyone holding it can change routes, keys and budgets. It should live in a secret manager, not in application code, CI variables or shared notes. After SSO works, restrict who can read the key and record each time it is used for break-glass access. Keep it out of the applications that call the gateway, which should use virtual keys instead.

Production best practices

Environment credential login

The environment-variable credential login accepts sign-in with credentials supplied through the process environment. LiteLLM recommends connecting an identity provider, checking that each administrator can sign in with SSO, and then setting disable_env_credential_login: true. Apply the change only after that check passes, and retest a sign-in after each restart or configuration reload, because a rollback can silently re-enable the path.

Moving from OSS guide

Unauthenticated and Swagger routes

Some API paths, including the interactive API documentation, can be reached without authentication if they are left open. Exposed documentation shows an attacker the admin endpoints to target. Restricting these routes and hiding the docs belongs to the route restriction work, which needs the Enterprise license. For this step, list which routes answer without a token from outside your network and confirm that the list matches your planned public and admin-only routes.

How to lock down admin sign-in in order

This sequence moves the LiteLLM Admin UI from shared credentials to identity-provider sign-in, with each administrator confirmed before password and master key login is switched off. It also makes failed sign-in limits work per source address and keeps the master key out of applications. Run the steps in order, because disabling the fallback logins too early can lock out the only people who can fix the gateway.

  1. Confirm SSO eligibility for your edition

    Before any configuration, the platform owner confirms the LiteLLM version and license that will run in production. From v1.76.0, SSO for the Admin UI is free for up to 5 users, and an Enterprise license is needed beyond that. Check the running version in the deployment manifest and the licensing position with the vendor before you plan the user count. Done means the team has written down the edition, the version and the number of administrators who will sign in through SSO.

  2. Register the gateway with your identity provider

    The identity administrator creates an application in Google, Microsoft Entra ID, Okta or a generic OIDC provider, using the redirect URL that the LiteLLM SSO guide specifies for your proxy's public admin address. Assign a named group of administrators to the application so access is managed in the identity provider, not in the gateway. Done means the application exists, the redirect URL matches the proxy hostname exactly, and the client ID and secret are recorded in your secret manager, not in a config file.

  3. Enable SSO on the proxy and test one sign-in

    The platform engineer adds the SSO settings from the LiteLLM admin UI SSO documentation to the proxy configuration, with the client secret supplied from the secret manager at runtime. Redeploy, open the Admin UI in a private browser session and sign in with a test administrator account. Done means the sign-in completes, the user lands in the Admin UI with the expected role, and the proxy logs show the SSO login. If it fails, roll back by restoring the previous configuration, since password and master key login still work at this stage.

  4. Verify every administrator can sign in through SSO

    Each person who needs admin rights signs in through the identity provider and confirms they can open the pages they need, such as key, team and budget management. Record the result per person, and resolve missing group assignments or role mappings in the identity provider before going further. Keep at least one administrator with a documented recovery path, and make sure the credential custodian knows where the master key sits. Done means every named administrator has a successful SSO sign-in on file.

  5. Disable username, password and master key login

    Once every administrator has signed in through SSO, the platform owner sets disable_env_credential_login to true in the proxy configuration and redeploys. Then open the Admin UI login page and attempt a password and a master key sign-in using a test account, which should be refused. Done means both fallback logins are rejected while SSO still works. Rollback for a locked-out administrator: set the key back to false through the same configuration path, redeploy, sign in, then fix the identity problem before trying again.

  6. Set trusted proxy ranges for login rate limiting

    The network team provides the CIDR ranges of the load balancer or ingress that sits in front of the proxy, and the platform engineer adds them under general_settings.trusted_proxy_ranges. Without this setting, LiteLLM applies only a weaker per-username limit on failed Admin UI sign-ins. From a test host outside the ranges, submit repeated failed sign-ins and confirm the per-source limit blocks further attempts, and check that logs record the client address, not the load balancer address. If the logs show the ingress address, correct the ranges before relying on the control.

  7. Move the master key into a secret manager

    The platform owner stores LITELLM_MASTER_KEY, which must start with sk-, in the organization's secret manager and injects it into the proxy at runtime. Search the configuration repositories, Kubernetes manifests, CI variables and application code for any copy of the key, and remove each one. Confirm that application teams call the gateway with their own virtual keys, not the master key. Done means the key appears only in the secret manager and the proxy's runtime injection, and an audit of the repositories finds no copies.

  8. Record the final admin access state

    The security lead records the final state: the identity provider application and its owner, the list of administrators with SSO access, the status of disable_env_credential_login, the trusted proxy ranges and the location of the master key custodian. Store this record with the change ticket and schedule a review with the identity team whenever administrator membership changes. Done means the record exists, matches the running configuration, and has been checked by someone other than the person who made the changes.

Configuration options and when each fits

This table compares the four decisions that shape Admin UI access: the SSO provider, whether environment credential login stays on, trusted proxy ranges for login rate limiting, and where the master key is stored. Read each row as a choice you make before go-live, then confirm the trade-off against your own identity and cluster setup.

Setting or decisionWhat it controlsWhen to use itTrade-off
SSO provider choiceWhich identity provider signs administrators into the Admin UI: Google, Microsoft Entra ID, Okta or a generic OIDC providerChoose the provider your organization already uses for workforce sign-in so admin access follows joiner and leaver processesFree SSO covers up to 5 users from v1.76.0; more administrators need an Enterprise license, so confirm the count first
disable_env_credential_login: trueTurns off username, password and master key sign-in to the Admin UI once SSO worksSet it after every administrator has signed in through SSO and you have a tested fallback pathIf SSO fails with this set, administrators may be locked out, so keep a documented recovery plan
general_settings.trusted_proxy_rangesTells LiteLLM which load balancer or ingress CIDR ranges to trust so failed sign-ins are limited per source addressSet it to your actual ingress or load balancer ranges whenever the gateway sits behind a proxyWithout it, only a weaker per-username limit applies, and wrong ranges can make the limit match the wrong clients
Master key in a secret managerKeeps LITELLM_MASTER_KEY out of manifests, images and application configuration, and limits who can read itUse when your organization already runs a secret manager and can sync it into the gateway runtimeMore setup and a sync dependency; Enterprise secret manager integrations are listed for AWS, Azure, Google, HashiCorp Vault and CyberArk
Master key in Kubernetes secretsStores LITELLM_MASTER_KEY as a Kubernetes Secret mounted into the gateway podsUse as a stepping stone when no secret manager exists yet, with cluster RBAC restricting who can read secretsAnyone with broad read access to the namespace can retrieve the key, and etcd encryption must be confirmed for your cluster

Keeping the master key out of applications

The LITELLM_MASTER_KEY is an administrative credential. It has full control over the proxy, so it belongs with the people and automation that run the gateway, not with the applications that call it. Treat it as a break-glass secret for configuration and administration, and keep it separate from anything an application, developer tool or chat front end holds. LiteLLM documents the master key as a secret that must start with sk- and should live in a secret manager, which fits this role. It is not a per-user identity, so it cannot show who did what. Administrators should sign in with SSO for that, and applications should use virtual keys.

Applications should call the gateway with virtual keys issued per application or service, each with its own budget, TPM and RPM limits, and a list of permitted models. A virtual key that is compromised can be revoked or reduced without touching other callers, and its spend stays attributable. Confirm in your environment that every application in your inventory has been moved to a virtual key before go-live, and that no application configuration, container image or CI variable still contains the master key. Searching repositories and deployment manifests for the key is a reasonable first check.

Store the master key in your approved secret manager and restrict read access to a small named group of platform administrators, with access logged. Confirm which secret manager integration your edition supports, since LiteLLM lists AWS, Azure, Google, HashiCorp Vault and CyberArk as Enterprise integrations. When an administrator leaves or the key may have been exposed, rotate it: generate a new value, update the secret manager, roll the proxy pods, and then confirm that the old value is rejected. Plan the rotation as a documented runbook with a named owner, and test it in a non-production environment first.

Security and operational risks after go-live

Closing the admin paths creates new failure modes: administrators locked out, login limits that see the wrong address, a master key that escapes into other systems, and sign-in changes that leave gaps in the record. Each card below pairs one risk with a control and a check to run before and after cutover.

Lockout during SSO cutover

Setting disable_env_credential_login: true before every administrator has signed in through SSO removes the fallback path. The safe order is to connect the identity provider, confirm each administrator can sign in, and only then disable environment credential login. Keep a named break-glass process that is documented, tested in a non-production copy, and owned by someone outside the admin group. Confirm how your version recovers access if the identity provider is unreachable, before go-live.

Moving from OSS docs

Rate limits that miss real client addresses

Behind a load balancer or ingress, every sign-in may appear to come from the proxy address, so per-source limits either block everyone or block no one. LiteLLM applies a per-source limit on failed Admin UI sign-ins only when general_settings.trusted_proxy_ranges lists your load balancer or ingress CIDR ranges. Without it, only a weaker per-username limit applies. Test with failed sign-ins from two different source networks and confirm the logged address is the client's, not the proxy's.

Production best practices

Master key leaked into CI or app config

LITELLM_MASTER_KEY grants full administrative control, and it tends to spread when teams copy it into pipelines, Helm values or application environment files for convenience. Store it only in a secret manager that the gateway pod reads, and make sure it must start with sk- as the production guide requires. Scan repositories and pipeline logs for the key, rotate it on any suspected exposure, and give applications virtual keys with budgets and model limits instead.

Provider outage blocking admin access

If the identity provider used for SSO is down, administrators may be unable to change keys, budgets or routes during an incident. The gateway can keep serving traffic while admin sign-in fails, so the two need separate recovery plans. Decide in advance which operations a small set of named staff may perform through infrastructure tooling or database access, record who holds that access, and test the procedure during a planned outage window.

Audit gaps when sign-in paths change

Changing from username and password to SSO alters who appears in logs, so activity can become hard to attribute across the cutover. Record the date of each change, map old administrator accounts to their identity provider accounts, and review administrative actions for both periods. Confirm whether your edition provides an audit log of administrative actions and whether IP allowlisting is available for admin routes, since both are Enterprise features to verify with LiteLLM before you rely on them.

LiteLLM Enterprise docs

Questions teams ask before locking down the Admin UI

What does it cost to put SSO in front of LiteLLM admins?

The software side is priced by LiteLLM, and the work side is priced by whoever does the configuration. From v1.76.0, SSO in the admin UI is free for up to 5 users, according to the LiteLLM admin UI SSO documentation, and an Enterprise license is needed beyond that. Effort is driven by how many administrators need access, whether your identity provider already has groups or roles that map cleanly to LiteLLM roles, how many environments (staging and production) need matching settings, and how much testing your security team requires. Costs are one-time for the configuration and recurring for any licenses and support you retain. Ask any quote to separate license fees, implementation hours, and retainer costs, and to state which LiteLLM edition each line assumes.

How long does the cutover from password login to SSO take?

The duration depends on your identity provider, your change process and how many administrators must be verified, not on a fixed timeline. The sequence LiteLLM recommends is to connect an identity provider, confirm each administrator can sign in through SSO, and only then set disable_env_credential_login: true, as described in its guide for moving from open source. The longest steps are usually the ones outside the gateway: getting an application registered in the identity provider, agreeing on which group becomes the admin role, and scheduling a window with the people who hold the master key today. Ask any proposal to list each dependency and who owns it, so the schedule reflects your approvals rather than an assumed date.

What does your team need to provide before the work starts?

Plan to provide four things: administrative access to your identity provider to register the LiteLLM application and set up group or role claims, the CIDR ranges of your load balancer or ingress so the proxy can read real client addresses, access to the secret manager where LITELLM_MASTER_KEY and other credentials will live, and a named owner who can approve the cutover. Without the ingress ranges, the proxy only applies a weaker per-username rate limit on failed sign-ins, because general_settings.trusted_proxy_ranges is not set. The secret manager matters because the master key should stay out of application configuration. Confirm each item in writing at scoping, including who holds the approval to disable password login.

Can our own team lock down the Admin UI without a partner?

Yes, if you have engineers who already run identity integrations and Kubernetes or container platforms, and if someone owns the change approval. The configuration itself is short: an SSO block, the trusted proxy range setting, and the disable flag, applied after testing. The hard parts are less about syntax and more about verification: confirming every administrator signs in, confirming that applications no longer depend on the master key, and documenting the result for your auditors. A partner is useful when your team lacks identity or deployment experience, when the cutover must happen across several environments on a fixed schedule, or when you want an independent review of the result. Weigh your internal capacity against those needs and ask for a written scope either way.

Do we need an Enterprise license, and when does it become necessary?

Not for every part of this work. LiteLLM states that SSO with Google, Microsoft Entra ID (Azure AD), Okta and generic OIDC providers is free for up to 5 users from v1.76.0, and an Enterprise license is needed beyond that, per its SSO documentation. Enterprise also adds SCIM, JWT authentication with identity provider tokens, audit logs, organization and team RBAC, IP allowlisting and secret manager integrations, all of which are relevant to a stronger lockdown. Decide early whether you need those features, because a larger administrator group or a requirement for audit logs can move you to Enterprise. Confirm current terms directly with LiteLLM before you commit, since licensing can change between releases.

How do we test that password and master key login are really closed?

Test from outside the identity path, not from the admin screen. Attempt the username and password form, the environment-variable credential login, and a request that presents the master key as a bearer token against the admin endpoints, and expect each to fail after disable_env_credential_login is set. Repeat the test from a source address behind your load balancer to confirm failed sign-ins are rate limited per source address, which only works when trusted_proxy_ranges matches your ingress. Also confirm that no application, script or CI job still sends the master key, by checking logs for 401 or 403 responses after cutover. Keep the test results, the configuration version and the approver together as evidence for your security and compliance reviews.

What should we check after the lockdown to keep it working?

Review the settings whenever the LiteLLM version, identity provider or ingress changes. A new release can change how login is handled, and a new load balancer or CDN can change which address the proxy sees, which silently weakens per-source rate limiting. Keep the trusted proxy ranges current, rotate the master key through your secret manager on a schedule your policy sets, and remove administrators from the identity provider group when they leave. Retesting the closed login paths after each upgrade is a small recurring task that catches regressions early. Ask any retainer or support proposal to say which of these checks it covers.

How DeployOpen scopes a LiteLLM admin lockdown

The scope starts with a review of every sign-in path that reaches the LiteLLM Admin UI today. DeployOpen inventories how administrators log in, which accounts exist outside the identity provider, where LITELLM_MASTER_KEY is stored and which applications or scripts read it, and what sits in front of the proxy, including the load balancer or ingress and its CIDR ranges. That review is the basis for a written scope agreed before work starts. The scope names the identity provider and its configuration owner, the administrator roster that must pass SSO testing, the environments covered (for example, staging before production), and the deliverables. Because most engagements are fixed-scope, the cost is set by the agreed items, not by open-ended hours. Ask for the quote to break out the identity provider integration, the configuration change, the master key removal from applications, and the verification and documentation work separately, so you can see what your own team could take on.

Implementation happens inside your infrastructure, under your change control. DeployOpen connects the identity provider and confirms the SSO settings in a test environment, sets general_settings.trusted_proxy_ranges to the real load balancer or ingress ranges so that failed sign-ins are limited per source address, and then applies disable_env_credential_login: true only after every administrator has signed in with SSO. Your team keeps ownership of the identity provider, the secret store and the production change window. Confirm with your platform team which parts of this they want to run themselves and which they want DeployOpen to carry out, and agree a rollback path for the case where an administrator is locked out before go-live. The LiteLLM documentation on moving from open source to Enterprise explains the order of these steps; confirm the current behavior against the version you run.

Verification and documentation are the part security and compliance reviewers read most closely. DeployOpen checks each administrator's SSO sign-in, confirms that username, password and master key login no longer work for the Admin UI, tests the rate limiting from a source address that matches your proxy layer, and records the settings as they stand at the end of the work. The result is evidence for your reviewers: configuration snapshots, test records and a change log. DeployOpen prepares this evidence but does not issue audit reports, attestations or certifications. Independent auditors and certification bodies make those determinations, so ask your auditor early which artifacts they expect in the format they expect.

How DeployOpen works on this

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For the LiteLLM Admin UI, we start from the identity provider and the load balancer or ingress path, then close each default login route in a sequence your administrators can verify.

How we scope

  • Written scope lists each administrator group, identity provider and login path to be closed before go-live.
  • Scope confirms the load balancer or ingress CIDR ranges used for trusted proxy settings.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • We connect the identity provider, test SSO sign-in for each administrator, then disable password and master key login.
  • We verify failed sign-in rate limiting by source address, using the trusted proxy ranges you confirm.
  • We move the master key out of application configuration and into your secret manager with access limited to operators.

How we hand over

  • You receive the configuration as code, the sign-in test results and a record of each closed login path.
  • Runbooks cover emergency administrator access, identity provider outages and rotation of the master key.
  • Your security team reviews the results, and we retest the admin paths after any change to ingress or identity.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Retainers can cover re-checking admin login paths after LiteLLM version upgrades and identity provider changes.
  • Ask for the support response terms and upgrade process in writing before you sign the scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.