doukucai0099 2014-10-30 17:53
浏览 95

Ubuntu GPG密钥在多个服务器之间共享

I have successfully set up our development server to send GPG encrypted emails from a PHP script. The user is asked for his/her public key which is then imported into GPG and a fingerprint is saved against this user for later encryption. All is well!

But now I need to deploy this onto the production servers - note multiple web servers - and this is putting me in a bit of a bother because I don't know how to share keys across them. To make this clearer, user A logs in on the website and server #1 is used to serve the pages. He/she enters his/her public key which will be stored in the central database. Some time later, user A logs back in on the website but now is on server #2. An action is taken and an email is sent from server #2 but no key can be found in the local GPG as it was saved on server #1.

So really my question is to ask which way is more suitable to achieve this, bearing in mind that I have 3 web servers at present + 1 central database server. I am running Ubuntu 14.04 on all of them.
1) Should I export all the keys to a public place when I receive them? Is that safe/allowed or frowned upon?
2) Is there a mechanism to get the keys replicated on the other servers?
3) Can I use a central key repository on one of my servers?

Sorry if this sounds like a daft question - thanks a lot!

  • 写回答

1条回答 默认 最新

  • dtjo51649 2014-11-02 20:05
    关注

    Solved this using a very simple method.

    Each time an email needs to be sent to a user with PGP enabled, the code will check whether the key has already been imported on the server using --list-keys <signature>. If this happens to be false then I just import the key as it is saved in the database.

    Pretty robust as it is now, but I was looking for a more gpg-oriented type of solution.

    Thanks

    评论

报告相同问题?

悬赏问题

  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器