Artica Wiki

Silent authentication

Identify Windows users on Artica Proxy through NTLM without popup and without joining the domain (password not verified), with Active Directory groups read over LDAP.

Back to Active Directory | NTLM (domain join) | LDAP connections

Silent authentication identifies the Windows user who browses through Artica Proxy without any login popup and without joining the appliance to the Windows domain. 
The proxy reads the account name that the workstation sends in the NTLM handshake and resolves its Active Directory groups through the LDAP connections already declared in the console.

Important: 
This is identification, not authentication. 
The password is never verified. 
Use it for logs, reports and web filtering by group, never as a security barrier.

Functional advantages

Concepts

Identification versus authentication

With NTLM, the workstation proves that it knows the password by answering a challenge. 
A real NTLM authentication (domain join) forwards that answer to a domain controller, which accepts or refuses it. 
Silent authentication skips that check: the helper only reads the account, domain and workstation fields of the last NTLM message (Type 3) and accepts the request. 
Anyone able to configure an HTTP client can therefore claim any user name. 
The console says it on every screen: “The password is not verified”.

User name seen by the rules

Like the classic NTLM mode (winbind “use default domain”), the domain of a declared LDAP connection is removed from the identity: ARTICATECH\jdoe reaches the proxy as jdoe. User lists written for NTLM or Kerberos (plain names) therefore match, and reports, quotas and statistics see the same names as with the other methods.
A domain that is not declared keeps its prefix: a local account arrives as PC-JOHN\john and never matches the plain name john of a list.
For each connection, the NetBIOS form (first DC= of the suffix, e.g. ARTICATECH) and the DNS form (articatech.int) are removed. Requires helper 1.2.0 or later; with an older helper the identity keeps DOMAIN\user.

Which LDAP connection provides the groups

Default account

Some clients complete the NTLM handshake anonymously (empty user name). 
Instead of refusing them, the helper names them with the default account (guest unless you change it). 
That account appears in logs and reports and is looked up in Active Directory like any other name — see the warning in Limitations.

How it works

Steps 1 to 3 are the standard NTLM exchange, done once per TCP connection. 
Group answers are cached by Proxy service (ads_group TTL, 3600 seconds by default) and by the group helper, so LDAP is not queried for every request.

Requirements

Install

  1. Open Active Directory » Status. As long as no method is configured, the page lists the available methods. The last card is Silent authentication.
  2. Click Installation. The proxy configuration is rebuilt and reloaded (about 40 to 50 seconds), then the console opens the Silent authentication page.

Active Directory » Status: the Silent authentication card, after the Kerberos, NTLM, LDAP and cluster methods.

When the button is greyed out, the card prints the reason in red: 
No Enterprise license, no LDAP connection (with a link to add one), or another authentication method already enabled (its setting name is shown in parentheses).

Once installed, Active Directory » Status opens the Silent authentication page directly, and the left menu gets the entry Active Directory » Proxy authentication.

The Active Directory menu once the feature is installed: “Proxy authentication” opens the Silent authentication page.

The Silent authentication page

Silent authentication page with live traffic.

Element Meaning
reload / Re-install / uninstall reload refreshes the page. 
Re-install copies the shipped helper again even if it looks up to date, then rebuilds the proxy configuration.
 uninstall disables the feature and rebuilds the configuration (the helper binary stays on disk).
NTLM identity Active when Squid runs the identity helper. Busy/total processes as reported by the proxy service, helper version, and up to date when the installed helper is the one shipped with Artica.
AD groups (go-squid-auth) Group helper installed, number of running processes, first LDAP connection and whether its LDAP port answers (with the connection time).
Distinct users Different account names identified in the last hour (the default account counts as one name).
Identification failures Share of helper answers ERR/BH in the last hour (malformed NTLM messages, helper errors). 
“—” when nothing was identified in the last hour.
Identifications, last 24 hours Identified accounts, default-account answers and failures, per 5 minutes.
Helper load Busy / total identity helper processes, 
and how many “All processes are busy” warnings proxy service wrote 
in the last 24 hours (counted since the last restart of the Artica daemon).
Default account Name given to anonymous NTLM workstations; click the line to change it.
Last identified users Last 50 accounts (most recent first): time, account and domain as sent by the workstation, 
computer name sent in the NTLM message, IP address, 
and the Active Directory groups of the account as the group rules see it. 
The IP address is filled when the user had requests in progress at the last 5-minute activity snapshot.

Last identified users. Note guest (anonymous NTLM, groups of the built-in AD account “Guest”), ARTICATECH\jdupont (unknown in the directory: no group) and PC-JOHN\john (local account of a workstation).

Default account

Click the Default account line to change the name.

Default account editor.

Setting Key Default Rules
Silent authentication enabled EnableSilentNTLMAuth 0 Set by Install (1) and uninstall (0). Do not set it by hand: Install also checks the requirements and rebuilds the proxy.
Default account SilentNTLMAuthDefaultUser guest 1 to 64 bytes (UTF-8: an accented letter counts 2); letters (accents allowed), digits, spaces inside the name, . _ - @; no leading or trailing space. Anything else is refused (HTTP 400) and nothing is written.

