1

Context:

  1. Created a Domain Controller with Active Directory Setup.
  2. Created another Server with Jenkins-2 installed.(DNS Points correctly to the Domain Controllers)
  3. Installed the Active Directory Plugin
  4. Installed the Powershell Plugin
  5. Created a Powershell Job, with command Copy-Item -Path \\SFTPServer\Docs\file.txt $Home

Steps:

  1. List item Logged in to Jenkins Server Machine with credentials of globomantics.local\administrator
  2. List item Started Jenkins to be available on localhost:8080
  3. List item Logged in into Jenkins using credentials of globomantics.local\someunderprivilegeduser
  4. List item Run the above created Powershell Job

What happens: Powershell window appears and runs the command .. in the context of AD User globomantics.local\administrator

What is required: Powershell command runs in the context of globomantics.local\someunderprivilegeduser

I understand that when we logged into jenkins using globomantics.local\someunderprivilegeduser, a kerberos ticket is generated on this machine. How can i use that ticket to run this powershell command? OR if my approach is completely wrong, what else to do?

Note: let's say globomantics.local\someunderprivilegeduser is NOT allowed to read \\SFTPServer\Docs\file.txt, In this case the Powershell Job should fail. BUT, since the job runs in the context of globomantics.local\administrator, the Job runs successfully.

blogbydev
  • 1,445
  • 2
  • 17
  • 29
  • When you create the job, specify the `someunderprivilegeduser` credentials – Mathias R. Jessen Nov 04 '16 at 08:01
  • That's the problem! Since the user is already logged in with his AD credentials, I should be able to run the PS command with his credentials. I don't know how to get his credentials. – blogbydev Nov 04 '16 at 15:58

0 Answers0