Part 6 of TAK: From Two Phones to a Global Platform

A Phone Goes Missing: Revocation, Groups and CA Rotation

Last time, we finished with two devices enrolled and connected to our own TAK Server. Each holds a certificate the server signed, and the server trusts anything that certificate authority signed.

Say BRAVO-1’s phone goes missing. Its certificate is still valid for a year, and anyone holding the phone holds that certificate. This article covers what it takes to lock that device out, how to stop teams seeing each other when they shouldn’t, and how to replace the certificate authorities themselves while allowing time to migrate devices before retiring the old CAs.

What you’ll need

The setup from the previous article, running, with both devices connected. This article adds to the scripts, so update your copy first. You’ve edited config/takserver.env, so set your changes aside while Git updates the files, then put them back:

cd tak-stack/compose/takserver
git stash
git pull
git stash pop

Then restart with the new scripts. --force-recreate makes Compose start fresh containers, because it doesn’t notice changes to the scripts by itself:

docker compose up -d --force-recreate

Your certificate authority, users and enrolled devices carry over. Devices reconnect once the server is back, which took two to three minutes in my tests.

There are two new settings at the end of config/takserver.env, USER_GROUPS and REVOKE, both empty. We’ll fill them in as we go.

Revoking a certificate

Open the admin console and go to Client Certificates. Each certificate the server has issued has a Revoke link at the end of its row:

The Client Certificates page, listing one certificate each for alpha-1 and bravo-1, each with View, Download and Revoke links.

Click Revoke on bravo-1’s row. The console asks you to confirm, with a warning:

Are you sure you want to revoke the certificate (Subject = OU=Lab,O=TAKStack,CN=bravo-1)?
TAK Server must be restarted for the revocation to take effect.

In this test, revoking the enrolled certificate disconnected BRAVO-1 without a restart, and its server icon turned red. Its connection settings show it trying again:

ATAK's TAK Servers list on BRAVO-1, with a red status and the error IO error; reconnecting.

Each retry is refused. The server log names the reason:

RevokedException: Attempt to use revoked certificate : CN=bravo-1,OU=Lab,O=TAKStack

Show Revoked lists the certificate with the time you revoked it:

The Client Certificates page filtered to revoked certificates, showing bravo-1's certificate with a revocation date.

ALPHA-1 stays connected throughout. Revocation applies to one certificate, not the server.

Why the warning talks about a restart

TAK Server can check revocation in two ways, and out of the box, it uses neither.

Its own database. Every certificate issued by enrollment is recorded in the database, and that’s what Client Certificates lists. With x509checkRevocation turned on in CoreConfig.xml, the server checks that record each time a device connects. The Revoke button also drops the device’s current connection. Together, that’s what took BRAVO-1 off straight away and kept it off.

Revocation lists. A CRL is a list of revoked certificates, signed by the CA that issued them. The server loads its lists when it starts, so a new entry only counts after a restart, which is where the warning comes from. Lists cover every certificate a CA has signed, including ones the database has never seen, such as the admin certificate and the certificates made in advance from the previous article.

Our setup turns on both. Each start builds a fresh list for every CA, and the Revoke button adds to the intermediate CA’s list as well as the database. To check the list side, I revoked a certificate made in advance, which the console can’t see, and connected a test client with it. The server refused it during the TLS handshake with a certificate revoked alert.

One more detail: the admin console’s ports read only the first list in the configuration, so the setup puts a combined file first. Without it, the server had no list from the CA that signed the admin certificate, and refused it with certificate unknown. The server’s own health check failed with it, because it uses the admin certificate too.

Revoking the certificate isn’t the same as locking out the user

After revoking BRAVO-1’s certificate, I imported the enrollment package again on that device and signed in as bravo-1. The server issued a new certificate, and BRAVO-1 was back on the map within a couple of minutes.

That’s the design working as intended. Enrollment trusts whoever knows the password, and the Revoke button doesn’t touch passwords. If the phone was lost and its owner still needs access, that’s what you want: revoke the old certificate, and they enroll again on their new phone. If the password went with the phone, or the person shouldn’t be on the server any more, you need to remove the user too.

