Gatesentry icon indicating copy to clipboard operation
Gatesentry copied to clipboard

Set CA&Key in Settings

Open joBr99 opened this issue 1 year ago • 1 comments

Hey, I tried to setting MITM Filtering Certificate in the Settings and it keeps changing back to the default one. (However shows sucessfully saved.)

After it didn't work with my sub-ca cert, I tried with the files from this command:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"

Tried both 4096 and 2048 keylength.

I tried both docker and binary. Building myself from latest didn't work as the settings page doesn't load, because the get request for bundle.js results in a 404.

joBr99 avatar Nov 14 '24 21:11 joBr99

Kinda a really long fix/work around for this that I found:

  • In this link is the runtime.go file that needs to be changed to your cert and key pem files, the default is hard coded in - you'll just need to change the defaults set in there to the contents of your generated cert and key files. --- https://github.com/fifthsegment/Gatesentry/blob/master/application/runtime.go#L192

  • In this link is the build action for building a new release showing the commands for building it yourself - the short is you need to install and build with npm to get the web ui to work when you build it yourself --- https://github.com/fifthsegment/Gatesentry/actions/runs/6605273103/workflow#L37

Works as intended when I cloned the repo and followed these steps for my own set up

AVoSI-VI avatar Jan 04 '25 01:01 AVoSI-VI