jdel / sspks

A very simple Synology Package Server, reverse engineered from the official Synology package repository and SynoCommunity.
GNU General Public License v3.0
258 stars 64 forks source link

Certificate for signed packages #37

Closed DKeppi closed 7 years ago

DKeppi commented 7 years ago

Hello!

Where i can import my certificate to upload signed packages to this server? Would be nice to have the certificate in the packagecenter when i put my server-link into the package sources.

Best regards DKeppi

jdel commented 7 years ago

Hi @DKeppi,

If you need to run the website over SSL through a Nginx proxy, use at least release v1.0. Previous version are broken with ssl.

As to the key itself, I need to read out the Synology documentation to implement this, but I don't see a reason not to. Stay tuned.

DKeppi commented 7 years ago

Hi @jdel

im not talking about ssl, im only talking about the certificate for the package center itself. With this it will be possible to offer signed packages on sspks, because the key will be stored in the package center when you add the link of the server.

Thanks & BR DKeppi

jdel commented 7 years ago

Yes, I think we just need to add a keyrings array in the json. I will have a look later on.

jdel commented 7 years ago

Actually, the functionality is already there, it has been merged a while back form another fork.

https://github.com/jdel/sspks/blob/752f6e34d27f3631f77385a442615807f130f3f9/lib/SSpkS/Output/JsonOutput.php#L151-L157

Can you try to put in your GPG key named gpgkey.asc in the root directory and check out if it works ?

DKeppi commented 7 years ago

Nice to hear.

Which is the root i have to link to my server? I use the docker container on a Synology DS and i only have the /var/www/localhost/htdocs/packages linked to put packages in it!

jdel commented 7 years ago

Ok, in that case, you can just re-run your container and bind mount your public key the same way you bind mount the packages directory but in /var/www/localhost/htdocs/gpgkey.asc.

On the command line it would look like:

-v /my/local/path/to/key.asc:/var/www/localhost/htdocs/gpgkey.asc:ro

DKeppi commented 7 years ago

Thank you very much, it worked :)

Is there also an Option for a favicon.ico

DKeppi commented 7 years ago

Sorry found it on my own...i linked /var/www/localhost/htdocs/favicon.ico to my favicon.ico

Great work, thank you very much!

jdel commented 7 years ago

Good news ! I will document this.