The identity helper pool follows the NTLM helper settings of the proxy (20 children, 5 at startup, 1 idle by default), divided by the number of SMP workers with a floor of 2 children per worker; the queue holds at least 200 requests.

Use cases

Limitations

When the identity IS sent correctly

When the identity is NOT sent, or is not what you expect

Security warning. Any user or program able to send NTLM to the proxy can claim any account name, including an administrator's. 
Never base a security decision on this identity: access to sensitive sites, bypass of filtering for privileged groups, quotas that protect money, audit evidence. 
Use Kerberos or NTLM with domain join when the identity must be proven.

Excluding clients from identification

Active Directory » White lists lists the sources (IP addresses, networks, MAC addresses) and destinations (IP addresses, networks, domains) that are served without identification. 
Use it for servers, printers, phones and update services that cannot speak NTLM. 
Click Apply rules after a change.

Active Directory » White lists: requests from these sources, or to these destinations, are not identified.

REST API

Routes of the Artica daemon (Unix socket /usr/share/artica-postfix/bin/run/articarest.sock, or the REST API port with an API key). Answers use the envelope {"success":bool,"error":"…","data":…} with real HTTP codes. Write operations run in the background and answer {"started":true}, unless ?wait=1 is added (then the answer comes after the rebuild, which can take about a minute). One operation at a time: a concurrent call answers 409 "busy".

Method and route Effect
GET /proxy/auth/silent/state enabled, active, refusal ("", license, no_ldap_connection, other_auth:<Key>), default_user, helper{installed, shipped, md5_installed, md5_shipped, version, processes, busy, total}, groups{helper, processes, ldap_reachable, ldap_latency_ms, connection}.
GET /proxy/auth/silent/metrics distinct_users_1h, failures_1h_pct (null when nothing in the last hour), series_24h (288 buckets of 5 minutes: t, ok, default, err), last_users (up to 50: time, user, domain, workstation, ip, groups), busy_warnings_24h. HTTP 500 when the journal cannot be read.
POST /proxy/auth/silent/install Sets EnableSilentNTLMAuth=1, installs the helper, rebuilds and reloads the proxy. 409 with data.refusal when a requirement is missing.
POST /proxy/auth/silent/reinstall Copies the shipped helper again (MD5 ignored) and rebuilds. 409 like install.
POST /proxy/auth/silent/uninstall Sets EnableSilentNTLMAuth=0 and rebuilds; the binary stays.
POST /proxy/auth/silent/settings Body {"default_user":"guest"}. 400 when the name breaks the rules; otherwise writes it, regenerates authenticate.conf, checks it with squid -k parse and reloads.

A failed rebuild answers 500 with data.squid_accepted=false and the first FATAL line of squid -k parse; the running proxy keeps its previous configuration.

SOCK=/usr/share/artica-postfix/bin/run/articarest.sock
curl -s --unix-socket $SOCK http://localhost/proxy/auth/silent/state
curl -s --unix-socket $SOCK http://localhost/proxy/auth/silent/metrics
curl -s --unix-socket $SOCK -X POST -d '{"default_user":"visitor"}' \
     "http://localhost/proxy/auth/silent/settings?wait=1"

Troubleshooting

Symptom Check
Login popup on a domain workstation The browser or application does not send NTLM to the proxy: 
GPO Restrict NTLM, Firefox network.automatic-ntlm-auth.allow-proxies set to false, a non-Windows client. Test from the workstation: 
the access.log must show the user name after the first TCP_DENIED/407.
One TCP_DENIED/407 per new connection, then the request with the user name Normal: 
this is the NTLM handshake. 
Keep-alive avoids repeating it on the same connection.
Users logged as guest The workstation completes NTLM anonymously (account not logged on to the domain, service, kiosk). 
The journal shows DEFAULT lines.
A user has no group in “Last identified users” The account is unknown in every LDAP connection (local account, wrong name), or the LDAP connection is unreachable (tile AD groups). 
Test the connection in Active Directory » Connections.
Group rule does not apply after adding the user to a group Group answers are cached (1 hour by default). 
Wait, or reload the proxy.
NTLM identity tile inactive, notification “the silent identification helper is missing, proxy authentication was removed” The helper is absent or not executable: ls -l /lib/squid3/artica_ntlm_identity /usr/share/artica-postfix/bin/artica_ntlm_identity_deb*. Click Re-install, or install the Artica update that ships it.
Notification “the silent identification is no longer applied (other_auth:…)” Another authentication method, the license or the LDAP connections changed. Disable the other method or restore the requirement, then click Re-install.
“All processes busy” warnings Too many new connections for the identity helpers: raise the NTLM helper children of the proxy.
Install answers “busy” Another silent authentication operation (or the 5-minute check) is running: retry a minute later.