Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-41745] Updating CLI documentation for non-Remoting modes #802

Merged
merged 3 commits into from
Apr 11, 2017

Conversation

jglick
Copy link
Contributor

@jglick jglick commented Apr 5, 2017

Presumes jenkinsci/jenkins#2795 is merged.

@reviewbybees

23:21 <@danielbeck> it's probably better in general, but e.g. firewalls rules may require regular CLI use
23:21 <@danielbeck> in any case, auth needs to use SSH keys
////
Prior to Jenkins 2.54, use of the custom CLI client is not recommended for security reasons:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If merged into this week’s release, obviously.

====
The `JENKINS_URL` environment variable is automatically set when Jenkins forks a process
during builds or Pipelines, allowing the use of the Jenkins CLI from inside a
project without explicit configuration of the Jenkins URL.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting this tip since

  • some of the commands relying on this trick, such as set-build-result, will not work without Remoting mode
  • even if they do, you have to somehow pass a real user’s authentication along to a Jenkins build, which is inherently risky


=== Common Problems
===== Common Problems with the Remoting-based client

There are a number of common problems that may be experienced when running the
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is far from an exhaustive list. In the links section of JENKINS-41745 I have tried to dig up various issues that I suspect are limited to Remoting mode.

@ghost
Copy link

ghost commented Apr 5, 2017

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

Copy link
Member

@rtyler rtyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, I hope 2.54 ships with the new CLI!

23:21 <@danielbeck> it's probably better in general, but e.g. firewalls rules may require regular CLI use
23:21 <@danielbeck> in any case, auth needs to use SSH keys
////
Prior to Jenkins 2.54, use of the custom CLI client is not recommended for security reasons:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrasing "custom CLI client" is ambiguous IMHO. "I never downloaded a custom client, I used the one shipped with Jenkins!"

I suggest rephrasing to something more assertive too, like:

Using the CLI client .jar with versions older than Jenkins 2.54 is not recommended, as the older CLI client defaults to a transport mode (JNLP) with a history of security issues . As of 2.54, the CLI client .jar uses more a more secure default mode (HTTP, -http).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not conflate JNLP with the CLI protocol.

They are two different protocols, and JNLP4 should now be just as safe as SSH for launching a build agent.

The issue with the CLI is fundamentally exposing the remoting protocol with the serialisation vectors to persons other than the Jenkins Admin.

We need admins to launch agents either with JNLP4 or SSH and conflating with the CLI protocol may cause confusion and drive them to SSH as the only slave launch mechanism (which is bad)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/JNLP/remoting/ still works for me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it is the protocol, not the transport, which is the problem. Remoting protocol is insecure over either TCP or HTTP Duplex transport.

I will try to amend this text along the lines of what @rtyler suggests.

And clarifying surrounding text as suggested by @rtyler.
====
=== Client connection modes

There are three basic modes in which the 2.54+ client may be used, selectable by global option:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(version number here and elsewhere to be adjusted according to actual merge target)

Copy link
Contributor

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good though the PR builder grumbles

@jglick
Copy link
Contributor Author

jglick commented Apr 10, 2017

Ready for merge I think.

PR error looks unrelated:

npm ERR! network read ECONNRESET

See INFRA-1139.

@oleg-nenashev
Copy link
Contributor

@reviewbybees done

@daniel-beck
Copy link
Contributor

I'm just going to interpret

Looking good

from @rtyler as approval, otherwise I'd have to adjust my (approved) blog post.

@daniel-beck daniel-beck merged commit b1b7dd9 into jenkins-infra:master Apr 11, 2017
@jglick jglick deleted the patch-1 branch April 11, 2017 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants