The contract ended, but the gateway remembers
A government agency finds an unexpected Remote Desktop Gateway login associated with a contractor whose support engagement closed months earlier. The central directory account was disabled, yet a separate gateway identity or local credential may still permit a remote desktop session. Establish the true state before assigning motive. The account name, destination host, source network, authentication mechanism, session duration and observed operations should be preserved. A login can indicate a dormant account used by an automated process, an administrative error or misuse; it is not by itself proof that public service records were viewed.
Trace the service and identity boundaries
Map the external support journey through the internet-facing gateway, broker, directory, privileged-access service and destination server. Identify where each component validates identity and where permission persists independently. A gateway might accept a certificate even after directory disablement or an administrator may have created a local duplicate during a previous outage. Review group membership snapshots, trusted certificates, session limits and application rights. If the destination supports critical citizen-facing services, involve the service owner before terminating all remote administration indiscriminately.
Preserve the investigation trail
Collect gateway authentication and session logs, administrative configuration changes, destination-host event records and relevant contractor handover tickets. Correlate session IDs and timestamps, preserving clock offsets. Determine whether the account reached a login screen, established a full desktop, opened an application, changed a configuration or transferred files. An RDP session that connects and immediately closes carries different significance from one that executes privileged commands. Keep an evidence custodian and record original exports before rotation or account deletion removes useful context.
Contain the exact route
Disable obsolete local gateway accounts, revoke associated certificates or tokens and terminate suspicious active sessions through an approved procedure. Check for alternate gateways and jump servers, since decommissioning one entry point may leave another. Establish a replacement support path for current approved vendors with named accounts, time-bound elevation and a recorded business need. Where an agency relies on remote support during public-service incidents, an emergency access option should be independently authorised and monitored rather than shared permanently among suppliers.
Demonstrate that offboarding is effective
In a test environment, re-create the expired contractor’s role and show it cannot authenticate to the gateway or use a retained session after closure. Verify that current support personnel can complete an approved task within a defined window. Include local identities, certificates and privileged-session brokers in the test, not only the central identity provider. Confirm log visibility at each decision point so a future unexpected login can be investigated without guesswork. If a product cannot invalidate sessions immediately, record the bounded window and compensating controls.
Close the account and the process gap
Review a sample of recently concluded contracts and compare procurement closure, service tickets, gateway membership and privileged-access inventory. Ask why the account was missed: no system owner, incomplete handover, unrecorded emergency identity or a software feature outside the standard identity directory. Assign a correction and test date. The accountable manager should receive a finding that distinguishes confirmed activity from potential reachability. The useful assurance result is not just that the highlighted login was blocked, but that the next departing contractor loses every relevant access path predictably.
Test a second access path before certifying closure
An RDP gateway may be only one layer of remote support. The same former contractor could possess a privileged access broker account, device certificate or secondary VPN that was not listed in the procurement offboarding checklist. Build a complete inventory from actual gateway registrations, not merely the current directory group. In a synthetic role test, attempt both the normal web gateway and the alternate support route after the contract end date. Require denied access at each enforcement point and confirm that the rejection is visible to operations staff.
Reconcile the agency’s records
Contract closeout should produce a specific access-removal ticket listing systems, local identities, privileged groups and current business owners. Compare it with the actual connection records and any subsequent helpdesk requests. If an engineer restored old credentials during an emergency, the approval and expiry must appear in the exception history. Senior management needs to know whether the unexpected event reflects a one-off error or a repeatable gap across supplier exits. Sample several completed contracts to answer that question and publish a remediation timetable for any missing system-level offboarding steps.
Additional operational assurance
The agency should set a maximum duration for emergency remote support permissions and make the expiry visible to the service owner. Test that the gateway refuses a session after the approved window even when a contractor’s identity and device are otherwise healthy. Review contractors who changed employers while retaining the same external email address or supplier domain. Supplier identity belongs to an accountable person and a current engagement, not indefinitely to a business name. This makes contract closure a verifiable security event rather than a paperwork milestone.
Verify the destination, not just the gateway
A gateway audit should also establish whether the old contractor reached a server that still retained a local administrative role. If a login succeeded, compare the session’s destination account, host permissions and any file-transfer or remote-command operations with the last approved support task. Test post-contract denial at both the broker and the destination using fictitious records. A disabled gateway credential is a critical containment step, but a lingering local identity or alternate route may require separate removal and documented acceptance.
Sources and further reading
How Next Defence supports this work
Next Defence can help teams reconcile contractor offboarding across gateway, local and privileged identities and demonstrate post-contract access denial. Engagements are scoped to authorised systems and the organisation’s operational and legal requirements.