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

TAK Server Sign-In with LDAP, Active Directory and OAuth

So far, every TAK Server user has lived in our configuration. USERS lists their names, setup.sh makes their passwords, and USER_GROUPS decides who sees whom. That works for a lab. An organization already keeps its people somewhere else, usually a directory such as Active Directory, often with an identity provider in front of it for web sign-in, and wants one place to add someone, move them between teams and lock them out.

TAK Server can use both. It can check passwords and read groups from a directory over LDAP, and it can take sign-ins and groups from an identity provider over OpenID Connect (OIDC), the sign-in layer built on OAuth 2. The configuration guide gives OAuth a single paragraph, about TAK Server issuing its own tokens rather than trusting someone else’s, so I read TAK Server’s source for the details, then tested each one.

This article runs Keycloak, an open source identity provider, and signs WebTAK users in through it. That leaves ATAK out, for reasons the source and a test device agree on. So the article then adds a directory, OpenLDAP, that TAK Server and Keycloak both read. One account and one password then work on a phone and in a browser, with the same groups. Last, it does the same with Active Directory, using Samba to stand in for Windows.

What you’ll need

The setup from the previous articles, with TAK Server running. This article adds a Keycloak folder and sign-in settings, so update your copy first:

cd tak-stack
git stash
git pull
git stash pop

Keycloak runs as one more container, published on port 8080, so that port needs to be free. Its image comes from Keycloak’s own registry, quay.io/keycloak/keycloak. The Compose file pins version 26.8.2 by digest, so you get the image I tested.

The directories are built from Debian’s own packages on the official Debian 13 image, also pinned by digest: OpenLDAP 2.6.10 and Samba 4.22.11. They don’t publish ports. TAK Server and Keycloak reach them on Docker’s network.

Server B and Federation Hub from the last article can stay stopped. Server A keeps its federation settings and retries the hub in its log, which doesn’t affect anything here. Leave the feeds from the eighth article running, so WebTAK has something to show.

How sign-in works with a provider

Today, WebTAK on port 8446 sends your username and password to TAK Server, which checks them against its own users and gives the browser a token. With an identity provider, TAK Server hands that job over:

  1. Your browser asks for WebTAK and lands on TAK Server’s sign-in page, which now has a Login with Keycloak link.
  2. The link sends the browser to Keycloak, where you sign in.
  3. Keycloak sends the browser back to TAK Server with a one-time code. TAK Server swaps the code for an access token, directly with Keycloak, and keeps the token in a browser cookie.
  4. On each request, TAK Server checks the token’s signature against Keycloak’s published keys, reads the username from one claim and the groups from another, and puts you in those groups.

TAK Server doesn’t store a password for these users, and they don’t need to be in USERS. A group in the token works like one in USER_GROUPS: a user whose token says blue is in blue, both sending and receiving. A _READ or _WRITE suffix on the group name limits it to one direction, the same rule TAK Server applies to groups from LDAP.

Our existing users keep working. alpha-1 to delta-1, the feeds and the admin certificate don’t change, and the sign-in page still accepts TAK Server’s own usernames and passwords.

Start Keycloak

The compose/keycloak folder runs Keycloak on TAK Server’s Docker network, as compose/cloudtak does for CloudTAK:

cd tak-stack/compose/keycloak
./setup.sh
docker compose up -d

setup.sh creates two random secrets in config/secrets.env: the password for Keycloak’s admin account and a client secret, which TAK Server uses to prove who it is when it swaps codes for tokens. It also writes that client secret into TAK Server’s config/secrets.env, as OAUTH_CLIENT_SECRET, and takes Keycloak’s address from the first entry in TAK Server’s SERVER_ADDRESSES.

On first start, Keycloak creates a realm called tak from realm/tak-realm.json. A realm is Keycloak’s word for a separate set of users. This one has:

  • A client called takserver, for TAK Server, which may only send browsers back to https://<address>:8446/login/redirect
  • A groups claim, which puts each user’s Keycloak groups in their token by name
  • Groups called blue and maritime, matching the groups our TAK Server already uses, and tak-admins for later

The log says when it’s ready:

Realm 'tak' imported
Keycloak 26.8.2 on JVM (powered by Quarkus 3.40.1.1) started in 5.165s. Listening on: http://0.0.0.0:8080

