Bug 578024 - Add help about trust

Change-Id: If07731fef150adeeba937c36c6348de11184f587
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.common/+/189479
Tested-by: Mickael Istria <mistria@redhat.com>
Reviewed-by: Mickael Istria <mistria@redhat.com>
diff --git a/bundles/org.eclipse.platform.doc.user/contexts_P2.xml b/bundles/org.eclipse.platform.doc.user/contexts_P2.xml
index ece6612..6631439 100644
--- a/bundles/org.eclipse.platform.doc.user/contexts_P2.xml
+++ b/bundles/org.eclipse.platform.doc.user/contexts_P2.xml
@@ -49,4 +49,8 @@
         <description>This page allows you to configure the preferences for automatic updates.</description>
        <topic label="Preferences - Automatic Updates" href="reference/ref-p2-autoupdate.htm"/>
     </context>
+    <context id="trust_dialog_context">
+       <description>This page allows you to review artifacts signatures and decide whethr to trust some of them and whether to complete installation</description>
+       <topic href="reference/ref-p2-trust.htm" label="Trusting signers"/>
+    </context>
 </contexts>
diff --git a/bundles/org.eclipse.platform.doc.user/reference/ref-p2-autoupdate.htm b/bundles/org.eclipse.platform.doc.user/reference/ref-p2-autoupdate.htm
index 65bc95e..bbebdea 100644
--- a/bundles/org.eclipse.platform.doc.user/reference/ref-p2-autoupdate.htm
+++ b/bundles/org.eclipse.platform.doc.user/reference/ref-p2-autoupdate.htm
@@ -71,7 +71,8 @@
 </TABLE>
 
 <h3 class="related">Related tasks</h3>
-<a href="../tasks/tasks-122.htm">Scheduling automatic updates</a>
+<a href="../tasks/tasks-120.htm">Updating the installation</a><br>
+<a href="../tasks/tasks-124.htm">Installing new software</a>
 
 <h3 class="related">Related reference</h3>
 <a href="ref-61.htm">Help Menu</a>
diff --git a/bundles/org.eclipse.platform.doc.user/reference/ref-p2-trust.htm b/bundles/org.eclipse.platform.doc.user/reference/ref-p2-trust.htm
new file mode 100644
index 0000000..cec6a85
--- /dev/null
+++ b/bundles/org.eclipse.platform.doc.user/reference/ref-p2-trust.htm
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Red Hat Inc. and others 2022. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script>
+<title>Trust</title>
+
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<H1 CLASS="Head">Trusting p2 installations</H1>
+
+<P CLASS="Intro">
+Installing artifacts is by nature a security risk as it will then allow the artifacts to
+execute potentially malicious code. To mitigate this risk, p2 does verify artifact <b>signatures</b>
+during installations and warns of any discrepancy.
+</P>
+
+<h2>Unsigned artifacts warning</h2>
+
+<p>If some artifacts have no digital signatures attached (using <code>jarsigner</code> or PGP signing technologies),
+the <em>Unsigned artifacts</em> dialog pops-up to warn that there is no signature for those artifacts.</p>
+<p>An artifact without a signature can easily be tampered so that the artifact being installed contains different content
+as what's expected during installation. So artifacts without signatures are a security thread and installating them
+is a risky action, much care should be taken before approving such installation.</p>
+<p>The pop-up allows to abort installation, or to take the risk of installing an installed artifact and continue installation.</p>
+
+<h2>Trust Dialog</h2>
+
+<p>One of the main goal of signatures is to match a signer identity to an artifact, so that in order to trust an artifact,
+a user can simply decide whether they trust the signer. It's usually an easier decision to take.</p>
+<p>Sometimes, all artifacts have a signature but the identity of the signer is not know whether it can be trusted or not.
+The strategy to decide whether a signer can be trusted or not is up to the user; different users can have different workflows to decide
+whether to trust a signer or not.</p>
+<p>In such case, the <em>Trust</em> dialog shows the list of certificates or PGP public keys along with extra information
+to let user define whether those can be trusted (Is the key itself trust? If yes, do I trust the signer?...).</p>
+<p>If all artifacts are signed by at least 1 trusted key or certificate, installation will continue; otherwise it's aborted.</p>
+
+<h2>Trust Preference Page</h2>
+
+<p><a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPreferencePage)")'>
+<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <strong>Install/Update &gt; Trust</strong></a> preference page
+lists all the PGP public keys that are considered as already trusted and allows to add or remove some.</p>
+
+<h3 class="related">Related tasks</h3>
+<a href="../tasks/tasks-120.htm">Updating the installation</a><br>
+<a href="../tasks/tasks-124.htm">Installing new software</a>
+
+<h3 class="related">Related reference</h3>
+<a href="ref-61.htm">Help Menu</a>
+</BODY>
+</HTML>
diff --git a/bundles/org.eclipse.platform.doc.user/tasks/tasks-120.htm b/bundles/org.eclipse.platform.doc.user/tasks/tasks-120.htm
index e6d25a4..7e5596e 100644
--- a/bundles/org.eclipse.platform.doc.user/tasks/tasks-120.htm
+++ b/bundles/org.eclipse.platform.doc.user/tasks/tasks-120.htm
@@ -57,6 +57,7 @@
 <a href="tasks-124.htm">Installing new software</a><br>
 <a href="tasks-123.htm">Reverting to a saved configuration</a><br>
 <a href="tasks-122.htm">Scheduling automatic updates</a>
+<a href="../reference/ref-p2-trust.htm">Trusting installation</a>
 
 </BODY>
 </HTML>
diff --git a/bundles/org.eclipse.platform.doc.user/tasks/tasks-128.htm b/bundles/org.eclipse.platform.doc.user/tasks/tasks-128.htm
index 8681e05..bc1fe0c 100644
--- a/bundles/org.eclipse.platform.doc.user/tasks/tasks-128.htm
+++ b/bundles/org.eclipse.platform.doc.user/tasks/tasks-128.htm
@@ -61,6 +61,7 @@
 <a href="tasks-127.htm">Adding a new software site</a><br>
 <a href="tasks-124.htm">Installing new software</a><br>
 <a href="tasks-122.htm">Scheduling automatic updates</a>
+<a href="../reference/ref-p2-trust.htm">Trusting installation</a>
 
 </BODY>
 </HTML>