Removing the name from USERS doesn’t do that either. USERS only creates users and sets their passwords. It never deletes anyone, because you might have added users through the console that aren’t in your configuration.

Locking someone out: REVOKE

For a lockout that sticks, add the name to REVOKE in config/takserver.env:

REVOKE=bravo-1
docker compose up -d

When the server starts, the setup:

  1. Revokes every certificate the server issued to that name, through the same API the console uses
  2. Revokes any certificate made in advance with that name, and moves its files aside
  3. Deletes the user, so the password no longer works

The log confirms it:

Revoked enrolled certificates for bravo-1 (IDs 3)
Locked out: bravo-1

This time, signing in again from BRAVO-1 failed:

ATAK showing Registration failed, with the message Invalid credentials.

Registration failed with Invalid credentials is the same message you’d see for a mistyped password. ATAK doesn’t distinguish between a wrong password and a deleted user, and from a security point of view, that’s how it should be.

To let bravo-1 back in, take the name out of REVOKE and run docker compose up -d. The user is recreated with the same password from config/secrets.env. On the device, replace the server connection and sign in. If you’d rather they had a new password, delete their USER_PASS_BRAVO_1 line from config/secrets.env and run ./setup.sh first.

Console: RevokeREVOKE=<name>
Takes effectImmediatelyOn docker compose up -d
Enrolled certificatesThe one you pickAll of them, for that name
Certificates made in advanceNot listedRevoked
Can they enroll again?Yes, with their passwordNo, until you remove the name
Kept in your configurationNoYes

Use the console when you need someone off right now. Then add them to REVOKE, so the lockout survives a rebuild and is written down where the rest of your team can see it.

Groups: who sees whom

So far, everyone has been in the same group, __ANON__, so everyone shares with everyone. Groups split that up. Through the server, a device only receives traffic from devices it has a group in common with.

USER_GROUPS sets them:

USER_GROUPS=alpha-1:blue bravo-1:red

A name can be in more than one group, separated by commas, for example alpha-1:blue,red. Anyone not listed stays in __ANON__. Apply it with docker compose up -d, and devices pick up their groups when they reconnect.

Turn off the mesh first

Groups belong to the server. Two devices on the same Wi-Fi still share their positions over multicast, exactly as they did in the second article, whatever groups they’re in. If you leave the mesh on, you’ll split your devices into groups and still see them on each other’s maps.

For this test, I turned off mesh networking on both devices, so that everything had to come through the server:

ATAK's Network Connection Preferences, with Enable Mesh Network Mode unticked.

That’s also worth knowing for real deployments. If teams must not see each other, group membership on the server isn’t enough on its own. Devices that share a network can still find each other over the mesh.

The test

With alpha-1 in blue and bravo-1 in red, I moved ALPHA-1 about a kilometre east and waited two and a half minutes. On BRAVO-1’s map, ALPHA-1 stayed exactly where it had been before the split:

BRAVO-1's map with ALPHA-1 still at its old position, west of BRAVO-1, after ALPHA-1 had moved.

Then I put both in blue, restarted, and moved ALPHA-1 slightly once more. Fifteen seconds after the move, BRAVO-1’s map showed it at its new position:

BRAVO-1's map with ALPHA-1 at its new position, north-east of BRAVO-1.

Manage Users in the admin console shows each user’s groups, if you want to check what the server applied.

Groups from a directory

Listing groups in a file works for a lab or a small team. Larger organizations usually keep group membership in a directory already. TAK Server can look up a user’s groups in LDAP or Active Directory, by the name in their certificate, so the directory stays the one place you manage people. That needs a directory to connect to and its own configuration, so I’ll leave it there for now.

Certificates don’t last forever

Everything in our chain has an end date:

CertificateLastsWhen it runs out
Device certificates1 yearThat device can’t connect until it enrolls again
Intermediate CA2 yearsNothing it signed validates any more
Root CA10 yearsNothing under it validates any more

Run ./rotate-ca.sh status to see where you stand:

