Skip to content

Commit 2487b9f

Browse files
authored
Merge pull request #3050 from OctopusDeploy/improve-ad-docs
Update Active Directory Docs
2 parents 9abe4a7 + 6e0421c commit 2487b9f

2 files changed

Lines changed: 74 additions & 48 deletions

File tree

src/pages/docs/security/authentication/active-directory/index.md

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: src/layouts/Default.astro
33
pubDate: 2023-01-01
4-
modDate: 2023-11-30
4+
modDate: 2026-03-05
55
title: Active Directory authentication
66
description: Octopus Deploy can use Windows credentials to identify users.
77
navOrder: 5
@@ -14,11 +14,12 @@ Active Directory authentication can only be configured for Octopus Server and no
1414

1515
Octopus Deploy can authenticate users using Windows credentials. Windows AD authentication can be chosen during installation of the Octopus Server, or later through the configuration.
1616

17-
**Domain user required during setup**
17+
## Domain user required during setup
1818

1919
When setting AD Authentication, either via the Octopus setup wizard or running the commands outlined below to switch to AD authentication mode, make sure you are signed in to Windows as a domain user. If you are signed in as a local user account on the machine (a non-domain user) you won't be able to query Active Directory, so setup will fail.
2020

2121
## Active Directory sign-in options
22+
2223
If you are using Active Directory Authentication with Octopus, there are two ways to sign in.
2324

2425
1. Integrated authentication
@@ -28,27 +29,27 @@ If you are using Active Directory Authentication with Octopus, there are two way
2829

2930
By default, Active Directory Authentication will use NTLM as the Authentication Scheme. In many circumstances, you can also configure Octopus to use Kerberos for authentication.
3031

31-
If you would like to use Kerberos for authentication, you should consider if you require User Mode authentication. User Mode is required for Kerberos authentication when Octopus is in a [High Availability](/docs/administration/high-availability) configuration. By default, Kerberos authentication for Octopus Deploy runs in Kernel Mode. The mode is dictated by the web server running Octopus Deploy, which can be configured using the `configure` command. Select HTTP.sys for Kernel Mode, or Kestrel for User Mode:
32+
If you would like to use Kerberos for authentication, you will need to use User Mode authentication (Kestrel). By default, Active Directory authentication for Octopus Deploy runs in Kernel Mode via HTTP.sys. The mode is dictated by the web server running Octopus Deploy, which can be configured using the `configure` command. Select HTTP.sys for Kernel Mode, or Kestrel for User Mode:
3233

3334
### Kernel Mode authentication via HTTP.sys (default) - Command Line
3435

35-
Select this mode if you require features of HTTP.sys, such as port sharing.
36+
Select this mode if you require features of HTTP.sys, such as port sharing. This mode supports NTLM in both single server and High Availability configurations.
3637

3738
```bash
3839
Octopus.Server.exe configure --webServer=HttpSys
3940
```
4041

4142
### User Mode authentication via Kestrel - Command Line
4243

43-
Select this mode for High Availability configurations.
44+
Select this mode if you require Kerberos authentication.
4445

4546
```bash
4647
Octopus.Server.exe configure --webServer=Kestrel
4748
```
4849

4950
## Integrated authentication
5051

51-
The easiest way to sign in when using Active Directory is to use Integrated Authentication.
52+
The easiest way to sign in when using Active Directory is to use Integrated Authentication.
5253
This allows a one-click option to *Sign in with a domain account* as pictured below.
5354

5455
:::figure
@@ -63,7 +64,7 @@ This will instruct the Octopus Server to issue a browser challenge. NTLM Authent
6364
Octopus.Server.exe configure --webAuthenticationScheme=IntegratedWindowsAuthentication
6465
```
6566

66-
Setting `IntegratedWindowsAuthentication` will mean that Octopus will attempt to [use Kerberos Authentication](#ActiveDirectoryAuthentication-UsingNegotiate) instead. [Read about other supported values](https://msdn.microsoft.com/en-us/library/system.net.authenticationschemes(v=vs.110).aspx).
67+
Setting `IntegratedWindowsAuthentication` will mean that Octopus will attempt to use Kerberos Authentication instead. [Read about other supported values](https://msdn.microsoft.com/en-us/library/system.net.authenticationschemes(v=vs.110).aspx).
6768

6869
:::div{.hint}
6970
**How it works**
@@ -89,22 +90,18 @@ Without some additional configuration, AD authentication, whether forms-based or
8990

9091
### Supported setups for Active Directory authentication {#supported-active-directory-setups}
9192

92-
Octopus Deploy supports various options for Active Directory authentication.
93+
Octopus Deploy supports various options for Active Directory authentication. Both HTTP.sys and Kestrel web server modes are compatible with High Availability configurations. The choice of web server determines which authentication protocols are available.
9394

94-
:::div{.hint}
95-
Not all high availability and Active Directory configurations are supported. There are limitations on the use of Kerberos in high availability scenarios. This is due to a requirement to [use a machine level SPN in order to allow Kerberos to work](#configuring-kerberos) with our web server.
96-
:::
97-
98-
| Octopus Option | Single Octopus Server | High-Availability |
99-
|---------------------------------|-----------------------|-------------------|
100-
| NTLM | Yes | Yes |
101-
| Negotiate | Yes | No |
102-
| IntegratedWindowsAuthentication | Yes | No |
95+
| Octopus Option | HTTP.sys (Kernel Mode) | Kestrel (User Mode) |
96+
|---------------------------------|------------------------|----------------------|
97+
| NTLM | Yes | Yes |
98+
| Negotiate | NTLM only | Kerberos, NTLM |
99+
| IntegratedWindowsAuthentication | NTLM only | Kerberos, NTLM |
103100

104101
:::div{.hint}
105-
**Service Accounts and Kerberos**
102+
**Service Accounts and Kerberos**
106103

107-
From Octopus version 2020.1.0 and above, an upgrade to .Net Core 3.1 and usage of the HTTP.sys library, the Octopus Deploy Service running with Domain Service Account credentials, does not have the ability to read the HttpContext.User.Identity.Name property which is used for Kerberos authentication. There is a requirement to run the Octopus Deploy Service as Local System in order to allow for Kerberos to successfully Authenticate. You can read more about this here: https://github.com/OctopusDeploy/Issues/issues/6602
104+
From Octopus version 2020.1.0 and above, an upgrade to .Net Core 3.1 and usage of the HTTP.sys library, the Octopus Deploy Service running with Domain Service Account credentials, does not have the ability to read the HttpContext.User.Identity.Name property which is used for Kerberos authentication. There is a requirement to run the Octopus Deploy Service as Local System in order to allow for Kerberos to successfully Authenticate. You can read more about this in [GitHub issue #6602](https://github.com/OctopusDeploy/Issues/issues/6602).
108105
:::
109106

110107
### Configuring Kerberos authentication for Active Directory {#configuring-kerberos}
@@ -117,38 +114,40 @@ Here's a simple checklist to help you on your way to allowing Kerberos Authentic
117114
4. Allow Automatic logon via a browser.
118115
5. Set the appropriate SPNs.
119116
6. Enable AES256 encryption for Kerberos tickets.
120-
117+
121118
- A valid Service Principal Name (SPN) for the `HTTP` service class for each Octopus host NETBIOS name. If you are accessing your Host via its FQDN then you will need to also add an FQDN also for the `HTTP` service class. (Please Note: Whether you've configured your Octopus host to use `HTTP` or `HTTPS`, you will only need to set an `HTTP` SPN.)
122119
- Included FQDNs of all Octopus Deploy Hosts and Octopus clusters within your trusted sites or Intranet zones.
123120
- Client Machines configured to allow auto logon with current username and password.
124121

125-
**SPN Configuration**
122+
#### SPN Configuration
126123

127124
Set an `HTTP` service class SPN for the NETBIOS name and FQDN of your OD hosts. For example, if you are hosting `od.domain.local` from server `server1` you will require the following registered service principal names for your server:
128-
```
125+
126+
```text
129127
HTTP/od
130128
HTTP/od.domain.local
131129
```
130+
132131
These can be registered by running the following commands in an elevated command prompt or PowerShell session:
133132

