unit 8 · Windows track
The WinRM auth matrix
Five options, four properties, one table
you may want to read 30 · Windows connections: WinRM, PSRP, SSH first — but nothing is locked
tl;dr
- WinRM offers five auth options — Basic, Certificate, Kerberos, NTLM, CredSSP — differing on four properties.
- Kerberos is the official recommendation in a domain; Basic and NTLM only over HTTPS for local accounts.
- You pick with ansible_winrm_transport — or ansible_psrp_auth, which adds a negotiate option.
why it matters Pick the wrong auth and a Windows host greets you with an opaque 401 — or quietly refuses to encrypt. The matrix is the first thing to check whenever WinRM turns you away.
Lesson 30 settled how you connect to Windows — winrm, psrp or ssh.
This lesson settles who you are when you arrive. For the two WinRM-based
plugins, that’s an explicit choice among five authentication options — and
the whole decision fits in one table from the official docs. Memorise it;
it’s worth knowing cold:
| Option | Local accounts | AD accounts | Delegation | HTTP encryption |
|---|---|---|---|---|
| Basic | Yes | No | No | No |
| Certificate | Yes | No | No | No |
| Kerberos | No | Yes | Yes | Yes |
| NTLM | Yes | Yes | No | Yes |
| CredSSP | Yes | Yes | Yes | Yes |
Read it column by column. Local vs AD accounts splits the field. Basic and Certificate only authenticate local Windows accounts — dead on arrival for a domain estate. Kerberos is the mirror image: domain accounts only, because it needs a domain controller to issue tickets. NTLM and CredSSP take both.
HTTP encryption decides your port. WinRM refuses an unencrypted channel, but Kerberos, NTLM and CredSSP encrypt the message payload themselves. That satisfies the rule even on plain HTTP 5985. Basic and Certificate bring no encryption of their own, so they only work inside a TLS tunnel on 5986. Hence the official guidance: Basic and NTLM only over HTTPS, and only for local accounts.
Delegation means credential delegation — whether the remote host can reuse your credentials to reach a second machine, like a file share. That column is the whole plot of lesson 35. For now, notice which two rows say Yes.
What the docs actually recommend
In a domain: “Kerberos is the recommended authentication option to use when running in a domain environment.” It’s the only row with no security caveat — encrypted payload, credential delegation available, no password ever sent to the target. For local accounts (the workgroup box, the DMZ host): Basic or NTLM, over HTTPS only.
CredSSP — the row where every column says Yes — carries the sternest warning in the guide. Use it only when absolutely necessary, because “it can be a security risk due to its use of unconstrained delegation.” CredSSP earns its Delegation Yes by handing your actual credentials to the remote host. If that host is compromised, so are you — everywhere those credentials work.
Setting it in inventory
The switch is one variable, ansible_winrm_transport, set where lesson 9
taught you to put connection settings — a group’s group_vars file:
ansible_connection: winrm
ansible_winrm_transport: kerberos # basic | certificate | kerberos | ntlm | credssp
ansible_user: svc_ansible@CORP.EXAMPLE.COM
ansible_port: 5985 # fine in-domain: Kerberos encrypts the payload itselfIf the group uses the psrp plugin instead, the variable is
ansible_psrp_auth — same five values plus one more:
ansible_connection: psrp
ansible_psrp_auth: negotiate # tries Kerberos first, falls back to NTLMnegotiate is a pragmatic default for mixed estates — domain hosts get
Kerberos, the stragglers get NTLM, one group_vars file covers both.
Scope note: this matrix is the WinRM world. If your team standardises on SSH for Windows (lesson 30’s third option), the whole table evaporates — SSH brings its own key-based auth and none of these variables apply. But on-prem AD estates in 2026 still overwhelmingly speak WinRM. When a Windows host answers 401, start here: which row are you on, does it support your account type, is the channel encrypted? Lesson 32 puts it into practice — configuring the Windows side so one of these rows lets you in.
practice — which auth fits? (1/3)
Domain-joined servers, domain accounts, no TLS certs deployed yet. What does the official guide recommend?
practice, not progress — answers come from the matrix above
at work, this sounds like
- “We run Kerberos over HTTP inside the domain.”
- Not as reckless as it sounds — Kerberos encrypts the WinRM payload itself, so port 5985 without TLS is acceptable for domain traffic.
- “CredSSP is off the table — unconstrained delegation.”
- Security has vetoed the auth option that hands full credentials to the target; you’ll need Kerberos delegation or become instead.
self-check — recall, not a test
1 Which of the five auth options work with AD domain accounts, and which one does the official guide recommend in a domain?
2 Why can Kerberos, NTLM and CredSSP run over HTTP port 5985 while Basic and Certificate demand HTTPS?
3 A teammate wants CredSSP everywhere “because every column says Yes”. What is the official counterargument?