Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
import hudson.plugins.sshslaves.SSHLauncher;
import hudson.slaves.ComputerLauncher;
import hudson.slaves.SlaveComputer;
import hudson.util.VersionNumber;
import jenkins.model.Jenkins;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;

/**
* An administrative warning that checks all SSH slaves have a {@link SshHostKeyVerificationStrategy}
Expand All @@ -59,19 +56,6 @@ public boolean isActivated() {
return false;
}

//TODO: This method can be removed when the baseline is updated to 2.103.
/**
* @return true if this version of the plugin is running on a Jenkins version where JENKINS-43786 is included.
*/
@Restricted(DoNotUse.class)
public boolean isTheNewDesignAvailable() {
final VersionNumber version = Jenkins.getVersion();
if (version != null && version.isNewerThan(new VersionNumber("2.103"))) {
return true;
}
return false;
}

@Override
public String getDisplayName() {
return Messages.MissingVerificationStrategyAdministrativeMonitor_DisplayName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,8 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core">

<j:if test="${!it.isTheNewDesignAvailable}">
<div class="warning">
<p>SSH Host Key Verifiers are not configured for all SSH slaves on this Jenkins instance. This could leave these slaves open to man-in-the-middle attacks. <a href="${rootURL}/computer/">Update your slave configuration</a> to resolve this.</p>
</div>
</j:if>

<j:if test="${it.isTheNewDesignAvailable}">
<div class="alert alert-warning">
SSH Host Key Verifiers are not configured for all SSH slaves on this Jenkins instance. This could leave these slaves open to man-in-the-middle attacks. <a href="${rootURL}/computer/">Update your slave configuration</a> to resolve this.
</div>
</j:if>

</j:jelly>