You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/security/authentication/active-directory/index.md
+28-25Lines changed: 28 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,12 @@ Active Directory authentication can only be configured for Octopus Server and no
14
14
15
15
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.
16
16
17
-
**Domain user required during setup**
17
+
## Domain user required during setup
18
18
19
19
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.
20
20
21
21
## Active Directory sign-in options
22
+
22
23
If you are using Active Directory Authentication with Octopus, there are two ways to sign in.
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).
67
68
68
69
:::div{.hint}
69
70
**How it works**
@@ -98,9 +99,9 @@ Octopus Deploy supports various options for Active Directory authentication. Bot
98
99
| IntegratedWindowsAuthentication | NTLM only | Kerberos, NTLM |
99
100
100
101
:::div{.hint}
101
-
**Service Accounts and Kerberos**
102
+
**Service Accounts and Kerberos**
102
103
103
-
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).
104
105
:::
105
106
106
107
### Configuring Kerberos authentication for Active Directory {#configuring-kerberos}
@@ -113,23 +114,25 @@ Here's a simple checklist to help you on your way to allowing Kerberos Authentic
113
114
4. Allow Automatic logon via a browser.
114
115
5. Set the appropriate SPNs.
115
116
6. Enable AES256 encryption for Kerberos tickets.
116
-
117
+
117
118
- 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.)
118
119
- Included FQDNs of all Octopus Deploy Hosts and Octopus clusters within your trusted sites or Intranet zones.
119
120
- Client Machines configured to allow auto logon with current username and password.
120
121
121
-
**SPN Configuration**
122
+
#### SPN Configuration
122
123
123
124
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:
124
-
```
125
+
126
+
```text
125
127
HTTP/od
126
128
HTTP/od.domain.local
127
129
```
130
+
128
131
These can be registered by running the following commands in an elevated command prompt or PowerShell session:
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).
139
142
:::
140
143
141
-
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).
142
145
143
-
**Internet Security Configuration - Adding Octopus to the Trusted Zone**
146
+
#### Internet Security Configuration - Adding Octopus to the Trusted Zone
144
147
145
-
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 `.`.
146
149
147
-
```
150
+
```text
148
151
Internet Zone
149
152
http://host.local
150
153
http://192.168.x.x
@@ -157,14 +160,14 @@ http://host
157
160
http://local
158
161
```
159
162
160
-
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)).
161
164
162
165
The recommend way to configure this, is to add all potential URIs that will be used to access Octopus, to the "Trusted Sites" list.
163
-
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).
164
167
165
-
**Internet Security Configuration - Allow Automatic logon via browser**
168
+
#### Internet Security Configuration - Allow Automatic logon via browser
166
169
167
-
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.
168
171
169
172
To enable the option via the Internet Security Settings
170
173
**Internet Explorer** go to **Tools ➜ Internet Options ➜ Security** tab, Select "Trusted Zones" then **Custom level...**.
@@ -193,7 +196,7 @@ To set trusted sites via GPO:
193
196
1. Select the **Logon Options**.
194
197
1. Select **Enabled** and click the drop-down menu that has appeared.
195
198
1. Select **Automatic logon with current username and password**.
196
-
1. Click **OK**
199
+
1. Click **OK**
197
200
198
201
That is all the is needed for kerberos to be used as the logon method when using integrated sign-in or Forms-based authentication.
199
202
@@ -213,7 +216,7 @@ Using this option, the credentials are posted back to the Octopus Server, and Oc
213
216
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).
214
217
:::
215
218
216
-
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.
217
220
218
221
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.
219
222
@@ -225,7 +228,7 @@ Users will receive the error "**Username not found. UPN format may not be suppo
@@ -245,7 +248,7 @@ It is possible to reconfigure an existing Octopus Server to use a different auth
245
248
246
249
To switch from username/password authentication to Active Directory authentication, use the following script from an administrative command prompt on the Octopus Server:
@@ -259,7 +262,7 @@ The text `YOUR_USERNAME` should be your Active Directory account name, in either
259
262
260
263
To switch from Active Directory authentication to username/password authentication, use the following script from an administrative command prompt on the Octopus Server:
261
264
262
-
**Switching to username/password authentication**
265
+
#### Switching to username/password authentication
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.
Copy file name to clipboardExpand all lines: src/pages/docs/security/authentication/active-directory/troubleshooting-active-directory-integration.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,11 @@ Octopus Deploy uses .dlls provided by Microsoft to interact with Active Director
39
39
- System.DirectoryServices
40
40
- System.DirectoryServices.ActiveDirectory
41
41
42
-
The code will use the method `LoginUser()` to authenticate the user's credentials.
42
+
The code will use the method `LoginUser()` to authenticate the user's credentials.
43
43
44
44
Assuming the login is successful, Octopus Deploy will create [System.DirectoryServices.AccountManagement.UserPrincipal](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.accountmanagement.userprincipal) object to query group membership. Group membership query in this order of operations:
45
45
46
-
1. First call [GetAuthorizationGroups](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.accountmanagement.userprincipal.getauthorizationgroups) as that does a recursive search and returns security groups only.
46
+
1. First call [GetAuthorizationGroups](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.accountmanagement.userprincipal.getauthorizationgroups) as that does a recursive search and returns security groups only.
47
47
2. If `GetAuthorizationGroups()` fails (for a variety of reasons), then run [GetGroups](https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.accountmanagement.principal.getgroups). The downside of `GetGroups()` is it only returns groups a user is a direct member of and includes distribution groups. Octopus Deploy ignores distribution groups.
48
48
49
49
When a cross-domain trust is configured, both `GetAuthorizationGroups()` and `GetGroups()` methods will include groups in the trusted domains of the user. Octopus Deploy relies on what those methods return to determine group membership. We've found the vast majority of the time; Active Directory issues are a misconfiguration within Active Directory itself. We've provided scripts below where you can take Octopus Deploy out of the equation and test your configuration directly.
@@ -57,10 +57,10 @@ Octopus relies on Active Directory users being configured with enough informatio

64
64
65
65
These values can be used by Octopus to uniquely identify which Octopus User Account should be associated with each Active Directory User.
66
66
@@ -101,7 +101,8 @@ Notes:
101
101
- Ensure you replace the domain username ``ExampleUser`` with a sample Octopus username who would normally log into the system.
102
102
- It's recommended that you run this script as the same user you're running the Octopus service under and on the same server so it reproduces the problem accurately.
103
103
104
-
If specifying a container.
104
+
If specifying a container:
105
+
105
106
- Ensure you replace the active directory container string ``CN=Users, DC=acme, DC=local`` with the appropriate value for your network. If you're not sure of this value, we suggest talking to your network team (active directory expert) or trying different values and testing it with the script. For additional help on building/finding your container string, this StackOverflow answer is excellent. [http://serverfault.com/a/130556](http://serverfault.com/a/130556)
106
107
107
108
See the following documentation page for further information on configuring Octopus to use a [specific Active Directory container](/docs/security/authentication/active-directory/custom-containers-for-ad-authentication).
@@ -146,7 +147,7 @@ If problems persist, we suggest turning on active directory diagnostic logging a
146
147
It's recommended that you backup any registry entries before making changes.
147
148
:::
148
149
149
-
```
150
+
```text
150
151
Path: HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\15 Field Engineering
151
152
Type: DWORD
152
153
Value: 5
@@ -163,7 +164,7 @@ For more information on diagnostic logging, see the following Microsoft TechNet
163
164
The diagnostic logs can be viewed in the Event Viewer.
0 commit comments