root-ca           TAK-STACK-CA                 expires Nov  4 17:53:41 2036 GMT
intermediate      intermediate                 expires Nov  4 17:53:41 2028 GMT
server            takserver                    issued by intermediate

A device certificate is the easy one. The device enrolls again and gets a new one. The CAs are harder, because everything depends on them. When one expires, every certificate it signed fails at once, whatever their own dates say.

Expiry, key exposure or a policy change can require a CA replacement. The walkthrough below uses a staged migration: keep the old and new CAs trusted while devices move across, then retire the old ones. The scripts restart the server, so devices will briefly disconnect and need to reconnect.

Rotating the intermediate CA

The intermediate is the one you’ll replace more often. It signs everything day to day, so its key is the one in use. Replacing it keeps the same root.

The approach is to run old and new side by side, move every device across, then retire the old one:

./rotate-ca.sh intermediate
Keeping the current intermediate trusted as intermediate-old
Will reissue on next start: admin (old files in superseded/20261105-184202)
root-ca           TAK-STACK-CA                 expires Nov  4 17:53:41 2036 GMT
intermediate      intermediate-2               expires Nov  4 18:42:02 2028 GMT
intermediate-old  intermediate                 expires Nov  4 17:53:41 2028 GMT
server            takserver                    issued by intermediate

Here’s what changed:

  • A new intermediate, intermediate-2, now signs every new certificate, including enrollments
  • The server trusts both intermediates, so certificates from either one still connect
  • The server keeps its current certificate, from the old intermediate, for now
  • The admin certificate and any certificates made in advance are reissued by the new intermediate. The old files are kept in superseded/ and keep working until you retire the old CA

The script restarts the server. Both devices reconnected on their existing certificates, without anyone touching them.

Moving the devices across

Each device needs two things: a certificate from the new intermediate, and the new intermediate in its truststore. The second one is easy to miss.

My first attempt was to enroll ALPHA-1 again without changing its truststore. It got a new certificate, and everything kept working, until I retired the old intermediate. Then ALPHA-1 refused to connect:

ATAK's TAK Servers list on ALPHA-1, with the error SSL handshake failure, remote host's certificate not trusted; check truststore.

The server was sending its full chain: its own certificate, intermediate-2, and the root. ALPHA-1 trusted that root. With ATAK 5.8, that wasn’t enough: it needed intermediate-2 itself in the connection’s truststore. A test client built on OpenSSL accepted the same chain with only the root, so this is how ATAK checks the server, not a fault in the chain.

So devices need a new package. The package always contains every CA the server currently trusts, so build a new one:

./make-datapackage.sh 192.168.1.50

There’s one more ATAK detail. Importing a package over a working connection didn’t replace its truststore. The new file sat unused on the device, and ATAK didn’t ask for a password. Removing the connection first worked in my tests. On each device:

  1. Remove the server connection
  2. Import the new package
  3. Sign in with the same username and password as before

That one sign-in gets the new truststore and a new certificate. Then import the new admin.p12 in your browser, and rebuild any packages made with --with-cert.

Retiring the old intermediate

Once every device has moved, retire the old CA:

./rotate-ca.sh retire
Revoking the old intermediate: intermediate
Retired the old CAs (files in retired/20261105-191429)
Will reissue on next start: takserver
root-ca           TAK-STACK-CA                 expires Nov  4 17:53:41 2036 GMT
intermediate      intermediate-2               expires Nov  4 18:42:02 2028 GMT

The server stops trusting the old intermediate, and gets a new certificate of its own from intermediate-2. That’s why the devices needed the new truststore first: this is the moment the server’s chain changes.

retire also revokes the old intermediate in the root’s revocation list. A device might still present the old intermediate alongside its certificate, and the root signed that intermediate, so without the revocation, the server could still accept the chain. In my tests, the server refused old certificates either way, but the revocation makes it explicit instead of a side effect.

Both devices reconnected on their new certificates, and anything still holding a certificate from the old intermediate is now refused.

The Client Certificates page doesn’t tell you which CA issued each certificate, and certificates from a retired CA still look active there, because they haven’t expired. They can’t connect, but you won’t see that on this page.

Rotating the root CA

