Security question - can master-slave communication be encrypted?
1,204 views
Skip to first unread message
Akshay Dayal
unread,
Jan 21, 2015, 2:35:40 PM1/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkin...@googlegroups.com
Hey folks,
We want to use Jenkins for a project and have a few security related questions. In our setup we're going to have the slaves register themselves to the master using JNLP. (Note: Having the master initiate connections over SSH is not an option).
Q1. Once they are connected to the master - what is the protocol that is used for communication?
Q2. Where can I read up more about the communication mechanism?
Q3. Is the communication encrypted by default? If not - can it be encrypted?
Best,
Akshay
Jesse Glick
unread,
Jan 21, 2015, 2:59:29 PM1/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Dev
On Wed, Jan 21, 2015 at 2:35 PM, Akshay Dayal <aks...@google.com> wrote:
> Q1. Once they are connected to the master - what is the protocol that is
> used for communication?
Jenkins Remoting, a binary format.
> Q2. Where can I read up more about the communication mechanism?
Source code for jenkinsci/remoting.
> Q3. Is the communication encrypted by default? If not - can it be encrypted?
AFAIK there is no encryption used for JNLP slaves.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkin...@googlegroups.com
Thanks for the quick reply and the links to the source!
If encryption is important to us, how long do you think it will take us to add support for it once we get familiar with the architecture and source? Do you know of any in-progress efforts to do so?
Jesse Glick
unread,
Jan 21, 2015, 4:37:04 PM1/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Dev
On Wed, Jan 21, 2015 at 3:07 PM, Akshay Dayal <aks...@google.com> wrote:
> If encryption is important to us, how long do you think it will take us to
> add support for it once we get familiar with the architecture and source?
Always hard to judge that kind of thing. BTW I forgot to mention the
client side:
A simple cipher is already used to ensure that the client javaws
command is actually coming from a slave-jnlp.jelly rendered for a user
authorized to connect to that Computer, but I am not sure how useful
that is. You could perhaps use
to transfer a randomly generated symmetric encryption key from the
slave to the master during the handshake, and then wrap the
SocketInput/OutputStream in the corresponding cipher for all further
communications.
(Whether such a method is in fact safe is a question for a qualified
security expert.)
> Do you know of any in-progress efforts to do so?
No. It sounds like a generally appropriate change to make, though, so
I think a well-implemented and tested patch to add this mode would be
accepted as the default behavior for Jenkins. (You would need to add a
JnlpSlaveAgentProtocol3 so as to remain wire-compatible with old slave
agents. See JnlpSlaveAgentProtocol2 for how this is done.)
Akshay Dayal
unread,
Jan 23, 2015, 2:47:57 PM1/23/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkin...@googlegroups.com
Hey Jesse,
Thanks for the detailed information. I was looking at the source yesterday, I'll start playing around with this next week. I've created https://issues.jenkins-ci.org/browse/JENKINS-26580, if I need help on something should I post questions on this thread, post it in the bug or something else?
I may need some help updating the handshake process where the slave sends its key to the master. I'm guessing at least one place that needs to be modified (or maybe more correctly overriden) is:
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Dev
On Fri, Jan 23, 2015 at 2:47 PM, Akshay Dayal <aks...@google.com> wrote:
> if I need help on
> something should I post questions on this thread, post it in the bug or
> something else?
I guess it makes sense to comment on the JIRA ticket; anyone
interested in watching it can.
> I may need some help updating the handshake process where the slave sends
> its key to the master.
I was assuming the encryption would begin after that handshake, since
presumably the node name is not a state secret.