Securing the Open edX LMS and Studio Django admin

Limiting who can reach the Django admin on the Open edX LMS and Studio domains, which accounts need staff or superuser flags, and how to restrict the path at the network layer.

On this page

Why Open edX Django admin access needs its own hardening job

An operator who finds that /admin/ answers from the internet on the LMS or Studio domain needs to settle one question first: who should be able to use it at all. Open edX runs on Django, and both the LMS and Studio (CMS) expose a Django admin interface at /admin/. Those interfaces sit beside the learner and author experiences, so a page that is reachable by anyone on the public internet is an exposure even when the login form is the only thing on it. Treat the admin path as its own access decision, separate from the general sign-in configuration of the platform.

In Django, a staff flag lets a user sign in to the admin site, and a superuser flag grants every permission without assigning them one by one. Open edX adds its own role and course-team models on top of this, so an account can hold a staff flag without any course role, and a superuser can change almost anything in the database through the admin. The practical question is therefore not only which people need the admin, but which accounts carry these flags on each domain, since the LMS and Studio keep separate user records and flags can differ between them. Confirm the current behavior of these flags in the release you run, because the admin screens and permission groups change between named releases.

This job becomes necessary as soon as the platform has more than one operator, a support team that needs account lookups, an external contractor, or a compliance review that asks who can change user records. It also becomes urgent when the admin path is reachable from networks where your own staff do not work. Ask your team to list every account with a staff or superuser flag on the LMS and on Studio, to record why each one has it, and to confirm which network paths currently reach /admin/. That inventory drives the access model, the network restrictions and the testing that follow in this guide.

Access control options for the Django admin and when each fits

This table compares four ways to limit who can reach the LMS and Studio Django admin at /admin/, with the situation each one fits, what it protects against and what it leaves open. Read each row as a layer: most sites combine a network restriction, a small named set of staff and superuser flags, and SSO with MFA, and the gaps in one row are usually covered by another.

OptionFits whenProtects againstDoes not cover
Network or VPN restriction on /admin/Staff work from known office or VPN addresses and no one needs admin access from the public internetInternet scanners and credential stuffing against the admin login page on both LMS and Studio domainsStolen credentials used from inside the allowed network, and misuse by an authorized staff member
Small named group with staff and superuser flagsOnly a few operators need to change platform settings, roles or course data through the adminBroad privilege spread across many accounts, and over-privileged accounts left active after a role changeCompromise of one of the named accounts, and weak passwords on those accounts unless the password policy is also tightened
Separate authenticated gateway in front of /admin/You want a second sign-in step, such as a reverse proxy or access gateway, before the Django login form is reachedDirect exposure of the admin login form and some unauthenticated probing of admin URLsApplication-level flaws reachable after the gateway, and admin accounts that still sign in locally with a Django password
Admin sign-in delegated to an SSO provider with MFAStaff already sign in through a central identity provider and you want MFA enforced for every admin sessionPassword-only admin sign-in, and access for accounts removed from the identity providerSessions that stay open after offboarding unless session lifetimes are aligned, and local break-glass accounts if they are left enabled
Network restriction on the Tutor host and load balancerIngress rules are managed in your cloud or data center and can block /admin/ paths before traffic reaches the platformTraffic from unapproved sources reaching the admin routes at allRequests from allowed sources, and requests that reach the platform through another path such as a misconfigured proxy or a second hostname

Setup sequence for restricting Open edX admin access

This sequence reduces the set of accounts that can reach the Django admin on the LMS and Studio domains, blocks the /admin/ path from unapproved networks, and confirms the restriction holds on both domains. Each step ends with a check the operator can repeat after every change.

  1. Inventory staff and superuser accounts

    The platform operator exports every account with the staff or superuser flag on the LMS and on Studio, using a Django shell or a database query against the auth user table in the Open edX MySQL database. Record the username, email, flags, last login and the business reason for access for each row. The step is done when the operator has a single list covering both domains, reviewed against the current staff roster, and every account has an owner who can justify it. Keep the list with the change record so later reviews can compare against it.

  2. Remove flags that are not needed

    For each account on the inventory, the platform owner and the business owner decide whether staff or superuser access is still required. Remove the flag where it is not, either in the Django admin itself for accounts that already have access or with a management shell command for the rest. Do not delete accounts in this step, since learners, course teams and support staff may still depend on them. The check is a fresh export from the same query showing that only approved accounts keep the flags, with the removals logged against a named approver.

  3. Confirm the Tutor proxy configuration for both domains

    On the Tutor project host, the operator reviews the generated reverse proxy configuration for the LMS and Studio hostnames, which Tutor produces from the project settings. Confirm that both hostnames route through the same proxy layer that will carry the new rule, and that no separate vhost or ingress path bypasses it. Record the file paths and the hostnames found. The check is a curl request to each domain's /admin/ path from a host that is outside the allowed range, which should return a response from the proxy rather than the Django login page. Confirm any custom ingress or load balancer rules that sit in front of the proxy as well.

  4. Restrict /admin/ to approved networks

    The infrastructure team adds an allow rule for the /admin/ path on the LMS and Studio hostnames at the reverse proxy or Kubernetes ingress, limited to the CIDR ranges of the office, VPN or bastion network the admin team uses, and denies all other sources for that path. Keep the rule scoped to the path so learner and API traffic is unaffected. Confirm the approved ranges with the network team and record them in the change request. The step is done when the configuration is deployed to the running proxy and the operator has a diff showing only the intended /admin/ change.

  5. Test from an allowed network

    A named administrator connects from one of the approved networks and loads /admin/ on both the LMS and Studio domains. The login page should load and accept valid credentials for an account that holds the flag. Record the HTTP status, the hostname and the source address seen by the platform. The check passes when both domains serve the admin login from the allowed network and the access log on the proxy records the request as allowed. If the admin is blocked, review the source address first, since NAT or a changed VPN pool is the usual cause.

  6. Test from a disallowed network

    A tester connects from a network outside the approved list, such as a guest Wi-Fi segment or a home connection, and requests /admin/ on both domains. The proxy should refuse the request before it reaches Django, and the response should not show the admin login form. Also confirm that the non-admin site, for example the learner dashboard, still loads from the same network. The check is a recorded response for each domain plus a proxy log entry showing the denial. Repeat the test from a second disallowed address to confirm the rule is not limited to one source.

  7. Document the baseline and schedule recheck

    The operator writes down the approved network ranges, the list of accounts that still hold staff or superuser flags, the proxy file paths and the test results from both networks. The document names an owner for the allowed ranges and an owner for the account list. The check is that a second team member can read the document and reproduce the two tests without help. Recheck the account list and allowed ranges on the review cycle the organization already uses for privileged access, and rerun the disallowed-network test after each proxy or ingress change.

Network-level restrictions on the /admin/ path

The most direct way to limit who can reach the Django admin is to refuse the request before it reaches Open edX at all. A reverse proxy, load balancer or Kubernetes ingress can return a denial for any request to /admin/ unless the source address belongs to an approved network, such as a staff VPN range or a bastion subnet. This rule has to be written for both the LMS hostname and the Studio hostname. Studio is a separate domain with its own /admin/ path, so a rule that protects only the learner-facing site leaves the authoring admin open. Confirm that your ingress rules match both hosts and that a request to either one from outside the allowed range is refused.

The trade-off is between blocking at the edge and relying on application login. An edge rule is coarse but stops traffic before it touches the application, so it also reduces exposure to login brute force and unpatched admin code paths. Its weakness is that it depends on the source address being accurate. Requests that pass through a shared proxy, a NAT gateway or a cloud load balancer may appear to come from an address you did not expect, so the rule can either lock out legitimate staff or trust the wrong hop. Application login, including superuser and staff flags, identifies the person rather than the machine, but it is only as strong as the password and second factor behind it. Most teams keep both layers rather than choosing one.

