Secure remote access for contractors and vendors
Contractors, vendors, and other third parties need access to a small part of your network for a limited time. This guide explains the risks of third-party access and the practices that keep it narrow, visible, and easy to end.
A named person signs in
The contractor signs in as one person, with an email code or with OIDC. There is no shared account.
The Policy decides
The control plane finds the Group of the vendor and checks the conditions of the Policy, such as the time of day.
One app is reachable
The Client sets up a tunnel to the Gateway. The Gateway forwards traffic to the staging app on TCP/443 only.
All other systems are denied
No Policy connects the vendor Group to the finance database, so the contractor has no route to it.
Why third-party access is different
An employee is in your directory, uses a laptop that you manage, and stays for years. A contractor is none of these things.
- The person belongs to a different company, with its own accounts and its own rules.
- The device is not yours. You do not control its updates, its disk encryption, or its other software.
- The work has a scope and an end date. A vendor who supports one system needs that one system.
- The people change. The vendor moves staff between customers, and nobody tells you.
Many well-known breaches started with the credentials of a vendor. The attacker did not need to break the main company. The attacker used access that the company gave to a third party and did not limit.
Contractor remote access must give three answers at all times. You must know who the person is, what the person can reach, and when the access ends.
The four common risks
Shared accounts
A vendor gets one VPN user name, and five of their people use it. The logs show one name. When one person leaves the vendor, the password does not change. A shared account makes each action anonymous.
Broad network access
A legacy VPN puts the contractor on a subnet. The contractor needs one web app but can reach file servers, printers, and databases. If malware is on the contractor laptop, it has the same reach.
Access that never ends
The project ends, and the account stays. Nobody owns the task to remove it. Old vendor accounts are the accounts that attackers like most, because nobody watches them.
Unmanaged devices
You cannot install your security tools on the laptop of a different company. A tunnel from unmanaged devices to a full network is a path for whatever is on those devices.
Practices for secure vendor access
These practices apply to any product.
- Give each person a named identity. One account for each human. If the vendor has an identity provider, let its people sign in through it. Never accept a shared account.
- Apply least privilege for each app. Give access to the specific host and port that the work needs. Do not give access to a subnet.
- Set limits in time. Limit access to work hours where that is practical. Record an end date for each vendor, and make one person the owner of that date.
- Limit the damage from the device. If you cannot manage the device, make its access narrow. Approve each device by hand where the number is small.
- Keep logs that name the person. Record each sign-in and each connection, with the person, the device, and the destination.
- Make offboarding one step. When the contract ends, one action must remove all access. Test that the access is gone.
- Review on a schedule. Look at the list of vendor accounts each quarter. Remove each account that has no owner or no recent use.
A checklist to onboard a contractor
Use this checklist before you give access to a new vendor.
- Write down the name of each person, not only the name of the company.
- Write down each system that the work needs, with its address and its port.
- Write down the end date and the internal owner of the vendor.
- Decide how the people sign in: through the identity provider of the vendor, or with a code to their work email.
- Create one group for the vendor, and connect the group to the listed systems only.
- Tell the vendor which device each person can use.
- Put the end date in a calendar or in a ticket, with the owner.
When the list of systems is short and specific, the access is easy to give and easy to remove.
How Firezone handles contractor remote access
Firezone is an open source zero trust access platform built on WireGuard. Access is default-deny. A person reaches a Resource only when a Policy connects one of their Groups to that Resource.
Identity for people outside your directory
You add each contractor as a user. A contractor can sign in with a one-time code by email, which needs no account in your directory. You can also add the identity provider of the vendor as an OIDC provider. Firezone never stores passwords.
A Group for each vendor, a Policy for each Resource
Create one Group for each vendor. Add a Resource for each system that the vendor needs, and limit it with a traffic restriction such as TCP/443. Then write one Policy from the Group to each Resource. The contractor has no route to any other system.
Conditions on the Policy
Conditional access adds conditions to a Policy on the Team plan and higher:
- Time of day. Permit access in set windows on each day of the week.
- Client location. Permit or refuse specific countries.
- IP range. Permit only the office addresses of the vendor.
- Authentication provider. Require the sign-in method that you select for the vendor.
- Verified Client. Permit only the devices that an admin marked as verified. This condition is useful for devices that you do not manage.
Logs and offboarding
Session Logs record who connected, from where, and when. Flow Logs record each network flow with the person, the Policy, the Resource, and the amount of data.
To end access, remove the person from the Group, or delete the Policy or the Group of the vendor. The time of day condition is a weekly window, not an end date, so keep the end date on your checklist. You can also manage Groups and Policies with the REST API or the Terraform provider.
Shared VPN account, VPN account per user, and Firezone
The three approaches differ in what you know about the contractor and in how much of the network the contractor can reach.
| Shared VPN account | Legacy VPN per user | Firezone | |
|---|---|---|---|
| Logs name the person | NoOne name for all people | Yes | Yes |
| Access limited to one app and port | NoUsually a full subnet | PartialNeeds firewall rules for each user | YesOne Policy for each Resource |
| Sign-in for people outside your directory | YesA shared password | PartialUsually a local account | YesAn email code or OIDC |
| Limits by time of day, country, or IP range | No | PartialDepends on the product | YesConditional access on paid plans |
| Remove one person and keep the others | NoChange the shared password | Yes | Yes |
| Remove a full vendor in one step | YesDelete the account | PartialOne account at a time | YesDelete the Group or its Policies |
| Works with no software on the contractor device | NoA VPN client | NoA VPN client | NoThe Firezone Client |
The table describes the usual design of each category. A specific product can be different. Read the documentation of the product before you decide.
Common questions
How do I give a contractor access to one server and not the full network?
Use a tool that grants access for each destination, not for each network. Define the server and its port as one item, and give only the group of the contractor access to that item. In Firezone, that is one Resource with a traffic restriction and one Policy.
Is it safe to give a vendor a VPN account?
It can be safe if each person has a named account, the account reaches only the systems that the work needs, and somebody removes it on the end date. A shared account with access to a full subnet is not safe.
Does a contractor need an account in our identity provider?
No. A guest account in your directory is one option. With Firezone, a contractor can also sign in with a one-time code to their work email. A second option is OIDC through the identity provider of the vendor.
How do I control access from unmanaged devices?
Keep the access narrow, so that the device reaches one app and not a network. Then limit which devices can connect. In Firezone, a Policy can require a Client that an admin marked as verified, and it can require a source IP range.
What must offboarding of a vendor include?
Remove each person from the vendor group, or remove the group. Change each application password and API key that the vendor knew. Then check the logs to make sure that no new connection comes from the vendor.
Can I see what a contractor did?
Network logs show who connected to which system, when, and how much data moved. Firezone keeps these records in Session Logs and Flow Logs. Firezone does not record the content of a session, so use the audit log of the application for that detail.