Keycloak runs here in development mode, with plain HTTP and a built-in database. That’s fine on one computer, where the browser reaches it as localhost. Signing in from other devices would send passwords across your network unencrypted, and I haven’t tested that. A production Keycloak needs HTTPS and a proper database, which is a deployment of its own.

Connect TAK Server to Keycloak

In tak-stack/compose/takserver/config/takserver.env, point TAK Server at the realm:

OAUTH_PROVIDER=http://keycloak:8080/realms/tak

That’s Keycloak’s address as TAK Server reaches it, by its name on the Docker network. Browsers use localhost instead. Keycloak gives each one the right address: links for the browser use localhost, and the addresses TAK Server calls directly use keycloak. Restart TAK Server from tak-stack/compose/takserver:

docker compose up -d

The log confirms it:

Identity provider: Keycloak at http://keycloak:8080/realms/tak, client takserver

The start script adds this to CoreConfig.xml, shown here with the secret removed:

<oauth useTakServerLoginPage="true" groupsClaim="groups" usernameClaim="preferred_username">
    <openIdDiscoveryConfiguration name="Keycloak" clientId="takserver" secret="..."
        redirectUri="https://localhost:8446/login/redirect"
        configurationUri="http://keycloak:8080/realms/tak/.well-known/openid-configuration"/>
</oauth>

openIdDiscoveryConfiguration lets TAK Server read Keycloak’s sign-in addresses and signing keys from one URL, rather than us copying them in. Two attributes needed care:

  • usernameClaim. Without it, TAK Server uses the email address as the username, according to its source. preferred_username is the username you type into Keycloak, which matches how our other users are named.
  • useTakServerLoginPage. Without it, TAK Server’s source sends browsers that aren’t signed in straight to Keycloak, and our existing users would lose the password form. With it, the form stays, with a link to Keycloak underneath.

Add a user in Keycloak

Open Keycloak’s admin console at http://localhost:8080 and sign in as admin, with KC_BOOTSTRAP_ADMIN_PASSWORD from tak-stack/compose/keycloak/config/secrets.env. A banner calls it a temporary admin account, which it is: fine for this lab, and something to replace in a real deployment.

Add a user called foxtrot-1 in the tak realm, in the blue group:

Keycloak's Create user form in the TAK realm, with username foxtrot-1, an email address, first and last names, and the blue group selected.

Fill in the email address and names. Keycloak’s default profile requires them, and a user created without them is asked for them at their first sign-in. Then set a password on the Credentials tab. Leave Temporary on, and the user chooses their own at first sign-in.

Sign in to WebTAK

Open https://localhost:8446/webtak/index.html. TAK Server’s sign-in page now has a link under the form:

TAK Server's sign-in page, with username and password fields, a Login button, and a Login with Keycloak link underneath.

Click Login with Keycloak. The browser goes to Keycloak’s page for the tak realm:

Keycloak's Sign in to your account page, titled TAK.

Sign in as foxtrot-1, set a new password when asked, and Keycloak sends you back to TAK Server. Open WebTAK again. On a first visit, it opens User Information: set the callsign to FOXTROT-1 and click Save.

TAK Server listed the session as foxtrot-1, in blue both ways, taken from the token. WebTAK showed the blue aircraft and TRACTOR-1. The vessels are in maritime, which foxtrot-1 isn’t:

WebTAK signed in as FOXTROT-1 through Keycloak, showing aircraft and TRACTOR-1 around Calgary.

foxtrot-1 isn’t in USERS, and TAK Server’s user file, UserAuthenticationFile.xml, doesn’t list them. The user and their group live in Keycloak.

Change a user’s groups in Keycloak

To move foxtrot-1 to maritime, change their groups in Keycloak: join maritime and leave blue. Nothing changes on TAK Server.

The change reaches a signed-in user when their token is renewed. Keycloak’s tokens last 5 minutes here. I moved foxtrot-1 while their WebTAK session was open, and TAK Server kept that session in blue until its first token ran out. Between 4.5 and 5 minutes after the move, the same session switched to maritime, without signing in again.

Move foxtrot-1 back to blue before carrying on.

Disable a user in Keycloak

Disabling a user in Keycloak stops new sign-ins straight away. Keycloak refuses them with Account disabled.

It didn’t end a session that was already open. I disabled foxtrot-1 with WebTAK signed in, and TAK Server still listed that session, with its groups, 6.5 minutes later, when the test ended. That’s past the 5-minute token. Disabling also stops the token being renewed, so the session’s groups stay as they were.