The exact configuration depends on how your Tutor deployment is built and which proxy or ingress controller you run, so treat any example as illustrative until your environment confirms it. Ask your platform team to confirm how forwarded client addresses reach the proxy, which header carries the original source, and whether the proxy trusts that header only from known upstream hops. Then test from an approved network and from an outside network against each hostname, and record the results. Review the allowed ranges whenever VPN or office addresses change, because a stale allow list is a common cause of both outages and silent gaps.

Security and operational risks when admin access is left open

Both Django admin interfaces give broad control over users, courses and configuration, so a gap in who can reach them affects the whole platform. The risks below share a root cause: access is granted by habit rather than by a documented decision, and nothing records or narrows it afterward.

Unnecessary superuser accounts

Superuser flags grant every permission in the Django admin, including changes to users and site configuration. Many accounts that carry them only need to edit a few models, such as course access or enrollment records. Review every account with the superuser flag and ask the owner which model and action they need. Grant staff access with narrower permissions where that is enough, and remove superuser flags from accounts that no longer need them. Confirm the exact permission names with your Open edX release before you write a policy.

Shared admin logins

When several people use one admin account, the platform cannot tell who changed a user record or a setting. Shared logins also make offboarding unreliable, since removing one person means changing the password for everyone. Give each administrator a named account, tie it to your identity provider where possible, and rotate any credential that was ever shared. Check the login history for the shared account before you disable it.

Admin paths exposed to the internet

The admin paths under /admin/ on the LMS and Studio domains are often reachable from any network, so a login form is open to scanning and password guessing. Restrict those paths at the reverse proxy, load balancer or ingress to approved address ranges or a VPN, and keep the learner-facing routes public. Test the restriction from outside your network, and confirm that the health checks and monitoring still work after the change.

Credentials stored with the admin account

Admin accounts sometimes hold API tokens, OAuth client secrets or database passwords in profile fields, notes or environment files that the admin can read. A compromised admin session then exposes systems beyond the platform. Move integration secrets into a secret store, keep them out of user and site records, and limit who can read the Tutor configuration files that hold generated passwords and keys.

No audit trail for admin actions

Without a record of admin actions, you cannot answer who changed a learner's account, altered a course setting or granted a role, or when it happened. Enable change history in the Django admin and forward the platform logs to a store that administrators cannot edit. Ask your team to confirm which actions are logged by default in your release and which need extra configuration.

Drift between LMS and Studio

The LMS and Studio are separate Django applications with their own admin interfaces, accounts and settings. An admin who is restricted in one may still have full access in the other, and a permission change made in one place can be missed in the other. Compare the admin user lists, flags and network rules for both domains on a fixed schedule, and record the result. Treat any difference you cannot explain as a finding.

Questions operators ask about Open edX admin access

How much effort does restricting Open edX Django admin access take?

The effort depends mostly on how many people already use the LMS and Studio admin pages, how many network paths reach them today, and whether your staff roles are already defined elsewhere. A single operator with one ingress path and a short list of superusers is a small change. A platform with several admin groups, a separate support desk, and traffic that reaches /admin/ through more than one proxy takes longer because each path has to be found, tested, and written down. Ask any provider to break the work into the access map, the network rules, the staff flag cleanup, and the verification steps, so you can see which part drives the total.

Can we restrict Open edX admin access ourselves without outside help?

Yes, if your team already runs the Tutor host and understands Django staff and superuser flags. The core steps are to find which accounts hold these flags, remove what is not needed, and limit which source addresses can reach /admin/ on the LMS and Studio domains at your load balancer, reverse proxy, or firewall. The harder part is confirming that no other route, such as an API or a separate hostname, exposes the same interface. Teams without Django or proxy experience often find outside help faster for the first pass, then keep the rules in their own change process.

What does the work need from our internal team?

Plan for named people who can make decisions and provide access. You will need someone who owns the Tutor configuration and deployment, someone who manages the network edge (load balancer, firewall, or ingress), and someone who can say which staff roles should have superuser or staff access. Your security or compliance lead should approve the access list and the test evidence. Ask for these needs to be written into the scope so that change windows and access grants are not discovered during the work.

