I have 3 machines:
Machine A:
Network: 172.16.x.x
Domain Joined : No
OS: Server 2016
Machine B:
Network: 172.16.x.x
Domain Joined : No
OS: Server 2016
Machine C:
Network: Outside Network
Domain Joined : n/a
I need to invoke a PowerShell custom function on Machine C from Machine A . I am able to invoke all the functions from Machine 'A' properly by using the credentials which are authorized on Machine 'B' except one unique function.
That function invokes an HTTP request to Machine 'C' using different set of credentials. These credentials are not a domain user credentials as Machine 'C' is an outside the network/non domain joined machine.
When I send the invoke-command from Machine B to Machine C it works fine
I am able to send any command from Machine A to Machine B - its working fine
When I send command from Machine A to Machine C by invoking the already tested function on Machine B, i.e. Machine B is the middle man. I get delegation trust error.
I am not able to understand why I am getting Credential delegation error as I am importing the credential within the function on Machine 'B'.
This design was working fine for few months and its broken now and I am not able to understand the cause of it. I cannot send command directly to Machine C from Machine A, as machine A is just a dumb machine which is just used to forward the commands to different machines based on the requirement. This failing function is the only function which is importing the credentials within the function. All the other function which does not require external credentials works fine.
Please let me know if anyone has ideas on how to make this design work again.
Thanks in advance
So, in nutshell, the second hop is an external machine.