So disabling in Keycloak is the way to stop someone signing in, but don’t count on it to cut off a session in progress. I haven’t tested what ends one. REVOKE from the sixth article doesn’t apply here either: it deletes TAK Server users and revokes certificates, and a Keycloak user in WebTAK has neither.

Enable foxtrot-1 again before carrying on.

Admins from a Keycloak group

TAK Server can give its admin role to members of a Keycloak group. The realm already has one for this, tak-admins. In takserver.env:

OAUTH_ADMIN_GROUP=tak-admins

Restart TAK Server with docker compose up -d from tak-stack/compose/takserver, and add a user called golf-1 in the tak-admins group. Signed in through Keycloak, golf-1 could read the admin-only certificate list on port 8446. foxtrot-1, signed in the same way, was refused with HTTP 403.

Until now, admin access on our server has needed the admin certificate. With this setting, a Keycloak password is enough. Protect Keycloak’s tak-admins group and its sign-in at least as well as you protected that certificate.

A token issued to another client was accepted

TAK Server checks that a token was signed by the realm and hasn’t expired. In my tests, it didn’t check which client the token was issued to. Every Keycloak realm also has an admin-cli client, which accepts a username and password directly. I got a token for foxtrot-1 from admin-cli instead of takserver, and TAK Server accepted it: HTTP 200, where a request with no token got 403.

That token had no username or groups claim, so TAK Server put the request in __ANON__, its default group. No users or feeds in our setup are in __ANON__ any more. The test shows that a token issued to admin-cli was accepted at /Marti/api/groups/all, even though it wasn’t issued to takserver. It doesn’t establish access to every endpoint or acceptance of every token type. Use a dedicated realm for TAK users to limit who can obtain tokens from the trusted issuer.

What about ATAK?

For this part of the walkthrough, ATAK users keep their existing certificate enrollment. The token link I tested didn’t select bearer authentication:

ATAK enrolls by sending a username and password to port 8446. TAK Server checks those against its own users, not Keycloak: sending foxtrot-1’s Keycloak password that way got HTTP 401. ATAK also accepts enrollment links with a token in place of the password:

tak://com.atakmap.app/enroll?host=<server>&username=<user>&token=<token>

I sent one to a test device with a Keycloak token for foxtrot-1. ATAK 5.8 offered quick enrollment as foxtrot-1, and its log showed how it would send the token:

enrollment new - id 3 host=10.0.2.2 port=8446 auth=basic

auth=basic is a username and password. TAK Server only treats a token as a token when it arrives as Authorization: Bearer. Sending the Keycloak token as a password, from a computer, got HTTP 401.

ATAK’s public source, at version 5.5, agrees. Its enrollment library can send a bearer token, but every enrollment path in the app, from the setup wizard to data package import and these links, passes the token flag as false. ATAK does contain an OAuth client, but it’s hard-coded to auth.tak.gov, for linking a device to a tak.gov account, not to your own server.

Sending the same token as Authorization: Bearer worked: TAK Server issued a certificate for foxtrot-1, and stored the token with it. A client that enrolls that way can take its groups from the token, with one more setting:

OAUTH_CERT_GROUPS=true

That sets x509tokenAuth in CoreConfig.xml. With it on, my token-enrolled certificate connected as foxtrot-1 in blue. With it off, the same certificate connected in __ANON__.

The groups come from the token stored at enrollment, and TAK Server accepts it after it has expired. After that token expired, I moved foxtrot-1 to maritime and disabled them in Keycloak. The certificate still connected, in blue. For these certificates, Keycloak decides who can enroll, but changing or disabling the user afterwards doesn’t reach the certificate. Revoke it in TAK Server’s admin console. I’ve left OAUTH_CERT_GROUPS off.

ATAK does check a password against a directory, though, if TAK Server has one. That’s the way to give ATAK and the browser the same accounts.

A directory for ATAK and the browser

A directory holds users, their passwords and their groups, and other systems sign in against it over LDAP. With one behind TAK Server, ATAK users enroll with their directory password and get their directory groups. With Keycloak reading the same directory, WebTAK users sign in with that same password and get the same groups in their token.

Start OpenLDAP

The compose/openldap folder runs OpenLDAP on TAK Server’s Docker network. The directory starts with the users and groups in config/directory.env. To carry our users across with their groups from the eighth and ninth articles, set:

