microsoft / windows-admin-center-sdk

SDK including documentation and sample code for developing extensions for Windows Admin Center (previously Project Honolulu)
Other
118 stars 51 forks source link

How to make gateway plugin support https #221

Closed hezhiyu1980 closed 2 years ago

hezhiyu1980 commented 2 years ago

Hi , Our project need a WAC gateway plugin to communicate with node. Under WAC DEV_MODE, we can use HTTP to communicate with gateway plugin successfully.
But for security purpose, we need use HTTPs to communicate with plugin gateway. We found that, if we want to use HTTPS, we should not use DEV_MODE. So we reinstall WAC without DEV_MODE opt. But after we copy dll to plugins director, the WAC can not restart, the log shows the error below, seems we need to sign the dll. image

Then, we signed the dll, this time, the error disappeared, WAC can start. But we got another error when we try to access the gate plugin from browser. image image

I wonder the correct way to using https in gateway plugin. Do we need to use a special certificate to sign the dll? Is there any special steps?

hezhiyu1980 commented 2 years ago

After invesgitation, we understand the issue, gateway plugin under https mode can not be access from web browser because we can not specify a token in browser. To solve this issue, we need add an extension to WAC and pack the gateway plugin dll to that extension to form a bundle and install this bundle to WAC. The extension can call WAC SDK to use the plugin gateway with token, this realy work.