134-
```
133+
```shell
135134
setspn.exe -S HTTP/od server1
136-
setspn.exe -S HTTP/od.domain.local server1
135+
setspn.exe -S HTTP/od.domain.local server1
137136
```
138137

139138
:::div{.hint}
140139
**HA Clusters**
141140

142-
If you are running a HA Octopus Deploy environment, Kerberos authentication is not currently supported. Please refer to our section on [Supported Setups for Active Directory Authentication](#supported-active-directory-setups)
141+
Kerberos authentication in a High Availability environment requires configuring Octopus to use Kestrel (User Mode). Please refer to our section on [Supported Setups for Active Directory Authentication](#supported-active-directory-setups).
143142
:::
144143

145-
For more information about configuration of SPNs [please see this microsoft support article](https://support.microsoft.com/en-us/help/929650/how-to-use-spns-when-you-configure-web-applications-that-are-hosted-on).
144+
For more information about configuration of SPNs [please see this Microsoft support article](https://support.microsoft.com/en-us/help/929650/how-to-use-spns-when-you-configure-web-applications-that-are-hosted-on).
146145

147-
**Internet Security Configuration - Adding Octopus to the Trusted Zone**
146+
#### Internet Security Configuration - Adding Octopus to the Trusted Zone
148147

149-
The aim here is to allow the current user's logon credentials to be sent through to Octopus and authenticated against the SPNs. It is important to remember that a URI is considered to be in the "Internet Zone" whenever it contains a `.`.
148+
The aim here is to allow the current user's logon credentials to be sent through to Octopus and authenticated against the SPNs. It is important to remember that a URI is considered to be in the "Internet Zone" whenever it contains a `.`.
150149

151-
```
150+
```text
152151
Internet Zone
153152
http://host.local
154153
http://192.168.x.x
@@ -161,14 +160,14 @@ http://host
161160
http://local
162161
```
163162