DIRECTORY_USERS=alpha-1 bravo-1 charlie-1 delta-1 hotel-1 india-1
DIRECTORY_GROUPS=alpha-1:blue,federation bravo-1:blue charlie-1:blue,maritime delta-1:blue hotel-1:blue india-1:maritime

hotel-1 and india-1 are new users who exist only in the directory. Then start it:

cd tak-stack/compose/openldap
./setup.sh
docker compose up -d --build

setup.sh creates the directory’s admin password, a password for each user, and the passwords for two service accounts, which TAK Server and Keycloak read the directory with. It writes TAK Server’s into TAK Server’s config/secrets.env, as LDAP_SERVICE_PASSWORD. The users’ directory passwords are new, and are in tak-stack/compose/openldap/config/secrets.env.

On first start, the container runs Debian’s own OpenLDAP setup for dc=takstack,dc=lab and turns on memberof, which lists each user’s groups on their own entry. TAK Server reads groups from there. The log ends with:

Directory ready: dc=takstack,dc=lab

Connect TAK Server to the directory

In tak-stack/compose/takserver/config/takserver.env:

LDAP_URL=ldap://openldap/
LDAP_USERSTRING=uid={username},ou=People,dc=takstack,dc=lab
LDAP_STYLE=DS
LDAP_SERVICE_ACCOUNT=cn=takserver,ou=Services,dc=takstack,dc=lab
LDAP_GROUP_BASE=ou=Groups
LDAP_GROUP_CLASS=groupOfNames

LDAP_USERSTRING says how to find a user: TAK Server signs in to the directory as that entry, with the password the user typed. DS is TAK Server’s name for a standards-based directory, as opposed to AD. Restart TAK Server from tak-stack/compose/takserver with docker compose up -d. The start script makes the directory TAK Server’s main sign-in source, default="ldap", and the log shows:

Directory: DS at ldap://openldap/, users as uid={username},ou=People,dc=takstack,dc=lab

From now on, password sign-ins only check the directory. That includes ATAK enrollment and WebTAK’s password form. A password from USERS stopped working: alpha-1’s old password got HTTP 401. Certificates already issued keep working, so ALPHA-1 and BRAVO-1 stayed connected. To enroll again, or sign in to WebTAK, they use their directory password.

Enroll a device as a directory user

On a device, replace the server connection and sign in as hotel-1, with their directory password. The device enrolled, and TAK Server put it in blue, read from the directory:

hotel-1 | ALPHA-1 | ['blue:IN', 'blue:OUT']

hotel-1 isn’t in USERS or USER_GROUPS. Afterwards, I enrolled the same device as alpha-1 again, with alpha-1’s directory password, and it came back in blue and federation.

Change groups in the directory

If you re-enrolled the device as alpha-1 above, replace its server connection again and enroll as hotel-1 with the directory password before testing changes to that user’s groups.

TAK Server looks up connected users’ groups again every LDAP_UPDATE_INTERVAL seconds, 60 by default. I moved hotel-1 from blue to maritime in the directory while their device was connected. The device’s groups changed without reconnecting or enrolling again. Across two tests, the change took between 30 and 97 seconds.

One edge case: when I removed hotel-1 from every group, the device kept its last groups for the 2 minutes I watched. TAK Server’s source skips the update when the directory returns no groups.

Lock a directory account

OpenLDAP has no “disabled” flag, so our directory uses a password policy: setting pwdAccountLockedTime on an account locks it. Locked, hotel-1 couldn’t sign in: TAK Server returned HTTP 401 straight away.

Their enrolled device stayed connected, with its groups. Its certificate is still valid, and TAK Server reads groups with its own service account, not the user’s password. So the directory stops someone enrolling or signing in. Cutting off a device still means revoking its certificate, as in the sixth article.

Keycloak reads the directory

Before continuing, restore hotel-1 to an unlocked account in the blue group. Remove the pwdAccountLockedTime attribute set in the lock test, add the user back to blue, and remove any maritime membership added during testing. If you revoked the device’s certificate, replace its server connection and enroll again as hotel-1. Confirm that the device is connected as hotel-1 in blue before comparing it with WebTAK. These are preparation steps for the next exercise, not additional test results.

Keycloak can read users and groups from the same directory, read-only, and check their passwords against it. From tak-stack/compose/keycloak:

