Hello,
I am in the process of deploying Octopus Deploy server in our test environment. I have set Octopus Deploy to use AD integrated authentication. For this to work I have to set the following account properties (according to https://octopus.com/docs/administration/authentication-providers/troubleshooting-active-directory-integration)
- samAccountName (pre-Windows 2000 Logon Name)
- UPN (User Principal Name)
- Email Address
When I install and configure Octopus Deploy and the email address and the UPN of the AD account I specify as the admin account in Octopus Deploy are not exactly the same, the admin account cannot access the configuration page in Octopus deploy. The account can not even configure the dashboard. I receive the following error message: “You do not have permission to perform this action. Please contact your Octopus administrator. Missing permission: EnvironmentView”
The logging states that the account has been added to the Octopus Administrators team
2017-03-27 16:49:52.9716 1 INFO Creating user TNXT\administrator
2017-03-27 16:49:53.0497 1 INFO Adding user TNXT\administrator to the Octopus Administrators team
2017-03-27 16:49:53.0653 1 INFO Adding user TNXT\administrator to the Everyone team
2017-03-27 16:49:53.0810 1 INFO Done.
But when additional configurations are set the logging shows:
2017-03-27 21:59:10.4343 38 ERROR Unhandled exception from web server processing GET to http://localhost/{{ ‘~/images/directory_services_signin_buttons/microsoft-logo.svg’ | resolveLink }}: An operation was attempted on a nonexistent network connection
System.Net.HttpListenerException (0x80004005): An operation was attempted on a nonexistent network connection
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.StreamWriter.Close()
at Newtonsoft.Json.JsonWriter.System.IDisposable.Dispose()
at Nancy.Serialization.JsonNet.JsonNetSerializer.Serialize[TModel](String contentType, TModel model, Stream outputStream)
at Octopus.Server.Web.OctopusNancyHost.OutputWithDefaultTransferEncoding(Response nancyResponse, HttpListenerResponse response) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Web\OctopusNancyHost.cs:line 359
at Octopus.Server.Web.OctopusNancyHost.ConvertNancyResponseToResponse(NancyContext nancyRequest, Response nancyResponse, HttpListenerResponse response) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Web\OctopusNancyHost.cs:line 342
at Octopus.Server.Web.OctopusNancyHost.Process(HttpListenerContext ctx) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Web\OctopusNancyHost.cs:line 454
2017-03-27 22:02:48.8335 37 WARN You do not have permission to perform this action. Please contact your Octopus administrator. Missing permission: EnvironmentView (administrator@tnxt.lab requesting http://localhost/api/environments/all 0f91c52d034640efb3e82db04c758be1)
When I set the UPN and the email address of the AD user exactly the same and then (re)install the Octopus Deploy server (process is automated, thus each time exactly the same) the account can access everything and additional configurations get set successful
In our environment the AD account do not (always) have the same email address and UPN configured.
In a situation where an Administrator account is able to configure the Octopus Deploy server (install and configuration went fine) and we add a new AD user to an AD group and that AD group has been added to Octopus Deploy Server with one of the roles, the user cannot do anything when logged on to the Octopus Deploy server when:
- Email address has not been set
and / or - Email address does not match the UPN
In order to correct this I first have to delete the user in Octopus Deploy (under Users). Then, in the AD account for that user, set the email address and make sure it is the same as the UPN.
Is this “as designed” or is this a bug in the AD authentication implementation within Octopus Deploy?
Any way to solve this, except for making sure email address and UPN are the same?
thank you
Arjan