Fixed reported issue #33.

This commit is contained in:
trovier 2022-10-13 15:15:15 +03:00
parent 01e3a05924
commit 1de5d9a672
2 changed files with 47 additions and 40 deletions

View File

@ -188,7 +188,9 @@
<p>Once the plugin is installed, the plugin settings page will be opened. Alternatively, you can find <b>ONLYOFFICE document</b> on the <b>Plugins overview</b> page and click <b>Settings</b>. On the <b>Settings</b> page, you can configure the following parameters:</p>
<ul>
<li>Enter the address that is used to access Document Editing Service from Moodle into the <b>Document Editing Service address</b> field. This field is obligatory.</li>
<li>Optionally, specify the secret used to sign the data in the <b>Document Server Secret</b> field. The secret key is used to validate the JSON web token upon the request to Document Server. To learn more, check the <a href="https://api.onlyoffice.com/editors/signature/" target="_blank"><b>API documentation</b></a> for configuring JWT on the ONLYOFFICE Docs side.</li>
<li>Optionally, specify the secret used to sign the data in the <b>Document Server Secret</b> field. The secret key is used to validate the JSON web token upon the request to Document Server. To learn more, check the <a href="https://api.onlyoffice.com/editors/signature/" target="_blank"><b>API documentation</b></a> for configuring JWT on the ONLYOFFICE Docs side.
<div class="notehelp">Starting from ONLYOFFICE Docs <b>v7.2</b>, JWT is enabled by default and the secret key is generated automatically. You need to enable it on the Moodle side as well: find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings. For more details, see the <a href="<%=VirtualPathUtility.ToAbsolute("~/integration/gettingstarted-moodle.aspx#JWT_block")%>">Enabling JWT for the ONLYOFFICE and Moodle integration</a> section of this article.</div>
</li>
<li><b>Enable Force Save</b> - when this option is disabled, your changes are saved to the editors cache automatically. When this option is enabled, all changes to a document are sent to the storage directly when you click the <b>Save</b> button.</li>
<li>Optionally, specify the editor customization settings by checking the necessary boxes:
<ul>
@ -212,29 +214,16 @@
<div class="gs_content gs_submenu" id="JWT_block">
<h3>Enabling JWT for the ONLYOFFICE and Moodle integration</h3>
<p>To protect documents from unauthorized access, ONLYOFFICE editors use the JSON Web Token (JWT). The <b>token</b> is added in the configuration when the Document Editor is initialized and during the exchange of commands between inner ONLYOFFICE Docs services. The <b>secret key</b> is used to sign the JSON web token and validate the token upon the request to ONLYOFFICE Docs.</p>
<p>To protect your documents, you need to enable the token validation and specify your own secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings.</p>
<p><b>Step 1</b>: Configure ONLYOFFICE Docs</p>
<p>Starting from ONLYOFFICE Docs <b>v7.2</b>, JWT is enabled by default and the secret key is generated automatically. You need to find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings.</p>
<p><b>Step 1</b>: Find your secret key in the ONLYOFFICE Docs configuration file</p>
<ol>
<li>Open the local.json file with any available text editor.
<ul>
<li>For Linux - <code>/etc/onlyoffice/documentserver/local.json</code></li>
<li>For Windows - <code>%ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json</code></li>
<li>For Docker - enter the ONLYOFFICE Docs container using the <code>docker exec -it &lt;containerID&gt; bash</code> command and open <code>/etc/onlyoffice/documentserver/local.json</code></li>
</ul>
</li>
<li>Enable token validation by changing the <code>false</code> value to <code>true</code> in three sections:
<ul>
<li><code>services.CoAuthoring.token.enable.browser</code></li>
<li><code>services.CoAuthoring.token.enable.request.inbox</code></li>
<li><code>services.CoAuthoring.token.enable.request.outbox</code></li>
</ul>
</li>
<li>Specify your own secret key by replacing the secret value with your own text string in three sections. The secret key must be the same.
<ul>
<li><code>services.CoAuthoring.secret.inbox.string</code></li>
<li><code>services.CoAuthoring.secret.outbox.string</code></li>
<li><code>services.CoAuthoring.secret.session.string</code></li>
<li>For Docker enter the ONLYOFFICE Docs container using the <code>docker exec -it &lt;containerID&gt; bash</code> command and open <code>/etc/onlyoffice/documentserver/local.json</code>
</ul>
<p>The local.json file should look like this:</p>
<pre><code>{
"services": {
"CoAuthoring": {
@ -263,8 +252,21 @@
}
</code></pre>
</li>
<li>Save your changes.</li>
<li>Restart the services for the config changes to take effect.
<li>The <code>true</code> value is specified in three sections. It means that token validation is enabled.
<ul>
<li><code>services.CoAuthoring.token.enable.browser</code></li>
<li><code>services.CoAuthoring.token.enable.request.inbox</code></li>
<li><code>services.CoAuthoring.token.enable.request.outbox</code></li>
</ul>
</li>
<li>The automatically generated secret key is specified in three sections. You can replace the default secret value with your own secret key. The secret key must be the same in three sections.
<ul>
<li><code>services.CoAuthoring.secret.inbox.string</code></li>
<li><code>services.CoAuthoring.secret.outbox.string</code></li>
<li><code>services.CoAuthoring.secret.session.string</code></li>
</ul>
</li>
<li>If you make changes, save them and restart the services for the config changes to take effect.
<pre><code>supervisorctl restart all</code></pre>
</li>
</ol>

View File

@ -188,7 +188,9 @@
<p>Sobald das Plugin installiert ist, wird die Seite mit den Plugin-Einstellungen geöffnet. Alternativ finden Sie das <b>ONLYOFFICE document</b> auf der Seite <b>Plugins overview</b> und klicken auf <b>Settings</b>. Auf der Seite <b>Settings</b> können Sie die folgenden Parameter konfigurieren:</p>
<ul>
<li>Geben Sie in das Feld <b>Document Editing Service address</b> die Adresse ein, die für den Zugriff auf das Document Editing Service von Moodle verwendet wird. Dieses Feld ist obligatorisch.</li>
<li>Geben Sie optional das zum Signieren der Daten verwendete Geheimnis im Feld <b>Document Server Secret</b> an. Der geheime Schlüssel wird verwendet, um das JSON-Web-Token bei der Anforderung an Document Server zu validieren. Weitere Informationen finden Sie in der <a href="https://api.onlyoffice.com/editors/signature/" target="_blank"><b>API-Dokumentation</b></a> zur Konfiguration von JWT auf dem ONLYOFFICE Docs-Seite.</li>
<li>Geben Sie optional das zum Signieren der Daten verwendete Geheimnis im Feld <b>Document Server Secret</b> an. Der geheime Schlüssel wird verwendet, um das JSON-Web-Token bei der Anforderung an Document Server zu validieren. Weitere Informationen finden Sie in der <a href="https://api.onlyoffice.com/editors/signature/" target="_blank"><b>API-Dokumentation</b></a> zur Konfiguration von JWT auf dem ONLYOFFICE Docs-Seite.
<div class="notehelp">Ab ONLYOFFICE Docs <b>v7.2</b> ist JWT standardmäßig aktiviert und der geheime Schlüssel wird automatisch generiert. Sie müssen es auch auf der Moodle-Seite aktivieren: Suchen Sie Ihren geheimen Schlüssel in der ONLYOFFICE Docs-Konfigurationsdatei und geben Sie dann denselben geheimen Schlüssel in den Konnektor-Einstellungen an. Weitere Einzelheiten finden Sie im Abschnitt <a href="<%=VirtualPathUtility.ToAbsolute("~/integration/gettingstarted-moodle.aspx#JWT_block")%>">Aktivieren von JWT für die ONLYOFFICE- und Moodle-Integration</a> in diesem Artikel.</div>
</li>
<li><b>Enable Force Save</b> - wenn diese Option deaktiviert ist, werden Ihre Änderungen automatisch im Editor-Cache gespeichert. Wenn diese Option aktiviert ist, werden alle Änderungen an einem Dokument direkt an den Speicher gesendet, wenn Sie auf die Schaltfläche <b>Save</b> klicken.</li>
<li>Geben Sie optional die Anpassungseinstellungen des Editors an, indem Sie die erforderlichen Kontrollkästchen aktivieren:
<ul>
@ -212,29 +214,16 @@
<div class="gs_content gs_submenu" id="JWT_block">
<h3>Aktivieren von JWT für die ONLYOFFICE- und Moodle-Integration</h3>
<p>Um Dokumente vor unbefugtem Zugriff zu schützen, verwenden ONLYOFFICE-Editoren das JSON Web Token (JWT). Das <b>Token</b> wird in der Konfiguration hinzugefügt, wenn der Dokumenteneditor initialisiert wird und während des Austauschs von Befehlen zwischen internen ONLYOFFICE Docs-Diensten. Der <b>geheime Schlüssel</b> wird verwendet, um das JSON-Web-Token zu signieren und das Token auf Anfrage an ONLYOFFICE Docs zu validieren.</p>
<p>Um Ihre Dokumente zu schützen, müssen Sie die Token-Validierung aktivieren und Ihren eigenen geheimen Schlüssel in der ONLYOFFICE Docs-Konfigurationsdatei angeben und dann denselben geheimen Schlüssel in den Konnektor-Einstellungen angeben.</p>
<p><b>Schritt 1</b>: ONLYOFFICE Docs konfigurieren</p>
<p>Ab ONLYOFFICE Docs <b>v7.2</b> ist JWT standardmäßig aktiviert und der geheime Schlüssel wird automatisch generiert. Sie müssen Ihren geheimen Schlüssel in der ONLYOFFICE Docs-Konfigurationsdatei finden und dann denselben geheimen Schlüssel in den Konnektor-Einstellungen angeben.</p>
<p><b>Schritt 1</b>: Ihren geheimen Schlüssel in der Konfigurationsdatei von ONLYOFFICE Docs finden</p>
<ol>
<li>Öffnen Sie die Datei local.json mit einem beliebigen verfügbaren Texteditor.
<ul>
<li>Für Linux - <code>/etc/onlyoffice/documentserver/local.json</code></li>
<li>Für Windows - <code>%ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json</code></li>
<li>Für Docker öffnen Sie den ONLYOFFICE Docs-Container mit dem Befehl <code>docker exec -it &lt;containerID&gt; bash</code> und öffnen Sie <code>/etc/onlyoffice/documentserver/local.json</code></li>
</ul>
</li>
<li>Aktivieren Sie die Token-Validierung, indem Sie den Wert <code>false</code> in drei Abschnitten in <code>true</code> ändern:
<ul>
<li><code>services.CoAuthoring.token.enable.browser</code></li>
<li><code>services.CoAuthoring.token.enable.request.inbox</code></li>
<li><code>services.CoAuthoring.token.enable.request.outbox</code></li>
</ul>
</li>
<li>Geben Sie Ihren eigenen geheimen Schlüssel an, indem Sie den geheimen Wert in drei Abschnitten durch Ihre eigene Textzeichenfolge ersetzen. Der geheime Schlüssel muss derselbe sein.
<ul>
<li><code>services.CoAuthoring.secret.inbox.string</code></li>
<li><code>services.CoAuthoring.secret.outbox.string</code></li>
<li><code>services.CoAuthoring.secret.session.string</code></li>
<li>Für Docker öffnen Sie den ONLYOFFICE Docs-Kontainer mit dem Befehl <code>docker exec -it &lt;containerID&gt; bash</code> und öffnen Sie <code>/etc/onlyoffice/documentserver/local.json</code>
</ul>
<p>Die local.json-Datei sollte wie folgt aussehen:</p>
<pre><code>{
"services": {
"CoAuthoring": {
@ -263,8 +252,21 @@
}
</code></pre>
</li>
<li>Speichern Sie Ihre Änderungen.</li>
<li>Starten Sie die Dienste neu, damit die Konfigurationsänderungen aktualisiert werden.
<li>Der Wert <code>true</code> wird in drei Abschnitten angegeben. Dies bedeutet, dass die Token-Validierung aktiviert ist.
<ul>
<li><code>services.CoAuthoring.token.enable.browser</code></li>
<li><code>services.CoAuthoring.token.enable.request.inbox</code></li>
<li><code>services.CoAuthoring.token.enable.request.outbox</code></li>
</ul>
</li>
<li>Der automatisch generierte geheime Schlüssel wird in drei Abschnitten angegeben. Sie können den standardmäßigen geheimen Wert durch Ihren eigenen geheimen Schlüssel ersetzen. Der geheime Schlüssel muss in drei Abschnitten gleich sein.
<ul>
<li><code>services.CoAuthoring.secret.inbox.string</code></li>
<li><code>services.CoAuthoring.secret.outbox.string</code></li>
<li><code>services.CoAuthoring.secret.session.string</code></li>
</ul>
</li>
<li>Wenn Sie Änderungen vornehmen, speichern Sie diese Änderungen und starten Sie die Dienste neu, damit die Konfigurationsänderungen aktualisiert werden.
<pre><code>supervisorctl restart all</code></pre>
</li>
</ol>
@ -361,6 +363,9 @@
<img alt="ONLYOFFICE_editfile" id="ONLYOFFICE_editfile_9" class="bigphoto_screen" src="<%=VirtualPathUtility.ToAbsolute("~/images/help/GettingStarted/Integration/Moodle/big/permissions.png")%>" />
<div target="ONLYOFFICE_editfile_9" class="screenphoto magnifier"></div>
</div>
<hr />
<p>Um zu erfahren, wie Sie das Dokument direkt im Editor als Favorit markieren, befolgen Sie bitte die Anweisungen in <a href="https://helpcenter.onlyoffice.com/userguides/groups-gettingstarted-documents.aspx">diesem Artikel</a>.</p>
</div>
</div>
</div>