164-
Accessing a host via the NETBIOS name will mean that the "Intranet zone" rules will be applied. **This can be overruled by adding the NETBIOS name to "Trusted Sites" list**. (More detail [here](https://support.microsoft.com/en-au/help/303650/intranet-site-is-identified-as-an-internet-site-when-you-use-an-fqdn-o)).
163+
Accessing a host via the NETBIOS name will mean that the "Intranet zone" rules will be applied. **This can be overruled by adding the NETBIOS name to "Trusted Sites" list**. (More detail in this [Microsoft support article](https://support.microsoft.com/en-au/help/303650/intranet-site-is-identified-as-an-internet-site-when-you-use-an-fqdn-o)).
165164

166165
The recommend way to configure this, is to add all potential URIs that will be used to access Octopus, to the "Trusted Sites" list.
167-
This can be done in several ways including via Group Policy, scripting or via [internet security settings menu](https://www.computerhope.com/issues/ch001952.htm).
166+
This can be done in several ways including via Group Policy, scripting or via [internet security settings menu](https://www.computerhope.com/issues/ch001952.htm).
168167

169-
**Internet Security Configuration - Allow Automatic logon via browser**
168+
#### Internet Security Configuration - Allow Automatic logon via browser
170169

171-
All **client machines** will need to be configured to allow automatic logon. We can set this option on all sites added to the trusted sites zone. This can be done via Group Policy, scripting or via the internet security settings menu.
170+
All **client machines** will need to be configured to allow automatic logon. We can set this option on all sites added to the trusted sites zone. This can be done via Group Policy, scripting or via the internet security settings menu.
172171

173172
To enable the option via the Internet Security Settings
174173
**Internet Explorer** go to **Tools ➜ Internet Options ➜ Security** tab, Select "Trusted Zones" then **Custom level...**.
@@ -197,7 +196,7 @@ To set trusted sites via GPO:
197196
1. Select the **Logon Options**.
198197
1. Select **Enabled** and click the drop-down menu that has appeared.
199198
1. Select **Automatic logon with current username and password**.
200-
1. Click **OK**
199+
1. Click **OK**
201200

202201
That is all the is needed for kerberos to be used as the logon method when using integrated sign-in or Forms-based authentication.
203202

@@ -217,7 +216,7 @@ Using this option, the credentials are posted back to the Octopus Server, and Oc
217216
Keep in mind that if your Octopus Server isn't [configured to use HTTPS](/docs/security/exposing-octopus/expose-the-octopus-web-portal-over-https), these are posted in plain text (just like signing in to any other website).
218217
:::
219218

220-
If the Octopus Server and its users are on the **same domain**, it is sufficient to provide a simple username in this field, for example *paul**.*User Principal Names, of the form *user@domain.com* are also accepted in this scenario.
219+
If the Octopus Server and its users are on the **same domain**, it is sufficient to provide a simple username in this field, for example *paul*. User Principal Names, of the form `user@domain.com` are also accepted in this scenario.
221220

222221
If the server and its users are on different domains, or **many domains** are in use, the *DOMAIN\user* username format must be provided for users who are not a member of the domain the server is in.
223222

@@ -229,7 +228,7 @@ Users will receive the error "**Username not found. UPN format may not be suppo
229228

230229
Forms-based authentication can also be disabled:
231230

232-
**Disabling HTML form sign-in**
231+
### Disabling HTML form sign-in
233232

234233
```bash
235234
Octopus.Server.exe configure --allowFormsAuthenticationForDomainUsers=false
@@ -249,7 +248,7 @@ It is possible to reconfigure an existing Octopus Server to use a different auth
249248

250249
To switch from username/password authentication to Active Directory authentication, use the following script from an administrative command prompt on the Octopus Server:
251250

252-
**Selecting Active Directory authentication**
251+
#### Selecting Active Directory authentication
253252

254253
```bash
255254
Octopus.Server.exe configure --activeDirectoryIsEnabled=true
@@ -263,7 +262,7 @@ The text `YOUR_USERNAME` should be your Active Directory account name, in either
263262

264263
To switch from Active Directory authentication to username/password authentication, use the following script from an administrative command prompt on the Octopus Server:
265264

266-
**Switching to username/password authentication**
265+
#### Switching to username/password authentication
267266

268267
```bash
269268
Octopus.Server.exe configure --activeDirectoryIsEnabled=false
@@ -275,7 +274,7 @@ Octopus.Server.exe admin --username=YOUR_USERNAME
275274

276275
In **Octopus 2.5.11** and newer you can specify a custom container to use for AD Authentication. This feature addresses the issue of authenticating with Active Directory where the Users container is not in default location and permissions prevent queries as a result. Specifying the container will result in the container being used as the root of the context. The container is the distinguished name of a container object. All queries are performed under this root which can be useful in a more restricted environment. This may be the solution if you see a "The specified directory service attribute or value does not exist" error when using Active Directory authentication.
277276

278-
**Setting a custom container**
277+
#### Setting a custom container
279278

280279
```bash
281280
Octopus.Server.exe configure --activeDirectoryContainer "CN=Users,DC=GPN,DC=COM"
@@ -311,4 +310,4 @@ The following topics are explained further in this section:
311310

312311
- [Moving your Octopus Server to another Active Directory domain](/docs/security/authentication/active-directory/moving-active-directory-domains)
313312
- [Specify a custom container for AD authentication](/docs/security/authentication/active-directory/custom-containers-for-ad-authentication)
314-
- [Troubleshooting Active Directory integration](/docs/security/authentication/active-directory/troubleshooting-active-directory-integration)
313+
- [Troubleshooting Active Directory integration](/docs/security/authentication/active-directory/troubleshooting-active-directory-integration)

0 commit comments

Comments
 (0)