How does admin access restriction interact with SSO and MFA?

Restricting who can reach /admin/ and delegating sign-in to an identity provider are separate controls, and they work best together. SSO can enforce multi-factor authentication for accounts that sign in, but a Django admin login may still exist as a local password path unless you close it. Confirm which accounts can still authenticate with a local password, whether the admin login page is reachable without SSO, and how session lifetimes line up with the identity provider's sessions. Network rules limit who can reach the page at all, while SSO and MFA limit who can complete a sign-in once they arrive.

How do we test that the admin restriction actually works?

Test from outside the allowed network and from each permitted location, and check the results on both the LMS and Studio domains. Requests from disallowed addresses should be refused at the edge, and the Django login page should not be reachable through any other hostname, path, or proxy route. Record the list of superuser and staff accounts before and after the change, and confirm that removed flags are no longer effective. Repeat these checks after each Tutor upgrade or proxy change, because a new route or default can reopen the path. An independent penetration test can cover these checks as part of a wider scope.

What drives the ongoing cost after the first restriction is in place?

The recurring work is access review and change handling. Staff join and leave, support teams need temporary access, and Tutor or proxy updates can change routing. Each of these adds a small task that someone must own. Ask any provider which part is one-time (the initial map, rules, and tests) and which is a recurring retainer or internal task (reviews, retests after upgrades, and access requests). Ongoing support and continuous testing are available as retainers, and a written scope should show which recurring items they cover.

Does restricting admin access help with compliance reviews?

It can supply evidence for access control questions, but it does not satisfy a compliance requirement by itself. Assessors usually ask who holds privileged access, how that access is approved, how it is removed, and how it is logged. A restriction project can prepare the account list, the network rule set, the test results, and the change records that answer those questions. Independent auditors and certification bodies make the assessment decision, so confirm with your assessor which evidence format they expect before the work starts.

How a request to /admin/ passes the network and login checks

The diagram starts with a browser request to the LMS or Studio domain at /admin/. The reverse proxy or ingress applies the network allow list first, so requests from disallowed networks are refused before they reach Django. Allowed requests then reach Django's authentication, where the account must be signed in and carry the staff flag, and the superuser flag is checked for the highest-privilege pages. Each failed check should return a denial that is logged, so the team can confirm the restriction works from both sides.

Network and login checks applied to each /admin/ request on LMS and Studio.

How DeployOpen scopes and delivers Open edX admin hardening

DeployOpen plans, implements, hardens and documents self-hosted Open edX inside your own cloud accounts, data centers or air-gapped networks, and admin access hardening is usually delivered as a fixed-scope engagement. Scope, deliverables and timelines are agreed in writing before work starts, so the decisions in this topic (which Django admin interfaces stay reachable, which staff hold superuser or staff flags, and which network paths are allowed) are settled and recorded before any configuration changes are made. A written scope for this work typically names both the LMS and Studio domains, the accounts that currently hold elevated flags, the network ranges that reach /admin/, and the evidence you expect at the end.

In practice, the scoping conversation covers the inventory and the controls. DeployOpen reviews who holds superuser and staff flags on each domain, how admin access is granted and revoked, where the Tutor-managed proxy and network rules sit, and whether any admin path is reachable from outside your intended networks. The output is usually a set of changes to Django admin permissions, the reverse proxy or ingress rules, and the operating procedure for granting access, along with a short runbook your team can maintain. Ask the proposal to state which of these items are in scope and which remain with your own team, since admin roles often depend on identity decisions made elsewhere.

Security testing and retesting can be included where relevant. A tester can attempt to reach the admin interfaces from networks outside the allowed list, check that non-admin accounts cannot escalate, and confirm that the restrictions hold after the next Tutor upgrade or configuration change. Confirm with DeployOpen whether the retest is part of the original fixed scope or a separate piece of work, and ask for the findings format before testing begins. Compliance evidence, such as access lists and review records, is prepared for your assessors, but DeployOpen does not issue audit reports or certifications; independent auditors and certification bodies do.

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.