Replacing the root is rarer, and it reaches further: every device, and every system that trusts your server, trusts this root. The steps are the same as for the intermediate, with two differences.

First, give the new root a new name. Two roots with the same name make it harder to tell old and new apart, in truststores and in error messages. Change CA_NAME in config/takserver.env, then rotate:

CA_NAME=TAK-STACK-CA-2026
./rotate-ca.sh root
Keeping the current root and intermediate trusted as root-ca-old and intermediate-old
Creating root CA: TAK-STACK-CA-2026
root-ca           TAK-STACK-CA-2026            expires Nov  4 19:23:21 2036 GMT
intermediate      intermediate-3               expires Nov  4 19:23:21 2028 GMT
root-ca-old       TAK-STACK-CA                 expires Nov  4 17:53:41 2036 GMT
intermediate-old  intermediate-2               expires Nov  4 18:42:02 2028 GMT
server            takserver                    issued by intermediate-2

Second, there’s no shared root to fall back on, so the package matters even more. The new package holds both roots and both intermediates. A device that imports it trusts the server before and after the switch.

The rest follows the same pattern. Both devices stayed connected after the rotation. I moved each one across by removing the connection, importing the new package and signing in. Then I retired the old root:

./rotate-ca.sh retire

The server came back with a certificate under TAK-STACK-CA-2026, and both devices reconnected. The old admin certificates in superseded/ were refused from then on, and only the new admin.p12 opened the console.

To see what a device that missed the move would do, I connected a test client that still had only the old truststore. It refused the server’s new certificate, because nothing in that truststore leads to the new root. The fix for a device in that state is the same as before: remove the connection and import the current package.

Beyond your own devices

Your devices aren’t the only things that trust your root. Anything else that connects to your server with a certificate, such as data feeds and other TAK servers you exchange data with, needs the new root before you retire the old one. Ask for their timelines before you start, not after.

Common errors

Errors encountered during testing, and what caused them:

What you seeWhereWhat caused it
Registration failed: Invalid credentialsATAK, when signing inA wrong password, or a user who’s been removed with REVOKE
Server Authentication Error: The TAK Server's identity could not be verifiedATAK, when signing inThe device’s truststore is from a different CA, for example after a clean start
SSL handshake failure … remote host's certificate not trusted; check truststoreATAK, TAK Servers listThe server’s certificate is from a CA that isn’t in the device’s truststore. Replace the connection with a current package
IO error; reconnectingATAK, TAK Servers listThe server refused the device’s certificate, for example because it’s revoked
Data reception timeoutATAK, TAK Servers listSeen after a clean start, while the device still had its certificate and truststore from the old CA
RevokedException: Attempt to use revoked certificateServer logA revoked certificate, refused by the database check
certificate unknowncurl, connecting to the admin consoleThe server had no revocation list from the CA that signed the certificate

If an error doesn’t make sense, check two things first. Does the device’s truststore hold the CA that signed the server’s certificate? And has the server got a valid, unrevoked certificate on record for the device?

What you’ve built

The updated scripts provide revocation checks and CA rotation tools. In this walkthrough, you’ve used them and the group configuration to:

  • Revoke a certificate and remove enrollment access. In the test, the console disconnected the device immediately and rejected its revoked certificate on retry. REVOKE also removed the user’s enrollment access until the lockout was lifted
  • Separate devices into groups. USER_GROUPS controlled who shared with whom through the server, with mesh networking disabled for the test
  • Rotate CAs in stages. ./rotate-ca.sh kept old and new CAs trusted during migration. Devices reconnected after server restarts, and retire removed the old CAs from the trusted set

The configuration records group assignments and user lockouts; the certificate volume preserves CA and certificate state across restarts. Rotation also requires updating each device’s connection package and certificate before retiring the old CAs.

Two things to watch. The CA keys live on the same volume as the server. That’s convenient here, but in production, the root key belongs offline. And moving a device across means touching it, so a rotation for a large team needs planning around people, not just certificates.

Next up: we’ve used ATAK throughout. Next, we’ll connect two browser clients to this server, and see which suits which team.