Keep a way in before you lock things down
Before you tighten a firewall, require single sign-on or isolate a network, build and test the access you will use when that change goes wrong. What out-of-band and break-glass access are, and the order to do the work in.
Before you restrict access to a system, build the path you will use to get back in when the restriction goes wrong, and test that path. Do it first. A change that locks you out usually locks out the fix as well, because the fix has to travel the same road.
Lockouts tend to have the same shape. Someone puts a control in front of the management path, and the control turns out to depend on something the change itself breaks. A firewall rule gets applied over the connection that is applying it. Single sign-on becomes mandatory for the admin console, and then the identity provider has an outage. A multifactor policy is switched on for every account, including the one that manages the multifactor policy. A tool that isolates suspicious hosts decides the administrator's workstation is suspicious.
In each case the control did its job, and nobody had planned for how the administrator would get past it.
Two kinds of way in
They solve different failures, and you need both.
Out-of-band access is a path that does not use the network you are changing. On a server it is the baseboard management controller, the small independent computer on the motherboard that gives you a console and a power button from a separate network port. On network equipment it is the serial console, often reached through a console server with its own uplink. For a remote site it may be a cellular modem. Out-of-band access covers the case where the normal network path is gone.
Break-glass access is a credential that does not depend on your normal identity system. A local administrator account on a device is one. An emergency account in a cloud directory, one that does not sign in through the federated identity provider, is another. Break-glass access covers the case where the network is fine and the login system is unavailable or is refusing you.
An out-of-band console that asks for a single sign-on login has one of the two. So does a local account you can only reach over the production network.
A path that does not use the network you are changing
Management controller, serial console or cellular modem
Covers the case where the normal network path is gone
A credential that does not depend on your normal identity system
Local administrator account or cloud emergency account
Covers the case where the login system is down or refusing you
You need both. Build and test them before the restriction goes in.
What the published guidance says
The large platforms each document this, and their advice agrees.
Microsoft's guidance for its Entra directory recommends that an organization keep two or more emergency access accounts. They should be cloud-only accounts, with no dependency on a federated or on-premises identity system. They should not belong to any individual. They should use a different authentication method from your ordinary administrator accounts, so one failed method does not take out both. They should be excluded from any Conditional Access policy that blocks or restricts sign-in. Every sign-in by one of these accounts should raise an alert, and the accounts should be validated at least every 90 days.
The AWS Well-Architected Framework has a best practice for an emergency access process. Its list of mistakes includes relying on an emergency process that depends on the same systems, such as a centralized identity provider, as your normal access. It also says to create the emergency resources ahead of time, test the process periodically and alert when it is used.
Network operating systems have a mechanism for the change itself. In Junos, the command commit confirmed activates a new configuration and then rolls it back automatically, after 10 minutes by default, unless you confirm it. The documentation describes this as useful when you want to verify that a change "works correctly and does not prevent access to the device." If the change cuts you off, you wait ten minutes and the device lets you back in. Where a platform has a timed rollback like this, use it for every change that touches access. Where it does not, schedule the revert yourself before you make the change, and cancel it afterward.
The order I would work in
- Write down the current management path. Include every dependency: DNS, the VPN, the jump host, the identity provider, the certificate on the console. The change you are about to make will affect at least one of them.
- Build a second path that shares as few of those as you can. Aim for a different network and a different credential source.
- Test the second path with the first one switched off. A path tested while the main one is up often turns out to rely on it. A jump host reached "out of band" that resolves names through production DNS is the classic example.
- Put the exception above the restriction. In a firewall, the rule allowing management access from known administrative hosts sits ahead of the new deny rule. In an access policy, the emergency accounts are excluded by name. If automation manages the rules, make the exception part of what the automation enforces, so a later run cannot remove it.
- Make the change with a timed rollback.
- Check from a new session. A stateful firewall will often keep an established connection alive under a rule that would refuse a new one. The session you made the change from proves nothing. Open a fresh one from a second machine.
- Then confirm the change.
The same applies to anything that isolates machines automatically. If a tool can cut a host off from the network without a person approving it, the hosts you manage the environment from need an exemption that the tool itself enforces. A note in a runbook saying not to isolate them is not enough.
The way in is also a door
Everything above creates access that bypasses your normal controls, and an attacker would like it as much as you would. AWS makes the point in its own guidance when it describes break-glass procedures as something that can be considered a backdoor.
So the emergency path needs controls of its own, suited to something that should almost never be used.
- Keep the credentials offline, in a safe or split between two people, and out of the password manager that sits behind single sign-on.
- Alert on every use, to more than one person. For an account that is used twice a year, any sign-in is worth a look.
- Change the credential after each use, and write down why it was used.
- Keep management controllers and console servers on their own network segment, away from the internet, and keep their firmware patched. They are computers with full control of other computers.
Ownership needs to be explicit, because emergency access is the kind of thing everyone assumes somebody else maintains. Name one person or team that holds it and tests it, and send the alerts to them. For the identity platform, that is the identity team. For the network and the server management controllers, it is the infrastructure team. If the system is run for you, ask the provider what its emergency path is and how you invoke it.
One caveat. Emergency access decays when nobody uses it. Passwords expire, hardware tokens get lost, the phone number on the account belongs to someone who left, and the envelope is in a safe whose combination nobody remembers. That is why both vendors tell you to test on a schedule, and a schedule is the only thing I have seen keep this working.
The test is easy to describe and mildly uncomfortable to run. In a maintenance window, behave as though the identity provider is down and the production network is unreachable, and see which systems you can still administer. Whatever you could not reach goes at the top of the list for next quarter, ahead of whatever you had planned to tighten next.
Sources
- https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-emergency-access
- https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/sec_permissions_emergency_process.html
- https://networkingdocs.hpe.com/documentation/us/en/software/junos/cli/topics/topic-map/junos-configuration-commit.html
Views are my own.