./connect-directory.sh openldap
Keycloak reads users and groups from openldap (ldap://openldap):
  alpha-1
  bravo-1
  charlie-1
  delta-1
  hotel-1
  india-1

The directory’s groups appear in Keycloak under a parent group called directory, so they don’t clash with the blue and maritime groups made in Keycloak earlier. Tokens carry the group name alone, so hotel-1’s token says blue.

One account, both ways

With hotel-1’s device connected, I signed in to WebTAK through Keycloak as hotel-1, with the same directory password. TAK Server listed both sessions, from one account:

hotel-1 | ALPHA-1 | ['blue:IN', 'blue:OUT']     ATAK, enrolled against the directory
hotel-1 | tls:8   | ['blue:IN', 'blue:OUT']     WebTAK, signed in through Keycloak

foxtrot-1, who only exists in Keycloak, still signed in as before.

Keycloak’s cache

Keycloak keeps a copy of each directory user, groups included. With its default cache, a group change in the directory didn’t reach Keycloak in my tests: the open WebTAK session kept blue for 6.5 minutes, and a new sign-in after that still got blue.

connect-directory.sh sets a 60-second cache lifespan instead, matching TAK Server’s lookup interval. With it, one change in the directory reached both sessions. The device switched within a minute, and the WebTAK session switched when its token was renewed, about 5 minutes after sign-in.

Locking hotel-1 in the directory stopped new sign-ins through Keycloak too: Keycloak checks the password by signing in to the directory as the user, and the directory refused. I didn’t test what a lock does to a WebTAK session that’s already open.

Change in the directoryATAKWebTAK through Keycloak
Move to another groupConnected device changed within 30 to 97 secondsOpen session changed at its next token renewal, with a 60-second cache
Lock the accountEnrollment refused. An enrolled device stays connectedSign-in refused. Open sessions not tested
Remove from every groupDevice kept its last groupsNot tested

Active Directory

TAK Server has an Active Directory style, AD, which finds users by their Windows logon name, sAMAccountName, rather than building their entry’s name. This section tests password checks, groups from memberOf, and Keycloak reading the same accounts against a Samba AD domain controller.

For this Mac-based lab, the compose/samba-ad folder runs Samba as an AD domain controller. These observations are from Samba; Windows Server AD and managed AD services weren’t tested:

  • Plain LDAP sign-ins were refused with Strong(er) authentication required, Transport encryption required. Our clients use LDAPS on port 636.
  • Users sign in as TAKSTACK\hotel-1, and are found by sAMAccountName.
  • Accounts have AD’s attributes, including memberOf and userAccountControl, and searches return AD’s referrals to its other partitions.

Start the domain controller

config/domain.env takes the same DIRECTORY_USERS and DIRECTORY_GROUPS as OpenLDAP. Use the same values, then:

cd tak-stack/compose/samba-ad
./setup.sh
docker compose up -d --build
./share-ca.sh

setup.sh writes TAK Server’s LDAP_SERVICE_PASSWORD for this domain’s service account, replacing OpenLDAP’s. TAK Server uses one directory at a time. Samba creates its own certificate and CA on first start, for DC1.takstack.lab, which is why our clients connect to that name. share-ca.sh copies the CA certificate, the public part only, to TAK Server’s config/ldap/ and Keycloak’s truststores/.

Users go in OU=People and TAK’s groups in OU=TAK. Without their own OU, Keycloak imported AD’s built-in accounts as well, Administrator, Guest and krbtgt among them.

Point TAK Server and Keycloak at AD

In takserver.env, replace the OpenLDAP settings with:

LDAP_URL=ldaps://dc1.takstack.lab/DC=takstack,DC=lab
LDAP_USERSTRING=TAKSTACK\{username}
LDAP_STYLE=AD
LDAP_SERVICE_ACCOUNT=CN=takserver,CN=Users,DC=takstack,DC=lab
LDAP_GROUP_BASE=OU=TAK
LDAP_GROUP_CLASS=group

The start script builds TAK Server’s LDAP truststore from config/ldap/ because the address starts with ldaps://. Restart Keycloak, so it loads the CA, then TAK Server, then connect Keycloak:

cd tak-stack/compose/keycloak
docker compose up -d --force-recreate
cd ../takserver
docker compose up -d
cd ../keycloak
./connect-directory.sh samba-ad

What we tested with AD

The same tests, with Samba managing the users through samba-tool:

  • Sign-in: TAK Server’s enrollment port accepted hotel-1’s AD password, checked over LDAPS, and refused a wrong one with HTTP 401. I tested this with the same request ATAK makes first, not with a device.
  • Groups: the device reconnected with the group it had been given in AD while offline. A later group change reached the connected device within 91 seconds, and the WebTAK session at its token renewal.
  • Disable: samba-tool user disable hotel-1, AD’s own disabled flag, stopped sign-ins to TAK Server and through Keycloak. The enrolled device stayed connected with its groups, as with OpenLDAP.

These tests ran against Samba, not Windows Server. At the end of this walkthrough, TAK Server and Keycloak are configured to use Samba over LDAPS. Keep that as the starting state for the next article unless it explicitly switches directories.

Common errors

Errors encountered during testing, and what caused them:

What you seeWhereWhat caused it
Failed to obtain JDBC connection, Could not open file /opt/keycloak/data/h2/keycloakdb.mv.dbdocker compose logs keycloakKeycloak couldn’t write its database. The volume must be mounted at /opt/keycloak/data, as in our Compose file
OAUTH_PROVIDER is set without OAUTH_CLIENT_SECRETdocker compose logs takserverRun ./setup.sh in tak-stack/compose/keycloak, then restart TAK Server
An Update Account Information page after signing inKeycloakThe user has no email address or names. Fill them in, or add them in the admin console
No groups in the Join Groups listKeycloak admin consoleThe console was still in the master realm. Choose tak under Manage realms first
A user’s new groups don’t showWebTAKIn the Keycloak group-change test, the session updated when its five-minute token was renewed. For directory users, also check the directory cache
A disabled user is still connectedWebTAKNew sign-ins were refused, but the observed session remained listed for 6.5 minutes. Ending an open session wasn’t tested
A USERS password gets HTTP 401Enrollment, WebTAK’s password formWith a directory, passwords are only checked against it. Use the directory password
A locked or disabled user’s device is still on the mapATAKIn testing, locking refused new sign-ins but left an enrolled device connected. Revoke its certificate to cut off certificate access
Object class violation, requires attribute 'member'ldapmodifyAn LDAP group can’t be empty. Add a member before removing the last one
Directory group changes don’t reach WebTAKWebTAK through KeycloakKeycloak’s cache. connect-directory.sh sets a 60-second lifespan; a token renewal then picks them up
Strong(er) authentication requiredLDAP client, against ADThe Samba lab refused the plain LDAP bind. Use ldaps:// on port 636 for this setup
LDAP_URL uses LDAPS, but config/ldap/ has no CA certificatedocker compose logs takserverRun ./share-ca.sh in tak-stack/compose/samba-ad
Keycloak lists Administrator, Guest and krbtgtKeycloak, with ADIts users DN was AD’s CN=Users. Keep TAK users in their own OU

What you’ve built

The updated repository adds Keycloak, OpenLDAP and Samba AD folders, and directory and sign-in settings for TAK Server. In this walkthrough, you’ve:

  • Signed in to WebTAK through Keycloak. TAK Server took foxtrot-1’s username and blue group from the token, with no TAK Server user
  • Examined ATAK’s enrollment-token path. The tested link selected basic authentication on ATAK 5.8, and a separate computer request sending the token as a basic password was refused. The device’s enrollment attempt didn’t complete because of stale trust; this doesn’t establish every possible ATAK integration
  • Put a directory behind TAK Server. ATAK enrolled as a directory user and got their directory groups. Passwords from USERS stopped working, while existing certificates kept connecting
  • Had Keycloak read the same directory. One account and one password worked in ATAK and WebTAK, with the same groups
  • Changed and locked directory accounts. OpenLDAP group changes reached a connected device in 30 to 97 seconds across two tests. With Keycloak’s directory cache set to 60 seconds, the tested WebTAK session updated at token renewal. Locking stopped sign-ins on both, but not an enrolled device: that still takes revoking its certificate
  • Done the same with Active Directory, using Samba over LDAPS
  • Made a Keycloak group the TAK Server admins, which makes Keycloak’s sign-in part of your admin security

In the token test, TAK Server accepted an admin-cli token at /Marti/api/groups/all. With OAUTH_CERT_GROUPS enabled, a token-enrolled certificate retained its original groups after token expiry and a user change in Keycloak. That option remains off in the walkthrough.

These tests ran with Keycloak in development mode, the directories on plain LDAP (OpenLDAP) or with Samba’s own certificate (AD), the browser on the same computer, and the lab’s root CA still named TAK-STACK-CA. The AD tests used Samba, not Windows Server.

Next up: running TAK Server on Kubernetes, how its clustering works, and when the added complexity is justified.