Introduction
Notakey Authentication Proxy (NtkP) is a RADIUS proxy that adds an approval on the user’s phone to a system that already checks passwords with RADIUS: a VPN gateway, a firewall, a router.
The gateway sends its requests to NtkP instead of the RADIUS server. NtkP has the password checked by that server as before, then asks the user through Notakey Authentication Server, and answers the gateway when the user has approved or denied.
Logins with PAP, CHAP, MS-CHAP and MS-CHAPv2 have been tried through real gateways. Logins of several rounds (Access-Challenge, EAP) are passed between the gateway and the server, and the user is asked after the server’s Access-Accept; they have not been tried with a gateway.
This manual describes version 2. Version 1 has a manual of its own.
What is new in version 2
Version 2 is a new code base. What an administrator sees of it:
- One configuration file takes the place of the environment variables and command line arguments of version 1. A file that is not valid stops the start and names every problem in it.
- Gateways are listed, each with its own secret. A packet from an address that is not listed is dropped unread.
- One login gives one request on the phone, also when the gateway repeats its request while the user is still deciding, with the same or with a new identifier.
- The password is checked first. The user is asked only after the RADIUS server accepted the password.
- Message-Authenticator is checked in requests and put into every reply, towards the gateways and towards the RADIUS servers.
- The user sees who asks: the text on the phone can name the gateway and the address the login comes from.
- A user gets a limited number of requests a minute and has one waiting at a time.
- The proxy has API credentials of its own for Notakey Authentication Server, and reaches it over HTTPS only.
- RADIUS accounting can be taken and sent on to the accounting servers.
- Status-Server is answered, for gateways and monitoring systems that ask whether their RADIUS server is there.
- The log is one JSON object per line, with one line for every login that ends; it can also be sent to a syslog collector.
--check-configand--validatecheck the configuration, and the way to the API and to the RADIUS servers, before the proxy is started.- The container is a single program without a shell. It does not run as root, writes nothing to disk and exists for amd64 and arm64.
- On Windows the same program runs as a service, without a wrapper program and without a runtime to install. It comes as a zip package with a script that installs the service.
When something goes wrong, a login ends in Access-Reject or without a reply, never in Access-Accept. No setting changes that; see Emergency access.
See Upgrading from version 1 for what an existing installation has to look at.
Technical Summary
NtkP keeps a list of the gateways (clients) that may send it requests: an address or a network, and a secret for each. It also has a list of the RADIUS servers that check passwords, and the address and credentials of the Notakey API.
What happens with an Access-Request:
- The address of the sender is looked up in the client list. A packet from any other address is dropped before anything in it is read.
- The packet is checked: its form, and its Message-Authenticator with the secret of the client.
- NtkP sends a request of its own to the RADIUS server, with the user name and the proof of the password that the gateway sent, and checks the reply of the server.
- When the server rejects or challenges, its answer goes to the gateway and nobody is asked.
- When the server accepts, NtkP asks Notakey Authentication Server who the user name stands for, and makes one approval request for that user.
- The user approves or denies on the phone. NtkP asks the server for the answer once a second.
- Approved: the gateway gets Access-Accept with the attributes of the RADIUS server. Denied, not answered in time, or anything failed on the way: Access-Reject.
While the user decides, the gateway usually repeats its request. NtkP recognises the repeats and neither asks the user again nor answers twice differently; see How logins are handled.
System Requirements
- Notakey Authentication Server 5.2.2 or later. The proxy does not ask the server for its version, and does not work with an older one.
- An API client for the proxy on that server, with the scopes
urn:notakey:authandurn:notakey:user. Make one for each proxy. On the Notakey appliance it is created for you. - Docker on a Linux host, amd64 or arm64, or the Notakey appliance with management tool 5.0.91 or later, or 64-bit Windows, as a service (see Installation instructions (Windows)).
- A RADIUS server that checks the passwords, as with version 1.
Installation instructions (Notakey appliance)
On the Notakey appliance the proxy is started and configured with ntk ap, and the appliance writes the
configuration file of the proxy from its own settings. The settings and commands are in the
appliance manual, section “Authentication
Proxy 2.0”. In short:
- The settings of version 1 (
ap.vpn_radius_address,ap.vpn_secret_inand the others) keep their names and are carried over. Two are not:ap.proxy_send_timeout, and the entries ofap.custom_paramsother thanREQUIRE_MESSAGE_AUTH. Version 2 does not use them, andntk ap validatenames each as a warning. ap.clientslists the gateways,ap.serversthe RADIUS servers, andap.configholds any other part of the configuration file described here (accounting, syslog, limits). What is written in them has the names of Configuration below.ap.clientscan also be only the addresses of the gateways; see below.ntk ap validatechecks the result, also with the proxy’s own--check-config, andntk ap configshows the file without its secrets.- The API client of the proxy is created by
ntk ap startwhen the server runs on the same appliance.
The gateways by address:
ntk cfg setc :ap.clients "192.0.2.10, 198.51.100.0/24"
This short form of ap.clients is for an installation whose gateways share one secret, as with version 1:
- Each entry is an IP address or a network, separated by commas or spaces. A network is written with its host bits zero.
- Each of them becomes a client with the secret of
ap.vpn_secret_in. Its name, in the log and in{gateway}, is its address (198.51.100.0-24for a network).ap.cisco_acl_passthroughapplies to them. - Message-Authenticator is required from them: a gateway that does not send it gets no answer. Only
REQUIRE_MESSAGE_AUTH=falseinap.custom_paramsaccepts requests without it. Until that entry is there withtrueorfalse,ntk ap validatereminds of it. ntk ap validaterefuses an entry that is not an address or a network, an address given twice, and addresses withoutap.vpn_secret_in.
A gateway with a name and a secret of its own is written in the full form, as an entry of
clients in a JSON list, set with --json-input. Both forms can be in one list. When every
gateway is in the full form, ap.vpn_secret_in, REQUIRE_MESSAGE_AUTH and ap.cisco_acl_passthrough are
not used for the gateways, and ntk ap validate says so.
ntk sys update changes an appliance from version 1 to version 2; see
Upgrading from version 1.
Installation instructions (Docker)
The proxy is published as the image naa/auth-proxy in the Notakey registry, with the version as its tag. The
same tag serves amd64 and arm64.
$ docker pull repo.notakey.com/naa/auth-proxy:2.0.0
Write the configuration file (see Configuration), check it, and start the container:
# Check the file, then the way to the Notakey API and to the RADIUS servers
$ docker run --rm -v "$PWD/authproxy.json:/etc/notakey/authproxy.json:ro" \
repo.notakey.com/naa/auth-proxy:2.0.0 --check-config
$ docker run --rm -v "$PWD/authproxy.json:/etc/notakey/authproxy.json:ro" \
repo.notakey.com/naa/auth-proxy:2.0.0 --validate
# Start
$ docker run -d --name auth-proxy --restart unless-stopped \
--read-only --cap-drop ALL --security-opt no-new-privileges:true \
-v "$PWD/authproxy.json:/etc/notakey/authproxy.json:ro" \
-p 1812:1812/udp \
repo.notakey.com/naa/auth-proxy:2.0.0
Things to know:
- The configuration is read from
/etc/notakey/authproxy.json. Mount it read-only. - The process runs as the user with the id 1654, not as root, and has to be able to read the configuration
and the secret files: give them to that user (
chown 1654). A file it cannot read ends the start with exit code 2 andcannot read .... - The file system can be read-only and no capability is needed (
--read-only --cap-drop ALL): the process writes nothing to disk and its ports are above 1024. - Publish the accounting port as well (
-p 1813:1813/udp) when the configuration has anaccountingsection. docker stopends it in order, within about 5 seconds: requests in work are finished, and requests that still wait on a phone are withdrawn.- The proxy knows a gateway by the source address of its packets. Docker with a published port keeps that
address on a Linux host with the usual bridge network. Docker Desktop replaces it with an address of its
own, and other set-ups that carry the packets through a process of their own may do the same. No client
entry matches then, and the counter
dropped_unknown_sourcegrows. Use the network of the host there (--network host). - A certificate authority of your own for the Notakey API: mount its certificate and name the file in the
environment variable
SSL_CERT_FILE. - Secrets can stay out of the file: see Secrets.
The image has no shell: docker exec cannot be used to look around in it. Everything the proxy has to say is
in its log (docker logs auth-proxy).
Installation instructions (Windows)
On 64-bit Windows the proxy runs as a Windows service, without a wrapper program and without a runtime to
install. It comes with a release as the package notakey-authproxy-<version>-win-x64.zip, with its SHA-256
checksum beside it. There is no MSI package.
| In the package | |
|---|---|
notakey-authproxy.exe |
The proxy. It needs nothing else installed. |
service.ps1 |
Installs, updates and removes the Windows service. |
authproxy.example.json |
A configuration to start from, with comments. |
INSTALL.txt |
The steps of this section, and those of the change from version 1, in full. |
Unpack the package and install the service, in PowerShell as an administrator:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\service.ps1 -Action Install -FirewallRule
| What | Where |
|---|---|
| Program | %ProgramFiles%\Notakey\AuthProxy\notakey-authproxy.exe |
| Configuration | %ProgramData%\Notakey\AuthProxy\authproxy.json |
| Log | %ProgramData%\Notakey\AuthProxy\logs\authproxy.log (see Log file) |
| Service | NotakeyAuthProxy, shown as “Notakey Authentication Proxy”. It starts with the system; beside version 1 it is started by hand until the change is made (see Beside version 1 on Windows). |
| Account | NT SERVICE\NotakeyAuthProxy: an account that exists for this service only, without a password and without rights beyond its own files |
The script does not start the service. Write the configuration from the example (see Configuration), check it, start the service and look at the log:
Copy-Item .\authproxy.example.json C:\ProgramData\Notakey\AuthProxy\authproxy.json
notepad C:\ProgramData\Notakey\AuthProxy\authproxy.json
& "C:\Program Files\Notakey\AuthProxy\notakey-authproxy.exe" --check-config
& "C:\Program Files\Notakey\AuthProxy\notakey-authproxy.exe" --validate
Start-Service NotakeyAuthProxy
Get-Content C:\ProgramData\Notakey\AuthProxy\logs\authproxy.log -Tail 20
After a change of the configuration, restart the service: Restart-Service NotakeyAuthProxy.
Things to know:
- The data directory holds the secrets of the gateways, of the RADIUS servers and of the API client. The script closes it to everyone but the system, the administrators and the service. The service can read the configuration and write only the log.
- Do not keep secrets in environment variables of the service (
secretEnv,clientSecretEnv): Windows stores them in the registry, where every user of the machine can read them. Write them into the configuration file, or usesecretFilewith a file in the data directory. A service that reads a secret from a variable starts and says so at every start (config_warning). -FirewallRuleallows incoming UDP to the program in Windows Firewall: on port 1812, and only on networks that Windows holds to be a domain or a private network. Name the ports when they are not 1812 alone, for instance with the accounting port:-FirewallRule -FirewallPorts 1812,1813. Run the script again with other ports to change the rule. Without a rule the gateways are not heard.- A network that Windows holds to be public, as that of a server in no domain often is: the rule does not
apply there, and the script says so when it finds one. Change the network to private
(
Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private), or make a rule for it by hand. - A service that does not start says why in the log file. Windows shows the exit code of the proxy as the
“service-specific error” (event 7024 in the System log,
SERVICE_EXIT_CODEinsc.exe query NotakeyAuthProxy); see Command line for the codes. One case leaves no line: the log file itself could not be opened. The exit code is 3 then; see that the directory of the log is there and that the service may write in it. Running the script again (-Action Install) makes the directory and gives the service its rights. - A service whose process ends unexpectedly is started again by Windows: after 5 seconds, twice, then every minute.
- To update, unpack the newer package and run the script again in the same way: the service is stopped, the program replaced and the service started again if it ran. The configuration, the log and the start mode of the service stay.
-Action Uninstallremoves the service, the firewall rule and the program. The configuration and the log stay unless-RemoveDatais given.- Without
--servicethe program runs in a console as it does elsewhere, and Ctrl+C stops it.--serviceis only for the command line of the service itself.
Beside version 1 on Windows
The MSI package of version 1 (“Notakey Heimdall”) put the proxy into
Program Files (x86)\Authentication Proxy as the service “Notakey Authentication Proxy (Heimdall)”, with its
settings in winsw.xml. Version 2 reads, changes and removes nothing of that: the names, the directories and
the service are different, and both can be installed on one machine. Both cannot listen on the same port, so
only one of the two services runs at a time.
The script says when it finds the service of version 1, and leaves it running. Beside it the new service is registered to start by hand, not with the system: otherwise the two would compete for the port after a restart of the machine.
- Write
authproxy.jsonfromwinsw.xml. A setting of version 1 stands there as two<argument>lines, the name and then the value, or as<env name="..." value="..."/>with the name of its variable; an argument wins over a variable. Upgrading from version 1 names the setting for each variable, andINSTALL.txtfor each argument as well. - Check the file with
--check-configand--validate. Both can be run while version 1 works. - Change over:
Stop-Service "Notakey Authentication Proxy (Heimdall)"
Set-Service "Notakey Authentication Proxy (Heimdall)" -StartupType Disabled
Set-Service NotakeyAuthProxy -StartupType Automatic
Start-Service NotakeyAuthProxy
To go back:
Stop-Service NotakeyAuthProxy
Set-Service NotakeyAuthProxy -StartupType Manual
Set-Service "Notakey Authentication Proxy (Heimdall)" -StartupType Automatic
Start-Service "Notakey Authentication Proxy (Heimdall)"
Disabling the service that is not used matters: with both starting with Windows, the one that comes second after a restart of the machine finds the port taken. When version 2 has done its work for a while, remove version 1 in “Apps and features” (“Notakey Heimdall”).
Configuration
The configuration is one JSON file. Comments (//) and a comma after the last entry of a list are allowed.
Setting names are written exactly as shown here. An unknown setting, a setting given twice and a value of the
wrong type are errors, and the proxy does not start with a file that is not valid.
A complete file with one gateway and one RADIUS server:
{
"listen": { "address": "0.0.0.0", "port": 1812 },
"clients": [
{ "name": "vpn-gw", "address": "192.0.2.10", "secret": "<secret of the gateway>" }
],
"passwordCheck": {
"servers": [
{ "name": "nps-1", "address": "192.0.2.50", "secret": "<secret of the server>" }
]
},
"notakey": {
"url": "https://notakey.example.com/api",
"serviceId": "a1234567-b123-c123-d123-e12345678901",
"clientId": "c1234567-d123-e123-f123-a12345678901",
"clientSecret": "<secret of the API client>"
}
}
clients, passwordCheck.servers and notakey are required. Everything else has a default.
listen
| Setting | Default | Description |
|---|---|---|
| listen.address | 0.0.0.0 | IP address on which the proxy takes authentication requests. |
| listen.port | 1812 | UDP port for authentication requests, 1 to 65535. |
clients
The gateways that may send requests. At least one is required.
| Setting | Default | Description |
|---|---|---|
| name | (required) | Name of the gateway in the log and in the text on the phone. Up to 64 letters, digits, spaces, dots, dashes or underscores. Each name once. |
| address | (required) | One IP address, or a network such as 198.51.100.0/24 with the host bits zero. Each address or network once. When several entries contain a sender, the most specific one applies. |
| secret, secretEnv, secretFile | (one is required) | The shared secret of the gateway; see Secrets. |
| requireMessageAuthenticator | true | A request without Message-Authenticator is dropped. With false it is taken, and the start gives a warning. See Message-Authenticator. |
| ciscoAclDownload | false | Lets a Cisco device download its access lists; see Cisco downloadable access lists. |
| statusServer | true | Answer Status-Server packets of this gateway; see Status-Server. |
passwordCheck
The RADIUS servers that check the password.
| Setting | Default | Description |
|---|---|---|
| passwordCheck.servers | (required) | The servers in order of preference, 1 to 8. |
| passwordCheck.timeoutSeconds | 3 | How long one transmission waits for the reply, 1 to 30. |
| passwordCheck.tries | 2 | How many times a request is sent to one server before the next one is asked, 1 to 10. |
Each server:
| Setting | Default | Description |
|---|---|---|
| name | (required) | Name of the server in the log. Up to 64 letters, digits, spaces, dots, dashes or underscores. |
| address | (required) | IP address or host name. An address is written in full: IPv4 as four decimal numbers, IPv6 without brackets or zone. The port is not written here. |
| port | 1812 | UDP port of the server. |
| secret, secretEnv, secretFile | (one is required) | The shared secret of the server; see Secrets. |
| requireMessageAuthenticator | true | A reply of the server without Message-Authenticator is dropped. With false it is taken, and the start gives a warning. |
- The first server is asked. When it does not answer in all its tries, the next one is asked, and a server that
did not answer is asked after the others for the next 30 seconds (
server_not_answeringin the log, laterserver_answering). When no server answers, the gateway gets no reply. - A host name is looked up when the first request needs it and again every 60 seconds. When a name has several addresses (at most 8 are used), each is asked with its own tries. An IP address needs no lookup and is the better choice where the address of the server does not change.
- When servers, tries and timeout together come to more than
logins.timeoutSeconds, the start gives a warning: the gateway will have given up long before. - All gateways use the same servers. Each gateway has a share of the requests that may wait for them; see limits.
- A server that checks one-time codes is not supported behind the proxy: a repeat of a login is checked by the server again, and such a server rejects a code it has seen.
notakey
Notakey Authentication Server and what the user is asked.
| Setting | Default | Description |
|---|---|---|
| notakey.url | (required) | Address of the Notakey API, including the scheme and the path, excluding the API version. For example https://notakey.example.com/api. |
| notakey.serviceId | (required) | Access ID of the service, as seen on the service settings page of the dashboard. |
| notakey.clientId | (required) | ID of the API client made for this proxy. |
| notakey.clientSecret, clientSecretEnv, clientSecretFile | (one is required) | Secret of that API client; see Secrets. |
| notakey.timeoutSeconds | 5 | Time limit of one call to the API, 1 to 30. |
| notakey.messageTitle | VPN authentication | Title of the request on the phone; see Notification texts. |
| notakey.messageDescription | Do you want to allow VPN access for user {user}? Gateway: {gateway}. From: {address}. | Text of the request on the phone. |
| notakey.proxyName | (host name) | Name this proxy gives to the API with every call. Give it in a container, where the host name is the container id. Up to 64 letters, digits, spaces, dots, dashes or underscores. |
| notakey.allowInsecureHttp | false | Take an http:// address in notakey.url. |
- HTTPS. The certificate of the server is checked against the certificate authorities of the system: chain,
dates and name. No setting turns that off. Plain
http://is taken only with"allowInsecureHttp": trueand gives a warning at every start: the client secret and the answers of the users then travel unprotected. It is meant for a lab and for an API on the same host as the proxy. - Redirects are not followed. An HTTP proxy named in the environment variable
HTTPS_PROXYorHTTP_PROXYis used. - How long the user can answer is
logins.timeoutSeconds. - At start the proxy asks the API for a token once and writes
api_readyorapi_not_readyto the log. It runs either way; without a token every login is refused. - Two proxies do not share requests. A gateway that turns to its second proxy while the user is being asked by the first causes a second request on the phone, and only the answer to that one counts for the second proxy. Set the timeout of the gateway so that it stays with one proxy for the whole login.
logins
| Setting | Default | Description |
|---|---|---|
| logins.timeoutSeconds | 60 | How long a login waits for the answer on the phone, 5 to 300. After that it is refused and the request disappears from the phone. |
| logins.replyCacheSeconds | 30 | How long a sent reply is kept for a gateway that repeats its request, and how long a denied login is refused without the phone, 5 to 60. |
| logins.approvalReuseSeconds | 10 | How long after an approval the same login under a new identifier is accepted without the phone, 0 to 60. Only for requests with Calling-Station-Id. |
| logins.pushesPerMinute | 3 | How many requests one user can get on the phone in a minute, 1 to 60. |
accounting
Optional. Without the section the proxy does not listen for accounting. See Accounting.
| Setting | Default | Description |
|---|---|---|
| accounting.listen.address | (address of listen) |
IP address for accounting requests. |
| accounting.listen.port | 1813 | UDP port for accounting requests. It cannot be the port of listen. |
| accounting.servers | (none) | The accounting servers in order of preference, at most 8. Each is written like a server of passwordCheck, with port 1813 unless given and without requireMessageAuthenticator. Without servers the proxy acknowledges every request itself. |
| accounting.timeoutSeconds | 3 | How long one transmission waits for the response, 1 to 30. |
| accounting.tries | 2 | How many times a request is sent to one server, 1 to 10. |
log.syslog
Optional. Without the section log lines go to standard output only. See Syslog.
| Setting | Default | Description |
|---|---|---|
| log.syslog.address | (required) | IP address of the syslog collector. Not a host name. |
| log.syslog.port | 514 | UDP port of the collector. |
| log.syslog.facility | auth | Facility of the messages: auth, authpriv, daemon, user, local0 to local7 or another name of RFC 5424. |
| log.syslog.hostName | (host name) | The host name in the messages. Give it in a container, where the host name is the container id. |
limits
| Setting | Default | Description |
|---|---|---|
| limits.packetsInWork | 2048 | How many requests the proxy works on at the same time, 1 to 65536. One more is dropped (dropped_overloaded). |
| limits.packetsInWorkPerClient | 512 | The same for one client, so that one gateway cannot use up all the places (dropped_client_overloaded). |
A request that waits for the phone counts as in work for that time. The defaults need no change in an
installation of usual size. A gateway that has its limit gets nothing until some of its packets are done, and
the log says client_overloaded once a minute with its name.
Requests that wait for a RADIUS server have a limit of their own, which is not a setting: 512 at the same
time for the servers of passwordCheck, and 128 for the accounting servers. One more gets no reply. With more
than one entry in clients, each gateway has a share of these places, so that one gateway that sends more
than the server answers cannot take the places of the others:
- Half of the places are divided evenly among the gateways and are each gateway’s own. Nobody else can take them.
- The rest is shared by all, and one gateway may hold half of the shared places at most.
- A gateway is an entry of
clients: a network counts as one gateway, whatever number of devices send from it. With one entry, also the one for any address, that entry has all the places.
Entries in clients |
Own places of each | Shared | The most one gateway holds |
|---|---|---|---|
| 1 | 512 | 512 | |
| 2 | 128 | 256 | 256 |
| 3 | 85 | 257 | 213 |
| 10 | 25 | 262 | 156 |
For accounting the same rule gives 64 of 128 with two entries and 40 with ten. The started line of the log
says the most one gateway may hold for the password check (server_requests_per_client).
A request that finds no place is counted in server_requests_refused
(accounting_server_requests_refused), and the log says server_requests_refused once a minute with the
name of the gateway and limit_of:
limit_of |
What was reached |
|---|---|
client |
The gateway holds as many places as one gateway may hold. Also counted in server_requests_refused_client. |
shared |
The gateway holds its own places, and the shared places are all in use. Places that are another gateway’s own may still be free. |
all |
Every place is in use. |
Each of them means that a RADIUS server answers slowly or not at all, or that gateways send more than it can
take. An installation that had one busy gateway and adds further entries to clients gives that gateway a
smaller share than it had alone.
Secrets
The secret of a gateway, of a RADIUS server and of the API client can each be given in one of three ways. Exactly one of them is written:
| Setting | Meaning |
|---|---|
secret (clientSecret in notakey) |
The secret itself, in the file. |
secretEnv (clientSecretEnv) |
The name of an environment variable that holds it. |
secretFile (clientSecretFile) |
The path of a file that holds it, relative to the configuration file. A line break at the end of the file is not part of the secret. |
Give each gateway a secret of its own. A secret shorter than 16 characters gives a warning at start. Secrets are never written to the log.
Secrets from environment variables and from a file:
"clients": [
{ "name": "vpn-gw", "address": "192.0.2.10", "secretEnv": "AUTHPROXY_SECRET_VPN_GW" },
{ "name": "branch-offices", "address": "198.51.100.0/24", "secretFile": "branch-offices.secret" }
]
Command line
| Option | Description |
|---|---|
| –config PATH | The configuration file. Without it the environment variable NOTAKEY_AUTHPROXY_CONFIG names the file, and without that it is /etc/notakey/authproxy.json (on Windows %ProgramData%\Notakey\AuthProxy\authproxy.json). |
| –check-config | Read and check the configuration, print the result and exit. |
| –validate | As --check-config, then ask the Notakey API and each RADIUS server; see Checking an installation. |
| –log-level LEVEL | The lowest level written to the log: debug, info (default), warn or error. |
| –log-file PATH | Write the log to this file and not to standard output; see Log file. |
| –service | Run as a Windows service. Only for the command line of the service itself. |
| –version | Print the version and exit. |
| –help | Print the options and exit. |
Exit codes:
| Code | Meaning |
|---|---|
| 0 | Stopped in order, or the check found nothing wrong. |
| 2 | The configuration is not valid or cannot be read. |
| 3 | A port or the log file could not be opened, or the syslog socket could not be made. Also --service on a command line: only Windows itself can start the program as a service. |
| 4 | --validate: a check failed. |
| 64 | Unknown or incomplete option, --service together with --check-config or --validate, or --service on a system that is not Windows. |
| 70 | As a Windows service: an error of the proxy itself. The last line of the log file is proxy_failed. Please report it. |
Message-Authenticator
Message-Authenticator is the attribute with which the sender of a RADIUS packet signs it with the shared secret. Without it a reply can be forged by someone on the path between a gateway and its RADIUS server (the attack known as Blast-RADIUS, CVE-2024-3596). The proxy has two such paths and two directions on each:
| Direction | What the proxy does | Setting |
|---|---|---|
| Request of a gateway | A wrong Message-Authenticator: dropped, always. None: dropped, unless the client has requireMessageAuthenticator: false. |
clients[].requireMessageAuthenticator, true unless set |
| Reply to a gateway | Always signed: Message-Authenticator is the first attribute of every reply. | none |
| Request to a RADIUS server | Always signed, the same way. | none |
| Reply of a RADIUS server | A wrong Message-Authenticator: dropped, always. None: dropped, unless the server has requireMessageAuthenticator: false. |
passwordCheck.servers[].requireMessageAuthenticator, true unless set |
- With EAP the attribute is required in both directions whatever the settings say.
- Turn it on at the gateway and keep the default where the gateway can send it. Set
falseonly for a gateway or a server that cannot, and update that device when it can. - A gateway that sends no Message-Authenticator to a client entry that requires it gets no answer at all. The
log has
message_authenticator_missingfor the client, once a minute, and the counterdropped_no_message_authenticatorgrows. - A server whose replies are dropped for this reason shows as
server_reply_no_message_authenticatorand in the counterserver_dropped_no_message_authenticator, and the logins get no reply. message_authenticator_wrong(gateway) andserver_reply_not_verified(server) usually mean that the secret here and on the other side differ.- Since the proxy signs every reply, the check of replies can be turned on at every gateway that has one.
- Accounting has no Message-Authenticator: an accounting packet is checked by its Request Authenticator, which covers the whole packet.
How logins are handled
One login of a person gives one request on the phone, whatever the gateway does while it waits.
A login is known by the gateway, the user name, the proof of the password (the password for PAP, challenge and response for CHAP and MS-CHAP) and Calling-Station-Id.
- The same packet again while the first is in work is ignored (
duplicates_ignored). - The same packet again after its reply gets the same reply again, for
replyCacheSeconds. - The same login in a new packet (a new identifier, as Windows RRAS sends its repeats) joins the login that waits, when the request has a Calling-Station-Id. Its password is still checked, no second request goes to the phone, and it gets a reply of its own when the answer comes. At most 16 requests wait for one login.
- The same user name with another password, challenge or calling station is another login.
- After an approval a repeat of that login is accepted without the phone for
approvalReuseSeconds, and only when it has a Calling-Station-Id. This is for the gateway whose repeat was on its way when the answer came. With 0 an approval answers only the requests that waited for it. - After a denial a repeat of that login is refused without the phone for
replyCacheSeconds. - A user has one request waiting at a time, and at most
pushesPerMinute. Beyond that the answer is Access-Reject without a request on the phone (push_limitedin the log). The user is the account that Notakey Authentication Server says the name stands for, so two spellings of one account count together. - A login nobody answers within
logins.timeoutSecondsis refused and its request disappears from the phone. The next attempt asks again.
A request without Calling-Station-Id cannot join a login that waits and cannot reuse an approval: where the
gateway does not say who is calling, a login is the user name and the password and nothing else, and whoever
knows the password would be let in on the approval of the user. Such a repeat is refused, and the log line
push_limited with the reason same_login_without_calling_station names the gateway.
When the proxy is stopped, logins that still wait get no reply, so that the gateway repeats the request or turns to its other server, and their requests are withdrawn from the phones.
Notification texts
notakey.messageTitle and notakey.messageDescription are the title and the text of the request on the phone.
They can contain:
| Placeholder | Becomes |
|---|---|
{user} |
The user name as the gateway sent it. |
{gateway} |
The name of the client in the configuration. |
{address} |
Calling-Station-Id as the gateway sent it, or unknown when the gateway sent none. |
{0} |
The same as {user}, as in version 1. |
- A brace as text is written twice:
{{and}}. - Any other placeholder is an error at start.
- A text is at most 500 characters.
- User name and address are shown without control and formatting characters, and cut to 128 and 64 characters.
- The address is what the gateway reports, and not every gateway reports one. A user who sees a login from a place that is not theirs should deny it.
Cisco downloadable access lists
A Cisco device that got the name of an access list with a login asks the RADIUS server for the list in an
Access-Request of its own: the name of the list is the user name, and the request carries the Cisco pair
aaa:event=acl-download. Nobody can approve such a request on a phone.
With "ciscoAclDownload": true for a client, such a request is sent to the RADIUS server and the answer of
the server is the answer; nobody is asked. It is passed only when it carries that pair and a right
Message-Authenticator, whatever requireMessageAuthenticator says. Cisco devices sign these requests. A marked
request without Message-Authenticator is handled as a login (gateway_request_not_signed).
The log has one line for each, gateway_request, with the client, the name of the list and the result.
The setting is given to each client that needs it. In version 1 CISCO_ACL_PASSTHROUGH applied to every gateway.
Accounting messages
Version 1 did not take accounting. Version 2 does when the configuration has an accounting section.
The accounting port (1813 unless given) takes Accounting-Request from the gateways of clients.
- Without
accounting.serversthe proxy acknowledges every request itself and keeps nothing of it. This is for a gateway that insists on an accounting server. - With
accounting.serversthe request is sent on with all its attributes, and the gateway gets its Accounting-Response only after a server acknowledged. When no server does, the gateway gets nothing and sends the request again.
Accounting sent on to one server:
"accounting": {
"servers": [
{ "name": "nps-1-accounting", "address": "192.0.2.50", "secret": "<secret of the server>" }
]
}
Things to know:
- A request with a wrong Request Authenticator is dropped (
accounting_authenticator_wrongin the log, once a minute per client). It usually means that the secrets differ. - A request can be in work for the number of servers times
triestimestimeoutSeconds. Keep that below the time after which the gateway gives up. - Nothing of an accounting packet is kept or reported by the proxy: no session list, and no tie between a session and the login that started it. An accounting packet can cause neither a request on the phone nor an Access-Accept.
- All gateways use the same accounting servers, and each has a share of the requests that may wait for them; see limits.
Status-Server
A gateway or a monitoring system can ask whether the proxy is there with a Status-Server packet (RFC 5997). The proxy answers it on both ports: with an Access-Accept on the authentication port and with an Accounting-Response on the accounting port.
- The packet has to come from an address in the client list and carry a right Message-Authenticator, whatever
requireMessageAuthenticatorof the client says. Without it there is no answer. - The answer says that the proxy runs and reads the port. It says nothing about the Notakey API or the RADIUS servers: when those cannot be reached, logins fail and Status-Server is still answered.
- A client gets 10 answers in a second. More are dropped, and the log says
status_server_limitedonce a minute for the client. "statusServer": falsefor a client turns the answer off for it.
Checking an installation
--check-config reads and checks the configuration file and nothing else.
$ notakey-authproxy --check-config
warning: client "old-rras" may send requests without Message-Authenticator. Turn it on at the gateway if it can.
/etc/notakey/authproxy.json: valid, 2 client(s), 1 server(s), listen 0.0.0.0:1812, Notakey API https://notakey.example.com/api/, accounting off
--validate does the same and then asks, from where it runs, what the proxy will need:
$ notakey-authproxy --validate
/etc/notakey/authproxy.json: valid, 2 client(s), 2 server(s), listen 0.0.0.0:1812, Notakey API https://notakey.example.com/api/, accounting off
notakey api https://notakey.example.com/api/: token received, service b5a1c0de-0000-4000-8000-000000000001 found
radius server nps-1 at 192.0.2.50:1812: answers
radius server nps-2 at 192.0.2.51:1812: not confirmed: no answer to Status-Server in 6 s. Not every RADIUS server answers it (Windows NPS does not). A server that does not have this proxy as a client, or has another secret for it, stays silent too (FreeRADIUS does)
validate: no check failed, 1 server address(es) not confirmed
- Notakey API: a token for the API client of the configuration, then one read of the service. This checks the address, the certificate, the client credentials and the service ID.
- RADIUS servers and accounting servers: one Status-Server packet to each address. An answer that verifies shows that the server is there and has the same secret. An answer that does not verify, a port where nothing listens and a name without an address are failed checks.
- No answer is not a failed check. A server that does not know Status-Server stays silent, and so does one that does not have the proxy as a client or has another secret for it. Windows NPS does not answer Status-Server: for it this command cannot tell a working server from a missing one.
- It sends no login, makes no request on a phone, writes no accounting record and does not listen on any port, so it can be run beside a running proxy.
- The exit code is 0 when no check failed, 2 when the configuration is not valid, and 4 when a check failed.
In a container, put the option after the name of the image (see
Installation instructions (Docker)). On the Notakey appliance use
ntk ap validate.
Gateway settings
A gateway has to wait for its RADIUS server as long as a person needs to take the phone and answer. Most gateways do not by default. Two settings matter at every gateway:
- Timeout. The time the gateway waits, all its repeats together, is the time the user has. Set it to
logins.timeoutSecondsor a little more where the gateway allows that, and lowerlogins.timeoutSecondswhere it does not, so that the request disappears from the phone when the gateway has given up. - Message-Authenticator. Turn it on in requests where it is a setting, and turn on the check of replies.
What we have seen with the gateways in our lab, each with one version; other versions may differ:
| Gateway | Default timeout and repeats | Message-Authenticator | What to set |
|---|---|---|---|
| MikroTik RouterOS 7.25 | About a second, three times, the same packet. | Always sent. Replies without it are dropped by default (require-message-auth=yes-for-request-resp). |
timeout of the /radius entry; the largest value it takes is 60 seconds. Keep the Message-Authenticator default. |
| OPNsense 26.7 | 10 seconds, three times, the same packet. | Always sent. Replies without it are accepted. | Works with its defaults: the user has 30 seconds. It sends no Calling-Station-Id, so {address} is unknown. |
| Windows RRAS (Server 2022) | 5 seconds, each repeat a new packet with a new identifier, 20 seconds in all. | Not sent by default; sent with signature=enabled for the RADIUS server. |
Works with its defaults: one login is one request on the phone, and the user has 20 seconds. Raise the timeout to give more. Turn signature on, or set requireMessageAuthenticator to false for this client. |
| Cisco ASA 9.24 | 10 seconds; one request in test aaa-server. |
Always sent. Replies without it are accepted by default. | timeout of the aaa-server host, 60 for instance. ciscoAclDownload for the client when downloadable access lists are used. |
Notes:
- MikroTik. A MikroTik PPP client (L2TP, PPTP) and an SSH login to the router itself give up after 30 seconds, whatever the RADIUS timeout is. A login to the router over its REST API makes two logins with different challenges, and so two requests on the phone.
- A VPN client that dials again right after a denial comes with a new challenge, which is a new login: the
user gets a new request, up to
pushesPerMinute. - A gateway behind a network address translation is known to the proxy by the translated address. That is
the address to write in
clients.
Network Connectivity
| From | To | Port | What |
|---|---|---|---|
| Gateways | NtkP | UDP 1812 (listen.port) |
Authentication requests, Status-Server |
| Gateways | NtkP | UDP 1813 (accounting.listen.port) |
Accounting, when it is on |
| NtkP | RADIUS servers | UDP 1812 (port of the server) |
Password check |
| NtkP | Accounting servers | UDP 1813 (port of the server) |
Accounting, when servers are given |
| NtkP | Notakey API | TCP 443 (the port of notakey.url) |
Token, user lookup, approval requests |
| NtkP | Syslog collector | UDP 514 (log.syslog.port) |
Log lines, when it is on |
| NtkP | DNS | For a RADIUS server given by a host name, and for the name of the API |
The proxy sends each request to a RADIUS server from a UDP port of its own choice, and the reply has to come
back to that port from the address and port the request was sent to. The RADIUS server has to have the proxy
as a RADIUS client, with the same secret as in passwordCheck.servers.

Log files
The proxy writes its log to standard output, or to a file with --log-file, one JSON object per line: ts (UTC), level (debug, info,
warn, error), event and the fields of the event. The Docker container logs output as any other container.
--log-level sets the lowest level written.
Names, addresses, counts and error names are written. Secrets, passwords, tokens and attribute values never are. User names are in the lines about a login.
A login that was approved after 12 seconds, with three requests of the gateway:
{"ts":"2026-11-23T21:05:09.087Z","level":"info","event":"login","login":41,"client":"vpn-gw","user":"alice","method":"mschapv2","result":"approved","requests":3,"ms":12840}
Logins in the log
Every login that ends leaves one line:
| Event | Level | Meaning |
|---|---|---|
login |
info | The login reached the phone. result is approved, denied, expired (nobody answered) or failed (the request could not be made or followed). requests is the number of gateway requests that joined it, ms the time from the first of them. |
password_rejected |
info | The RADIUS server did not accept the password. Nobody was asked. |
password_check_no_answer |
warn | No RADIUS server answered. The gateway gets no reply. |
push_limited |
warn | Refused before the phone was asked. reason is another_login_waiting, per_minute or same_login_without_calling_station. |
user_unknown |
warn | The password was accepted, and the name is not a user of the Notakey service. |
user_not_looked_up |
warn | The password was accepted, and the user could not be looked up at the Notakey API. |
gateway_request |
info | A request a gateway made for itself (see Cisco downloadable access lists). |
A request without a user name is rejected without a line; it is counted in rejected_no_user_name.
Other events
| Event | Level | Meaning |
|---|---|---|
started, client, server, accounting_server, notakey_api |
info | Written at start: the version, the ports, and each client and server of the configuration. server_requests_per_client of started is the number of requests of one gateway that may wait for a RADIUS server at the same time (see limits). |
config_warning, config_error |
warn, error | What the check of the configuration found. With an error the proxy does not start. |
listen_failed, syslog_failed |
error | A port or the syslog socket could not be opened. The proxy does not start. |
api_ready, api_not_ready |
info, warn | Whether the API gave a token at start. |
api_call_failed |
warn | A call to the Notakey API failed. call is token, user, create, status or withdraw; status is the status number of the reply, or error the kind of the error. |
approval_requested |
info | The request was made at the API; request is its ID there. |
approval_reply_mismatch |
error | The API answered about another request or another user. The login is refused. |
approval_request_gone |
warn | The API did not answer about the request three times in a row. The login is refused. |
approval_not_withdrawn, approvals_not_withdrawn |
warn | A request could not be withdrawn; it stays on the phone until its time is over. Nobody waits for its answer. |
message_authenticator_missing, message_authenticator_wrong |
warn | See Message-Authenticator. Once a minute per client. |
gateway_request_not_signed |
warn | A request marked as an access-list download came without Message-Authenticator and is handled as a login. |
status_server_not_signed |
warn | A Status-Server packet without Message-Authenticator. It is not answered. |
status_server_limited |
warn | More than 10 Status-Server packets in a second from a client; the rest are dropped. Once a minute per client. |
client_overloaded |
warn | A gateway has as many packets in work as one client may have (limits.packetsInWorkPerClient); its packets are dropped until some are done. port is the port they came to. Once a minute per client. |
login_requests_limited |
warn | More than 16 requests waited for one login; the oldest get no reply. |
server_not_answering, server_answering |
warn, info | A RADIUS server stopped or started answering. |
server_reply_no_message_authenticator, server_reply_not_verified |
warn | A reply of a RADIUS server was dropped. Once a minute per server. |
server_name_not_resolved, server_address |
warn, info | The host name of a server gave no address, or its addresses changed. |
server_socket_error |
warn | The system refused to send to a server. |
server_reply_unusable, server_request_too_long |
warn | The reply of the server could not be passed on, or the request was too long to send on. The gateway gets an Access-Reject. |
server_requests_refused, accounting_server_requests_refused |
warn | A request was not sent to any server, because too many already wait for one. client is the gateway, limit_of is client, shared or all, and limit the number that was reached; see limits. Once a minute per gateway, and once a minute for all. |
accounting_authenticator_wrong |
warn | See Accounting. |
accounting_response_attributes_left_out |
warn | The response of an accounting server did not fit into the response to the gateway; the gateway got the acknowledgement without the server’s attributes. |
accounting_server_... |
As the server_... events, for the accounting servers. |
|
handler_failed, accept_failed, approval_failed, user_lookup_failed |
error | An error of the proxy itself, with the type of the error. The request it happened in gets no reply or an Access-Reject, and the proxy runs on. Please report it. |
receive_error |
warn | The system reported an error on a listening port. |
syslog_send_failed |
error | The system refused a syslog message; lines_lost is the number so far. Once a minute at most. |
log_lines_lost |
error | Lines could not be written to the log file; lines_lost is the number since the start. Written when the file can be written again. |
proxy_failed, service_failed |
error | As a Windows service: the proxy ended with an error of its own, or Windows gave the service no way to report its state. The process ends. |
packet_malformed, packet_code_not_accepted, server_reply_dropped, accounting_no_answer, status_server_answered, status_server_answered_again, status_server_off |
debug | About single packets. Written only with --log-level debug. |
counters |
info | See below. |
stopped |
info | The proxy has stopped in order. |
Counters
All counters are written as one counters line once a minute while any of them changes, and when the proxy
stops. They count from the start of the process.
| Counter | Counts |
|---|---|
received |
Packets read, on both ports. |
dropped_unknown_source |
Dropped: the sender is not in the client list. There is no log line for these. |
dropped_oversized, dropped_malformed, dropped_unsupported_code |
Dropped: longer than 4096 octets, not a well-formed RADIUS packet, or a kind of packet the port does not take. |
dropped_overloaded, dropped_client_overloaded |
Dropped: the limit of packets in work was reached (see limits). |
dropped_bad_message_authenticator, dropped_no_message_authenticator |
Dropped: Message-Authenticator wrong, or missing where it is required. |
dropped_unanswerable |
Dropped: so much Proxy-State that no reply could carry it back. |
accepted, replies_sent |
Packets taken up, and replies sent. |
duplicates_ignored, replies_resent |
Repeats of a request in work, and repeats answered with the same reply again. |
rejected_no_user_name |
Requests without User-Name, rejected. |
password_rejected, password_check_no_answer |
Password checks the server refused, or no server answered. |
gateway_requests_passed, gateway_requests_not_signed |
Access-list downloads passed, and marked requests without Message-Authenticator. |
server_requests, server_requests_resent, server_replies, server_no_answer |
Requests to the RADIUS servers, their repeats, replies that passed every check, and requests a server did not answer. |
server_dropped_wrong_source, server_dropped_malformed, server_dropped_unexpected, server_dropped_not_verified, server_dropped_no_message_authenticator |
Datagrams dropped while waiting for the reply of a server. |
server_replies_unusable, server_requests_too_long, server_socket_errors, server_names_not_resolved |
Other failures on the way to a server. |
server_requests_refused, server_requests_refused_client |
Requests not sent to any server because too many already waited for one: of that gateway or of all gateways together. The second counts those of the first where the gateway held as many places as one gateway may hold (see limits). |
pushes_started |
Requests made on a phone. One per login. |
push_limited |
Logins refused without a request on the phone (see How logins are handled). |
logins_approved, logins_denied, logins_expired, logins_failed |
How the logins that reached the phone ended. |
logins_user_unknown, logins_user_lookup_failed |
Logins refused after the password check: no such user, or the user could not be looked up. |
login_results_reused, login_requests_let_go |
Repeats answered from an earlier result, and requests let go without a reply because more than 16 waited for one login. |
api_requests, api_failures |
Calls to the Notakey API, and calls that gave nothing usable. |
approvals_withdrawn, approvals_not_withdrawn |
Requests withdrawn from the phone after their login ended, and those that could not be. |
access_accepts, access_rejects, access_challenges |
Replies to the gateways by kind. |
accounting_... |
The same for accounting: requests taken up, dropped, repeated, answered, and the requests to the accounting servers. accounting_server_requests_refused and accounting_server_requests_refused_client are as the two above. |
status_server_answered, status_server_not_answered |
Status-Server packets answered, and not answered because the setting is off or the limit was reached. |
handler_failed, receive_errors |
Errors of the proxy itself while handling a packet, and errors of a listening port. |
Counters to watch:
dropped_unknown_sourcethat grows: a gateway is missing inclients, or its packets arrive from another address than the one written there.dropped_no_message_authenticatorordropped_bad_message_authenticator: see Message-Authenticator.password_check_no_answer,server_no_answer: the RADIUS server does not answer the proxy.server_requests_refused,dropped_client_overloaded: requests pile up behind a RADIUS server that answers slowly, or a gateway sends more than its share. The log names the gateway.api_failures: the way to Notakey Authentication Server.push_limited: users who are refused because of the limits. A gateway that sends no Calling-Station-Id and repeats with new identifiers shows here.
Log file
With --log-file PATH the log lines go to that file and not to standard output. It is for where nothing
collects standard output: the Windows service is installed with it. A container keeps writing to standard
output.
- Lines are appended. The directory has to exist. A file that cannot be opened ends the start with exit code 3.
- A file of 10 MB becomes
PATH.1at the next line,PATH.1becomesPATH.2and so on. Five older files are kept, so the log takes 60 MB, unless a file is held as the next point says. - When another program holds a file (on Windows, a program that reads it without letting it be renamed),
the change of file waits. The full file is renamed first, to
PATH.0for a moment, and the older files move up only when that has worked. A full file that is held grows on beyond 10 MB. When an older file is held, the full file waits asPATH.0and a new file is begun, which grows on beyond 10 MB as well while the older file stays held. The change is tried again at the first line written a minute or more later, for as long as the file is held. No line and no older file is lost by that, but the log has no limit in that time: it takes the 60 MB (70 MB with aPATH.0that waits) and what was written beyond 10 MB. Afterwards the file that grew is kept as one older file of more than 10 MB. A program that collects or removesPATH.*will sometimes seePATH.0. - A line that cannot be written (the disk is full) is lost, and the proxy goes on. When the file can be written
again, a
log_lines_lostline says how many lines were lost. - The file names users, clients and addresses. Keep it where only administrators read.
Syslog
With a log.syslog section every line also goes to a syslog collector, as a message of RFC 5424 in one UDP
datagram:
<38>1 2026-11-23T21:05:09.087Z proxy-1 notakey-authproxy 1 login - {"ts":"2026-11-23T21:05:09.087Z","level":"info","event":"login",...}
- The text of the message is the line of standard output, unchanged. The event name is also the MSGID field, and the severity comes from the level (debug 7, info 6, warn 4, error 3).
- Messages go out in clear text over UDP. They carry what the log carries: user names, client names, addresses.
- Nothing tells the proxy whether a message arrived. A collector that is down loses lines, and logins are not held up by it. Standard output always has every line.
- The
countersline is longer than one Ethernet frame and is cut by a collector that takes only 2048 octets.
Upgrading from version 1
Version 2 does not read the environment variables or the arguments of version 1. An image of version 2 that is
started the way version 1 was, without a configuration file, ends with exit code 2 and a config_error line
that says so.
What each setting of version 1 becomes
| Version 1 | Version 2 |
|---|---|
NOTAKEY_HOST (--notakey-host) |
notakey.url. It has to be an https:// address. |
NOTAKEY_ACCESS_ID |
notakey.serviceId |
NOTAKEY_TIMEOUT |
notakey.timeoutSeconds |
NOTAKEY_TTL_SECONDS (--message-ttl-seconds) |
logins.timeoutSeconds, 5 to 300 |
MESSAGE_TITLE, MESSAGE_DESCRIPTION |
notakey.messageTitle, notakey.messageDescription. A text with {0} works as it is. A brace as text has to be doubled now. |
LISTEN_ADDRESS, PORT_IN |
listen.address, listen.port. Unless given, version 1 listened on 127.0.0.1; version 2 listens on 0.0.0.0. |
ADDRESS_SECRET_IN |
One entry of clients for each gateway. “Any address” (0.0.0.0) is written as 0.0.0.0/0. |
DOWNSTREAM_ADDRESS, PORT_OUT, SECRET_OUT |
One entry of passwordCheck.servers for each server. |
PROXY_RECEIVE_TIMEOUT |
passwordCheck.timeoutSeconds, with passwordCheck.tries |
PROXY_SEND_TIMEOUT |
No longer a setting. |
CISCO_ACL_PASSTHROUGH |
ciscoAclDownload of each client that needs it. |
REQUIRE_MESSAGE_AUTH |
requireMessageAuthenticator of each client. It is true unless set to false. |
| (none) | notakey.clientId and the client secret: version 2 calls the API as an API client of its own. |
What to look at
- The server. Notakey Authentication Server has to be 5.2.2 or later before the proxy is changed.
- The API client. Make one for the proxy, with the scopes
urn:notakey:authandurn:notakey:user. - The gateways. List them in
clients. An installation that took requests from any address keeps working with0.0.0.0/0, with a warning at every start, until the gateways are listed. - Message-Authenticator of the gateways. It is required unless a client says otherwise. A gateway that
does not send it gets no answer after the change: turn it on at the gateway, or set
requireMessageAuthenticatortofalsefor it. - Message-Authenticator of the RADIUS server. Replies of the server have to be signed unless the server
entry says otherwise. A server that does not sign its replies (seen with a Windows NPS that did not have
the security updates of 2024) needs
requireMessageAuthenticator: falseuntil it is updated. - The check of replies at the gateways. Version 2 signs every reply. Where the check was turned off at a gateway, turn it on again.
- Timeouts.
logins.timeoutSecondsis at most 300. A request to a RADIUS server is senttriestimes; version 1 sent it once. - Repeats. A gateway that repeats its request while the user decides no longer causes a second request on the phone. A timeout of the gateway that was raised only to prevent that can stay as it is.
- Limits that are new. A user has one request waiting at a time and three a minute unless set otherwise, and a denied login is refused for 30 seconds without the phone.
- The texts. The default text now names the gateway and the address. A text of your own is kept.
- Monitoring. The log has another form (see Log files), the container has no shell, and the process is not root. On Windows the service, its directories and its log file have new names.
Check the new file with --check-config and --validate before the change; both can be run while version 1
is still in service.
On the Notakey appliance
ntk sys update changes the proxy to version 2 together with the rest of the appliance, once the appliance
index offers it. The management tool is updated first and asks for the update to be run again.
- The settings are carried over as they are, with the behaviour of version 1 where version 2 has a stricter
default: a gateway has to send Message-Authenticator only where
REQUIRE_MESSAGE_AUTH=truewas set, the RADIUS servers are not required to sign their replies, and a request is sent to a server once.ntk ap validateshows a warning for the first two. The single transmission has no warning. - Two settings are not carried over:
ap.proxy_send_timeout, and the entries ofap.custom_paramsother thanREQUIRE_MESSAGE_AUTH. Version 2 does not use them;ntk ap validatenames each as a warning. What has a setting in the configuration file of version 2 goes intoap.config. - Requests from any address. When the container of version 1 is there at the moment the proxy is changed,
as it is with
ntk sys update, the appliance setsap.allow_any_addresstotrue: requests are then taken from any address that knowsap.vpn_secret_inuntilap.clientsis set, andntk ap validateshows a warning while that is so. When the proxy of version 1 was stopped and removed before the image was changed, nothing sets it, as in a new installation:ntk ap startrefuses and says to list the gateways inap.clientsor to setap.allow_any_addresstotrue. - The API client is created by the appliance.
- The proxy is not changed while Notakey Authentication Server on the appliance is older than 5.2.2.
- When the settings do not give a valid configuration for version 2, the proxy of version 1 stays in
service, and the update says that the proxy was not restarted and ends with an error.
ntk ap validatesays what is wrong;ntk ap restartthen makes the change. - Afterwards list the gateways in
ap.clients, and move to the defaults of version 2 for Message-Authenticator as the gateways and servers allow. Listing the gateways by address (see Installation instructions (Notakey appliance)) requires Message-Authenticator from them: look at the warning ofntk ap validatefirst, so that a gateway that does not send it is not cut off. The appliance manual has the settings.
Going back
Version 2 changes nothing that version 1 uses: the environment variables, the winsw.xml of a Windows
installation and the settings of the appliance stay as they were.
- Docker: stop and remove the container of version 2 and start the one of version 1 as before.
- Windows: stop the service of version 2 and start the one of version 1, and change their start modes back; see Beside version 1 on Windows.
- Notakey appliance: set
ap.imageback to the image of version 1 that the appliance still has (ntk cfg setc ap.image appliance.local/naa/auth-proxy:1.2.0, for instance), and runntk ap restart. The proxy of version 1 starts with the settings it had. The nextntk sys updateoffers version 2 again.
Requests that waited on a phone at that moment are withdrawn, and their logins have to be started again.
Emergency access
The proxy has no setting that lets logins through without the phone. When Notakey Authentication Server cannot be reached, or the proxy itself is down, the logins that go through it are refused or get no reply. Decide beforehand how administrators get in then, and try it.
- One user without a phone (lost, broken, replaced) is not an emergency of the proxy: onboard the new device of the user in Notakey Authentication Server. Nothing changes at the proxy.
- Two proxies. Give the gateway two proxies as its RADIUS servers, on two hosts or on two nodes of an appliance cluster. One of them can be stopped or updated while the other serves. Set the timeout of the gateway so that it does not turn to the second while a user is still deciding at the first.
- An emergency account on the gateway that does not use RADIUS: a local administrator account with a long password, kept sealed, limited to the management of the gateway and watched in its log. This is the way in when the authentication service as a whole is down.
- Pointing the gateway at the RADIUS server directly takes the phone out of every login. Where that is an accepted emergency measure, prepare it: the RADIUS server needs the gateway as a client, and somebody has to be able to change the gateway when VPN is down. Record when it was done, and undo it when the service is back.
FAQ
The user approves on the phone, but the VPN does not connect. Why?
The gateway gave up before the answer came. Look at the login line: ms is the time the login took. Raise
the timeout of the gateway (see Gateway settings).
The gateway gets no answer at all. Where do I look?
In the counters line. dropped_unknown_source: the address of the gateway is not in clients.
dropped_no_message_authenticator: the gateway does not send Message-Authenticator and the client requires
it. dropped_bad_message_authenticator: the secrets differ. password_check_no_answer: the RADIUS server
does not answer the proxy, usually because it does not have the proxy as a client, or because it does not sign
its replies (server_reply_no_message_authenticator in the log).
Every login ends as user_unknown. Why?
The password was accepted, and Notakey Authentication Server has no such user in the service. Either the user
has not been onboarded, or notakey.serviceId names another service.
The log has api_not_ready at start. What is wrong?
The API gave no token. The api_call_failed line before it says why: the address, the certificate, or the ID
or the secret of the API client. A server of version 5.2.2 answers a wrong client secret with status 500.
--validate checks the same from the command line.
The user gets a request on the phone for every attempt. Can somebody flood the phone?
A request is made only after the RADIUS server accepted the password, so only somebody who knows the password
can cause one, and then at most pushesPerMinute a minute and one at a time. A user who gets a request they
did not start should deny it and change the password.
Are accounting messages supported?
Yes, when the configuration has an accounting section; see Accounting.
What are the implications of PAP, CHAP and MS-CHAP?
These methods do not protect the credentials of the user against somebody who can read or change the traffic between the gateway, the proxy and the RADIUS server. Message-Authenticator protects the packets against forgery, not against reading. Keep that traffic on a network you control.