Skip to content

Commit 1299858

Browse files
committed
fixed pre-existing errors
1 parent 20910a6 commit 1299858

2 files changed

Lines changed: 36 additions & 32 deletions

File tree

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

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -48,7 +49,7 @@ Octopus.Server.exe configure --webServer=Kestrel
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**
@@ -98,9 +99,9 @@ Octopus Deploy supports various options for Active Directory authentication. Bot
9899
| IntegratedWindowsAuthentication | NTLM only | Kerberos, NTLM |
99100

100101
:::div{.hint}
101-
**Service Accounts and Kerberos**
102+
**Service Accounts and Kerberos**
102103

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).
104105
:::
105106

106107
### 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
113114
4. Allow Automatic logon via a browser.
114115
5. Set the appropriate SPNs.
115116
6. Enable AES256 encryption for Kerberos tickets.
116-
117+
117118
- 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.)
118119
- Included FQDNs of all Octopus Deploy Hosts and Octopus clusters within your trusted sites or Intranet zones.
119120
- Client Machines configured to allow auto logon with current username and password.
120121

121-
**SPN Configuration**
122+
#### SPN Configuration
122123

123124
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
125127
HTTP/od
126128
HTTP/od.domain.local
127129
```
130+
128131
These can be registered by running the following commands in an elevated command prompt or PowerShell session:
129132

130-
```
133+
```shell
131134
setspn.exe -S HTTP/od server1
132-
setspn.exe -S HTTP/od.domain.local server1
135+
setspn.exe -S HTTP/od.domain.local server1
133136
```
134137

135138
:::div{.hint}
@@ -138,13 +141,13 @@ setspn.exe -S HTTP/od.domain.local server1
138141
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).
139142
:::
140143

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).
142145

143-
**Internet Security Configuration - Adding Octopus to the Trusted Zone**
146+
#### Internet Security Configuration - Adding Octopus to the Trusted Zone
144147

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 `.`.
146149

147-
```
150+
```text
148151
Internet Zone
149152
http://host.local
150153
http://192.168.x.x
@@ -157,14 +160,14 @@ http://host
157160
http://local
158161
```
159162

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)).
161164

162165
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).
164167

165-
**Internet Security Configuration - Allow Automatic logon via browser**
168+
#### Internet Security Configuration - Allow Automatic logon via browser
166169

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.
168171

169172
To enable the option via the Internet Security Settings
170173
**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:
193196
1. Select the **Logon Options**.
194197
1. Select **Enabled** and click the drop-down menu that has appeared.
195198
1. Select **Automatic logon with current username and password**.
196-
1. Click **OK**
199+
1. Click **OK**
197200

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

@@ -213,7 +216,7 @@ Using this option, the credentials are posted back to the Octopus Server, and Oc
213216
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).
214217
:::
215218

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.
217220

218221
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.
219222

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

226229
Forms-based authentication can also be disabled:
227230

228-
**Disabling HTML form sign-in**
231+
#### Disabling HTML form sign-in
229232

230233
```bash
231234
Octopus.Server.exe configure --allowFormsAuthenticationForDomainUsers=false
@@ -245,7 +248,7 @@ It is possible to reconfigure an existing Octopus Server to use a different auth
245248

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

248-
**Selecting Active Directory authentication**
251+
#### Selecting Active Directory authentication
249252

250253
```bash
251254
Octopus.Server.exe configure --activeDirectoryIsEnabled=true
@@ -259,7 +262,7 @@ The text `YOUR_USERNAME` should be your Active Directory account name, in either
259262

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

262-
**Switching to username/password authentication**
265+
#### Switching to username/password authentication
263266

264267
```bash
265268
Octopus.Server.exe configure --activeDirectoryIsEnabled=false
@@ -271,7 +274,7 @@ Octopus.Server.exe admin --username=YOUR_USERNAME
271274

272275
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.
273276

274-
**Setting a custom container**
277+
#### Setting a custom container
275278

276279
```bash
277280
Octopus.Server.exe configure --activeDirectoryContainer "CN=Users,DC=GPN,DC=COM"
@@ -307,4 +310,4 @@ The following topics are explained further in this section:
307310

308311
- [Moving your Octopus Server to another Active Directory domain](/docs/security/authentication/active-directory/moving-active-directory-domains)
309312
- [Specify a custom container for AD authentication](/docs/security/authentication/active-directory/custom-containers-for-ad-authentication)
310-
- [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)

src/pages/docs/security/authentication/active-directory/troubleshooting-active-directory-integration.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ Octopus Deploy uses .dlls provided by Microsoft to interact with Active Director
3939
- System.DirectoryServices
4040
- System.DirectoryServices.ActiveDirectory
4141

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.
4343

4444
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:
4545

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.
4747
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.
4848

4949
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
5757
3. Email Address
5858

5959
:::figure
60-
![](/docs/img/security/authentication/active-directory/images/5866202.png)
60+
![Active Directory user properties showing the Account tab](/docs/img/security/authentication/active-directory/images/5866202.png)
6161
:::
6262

63-
![](/docs/img/security/authentication/active-directory/images/5866203.png)
63+
![Active Directory user properties showing additional fields](/docs/img/security/authentication/active-directory/images/5866203.png)
6464

6565
These values can be used by Octopus to uniquely identify which Octopus User Account should be associated with each Active Directory User.
6666

@@ -101,7 +101,8 @@ Notes:
101101
- Ensure you replace the domain username ``ExampleUser`` with a sample Octopus username who would normally log into the system.
102102
- 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.
103103

104-
If specifying a container.
104+
If specifying a container:
105+
105106
- 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)
106107

107108
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
146147
It's recommended that you backup any registry entries before making changes.
147148
:::
148149

149-
```
150+
```text
150151
Path: HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\15 Field Engineering
151152
Type: DWORD
152153
Value: 5
@@ -163,7 +164,7 @@ For more information on diagnostic logging, see the following Microsoft TechNet
163164
The diagnostic logs can be viewed in the Event Viewer.
164165

165166
:::figure
166-
![](/docs/img/security/authentication/active-directory/images/5865632.png)
167+
![Event Viewer showing Active Directory diagnostic logs](/docs/img/security/authentication/active-directory/images/5865632.png)
167168
:::
168169

169170
:::div{.hint}

0 commit comments

Comments
 (0)