1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00
This commit is contained in:
Alberto Ricart
2019-05-20 17:51:27 -05:00
parent a1c12370c2
commit 5da9b66f5e
133 changed files with 246 additions and 249 deletions

View File

@@ -1857,8 +1857,8 @@
<section class="normal markdown-section">
<h1 id="token-authentication">Token Authentication</h1>
<p>Token authentication is a string that if provided by a client, allows it to connect. It is the simplest authentication provided by the NATS server. </p>
<p>To use token authentication, you can just specify an <code>authorization</code> section with the <code>token</code> property set:</p>
<p>Token authentication is a string that if provided by a client, allows it to connect. It is the most straightforward authentication provided by the NATS server. </p>
<p>To use token authentication, you can specify an <code>authorization</code> section with the <code>token</code> property set:</p>
<pre class="language-"><code>authorization {
token: &quot;s3cr3t&quot;
}
@@ -1869,7 +1869,7 @@
<pre class="language-"><code>&gt; nats-sub -s nats://s3cr3t@localhost:4222 &quot;&gt;&quot;
Listening on [&gt;]
</code></pre><h2 id="bcrypted-tokens">Bcrypted Tokens</h2>
<p>Tokens can be bcrypted enabling an additional layer of security, as the clear-text version of the token would not be persisted on server configuration file.</p>
<p>Tokens can be bcrypted enabling an additional layer of security, as the clear-text version of the token would not be persisted on the server configuration file.</p>
<p>You can generate bcrypted tokens and passwords using the <a href="../nats_tools/mkpasswd.html"><code>mkpasswd</code></a> tool:</p>
<pre class="language-"><code>&gt; mkpasswd
pass: dag0HTXl4RGg7dXdaJwbC8
@@ -1924,7 +1924,7 @@ Listening on [&gt;]
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Tokens","level":"2.5.1.2.1","depth":4,"next":{"title":"Username/Password","level":"2.5.1.2.2","depth":4,"path":"nats_server/username_password.md","ref":"nats_server/username_password.md","articles":[]},"previous":{"title":"Authentication","level":"2.5.1.2","depth":3,"path":"nats_server/auth_intro.md","ref":"nats_server/auth_intro.md","articles":[{"title":"Tokens","level":"2.5.1.2.1","depth":4,"path":"nats_server/tokens.md","ref":"nats_server/tokens.md","articles":[]},{"title":"Username/Password","level":"2.5.1.2.2","depth":4,"path":"nats_server/username_password.md","ref":"nats_server/username_password.md","articles":[]},{"title":"TLS Authentication","level":"2.5.1.2.3","depth":4,"path":"nats_server/tls_mutual_auth.md","ref":"nats_server/tls_mutual_auth.md","articles":[]},{"title":"NKeys","level":"2.5.1.2.4","depth":4,"path":"nats_server/nkey_auth.md","ref":"nats_server/nkey_auth.md","articles":[]},{"title":"Accounts","level":"2.5.1.2.5","depth":4,"path":"nats_server/jwt_auth.md","ref":"nats_server/jwt_auth.md","articles":[]},{"title":"Authentication Timeout","level":"2.5.1.2.6","depth":4,"path":"nats_server/auth_timeout.md","ref":"nats_server/auth_timeout.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["prism","-highlight","include-html","toggle-chapters"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"include-html":{},"toggle-chapters":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"nats_server/tokens.md","mtime":"2019-05-20T13:46:24.886Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-20T22:00:46.477Z"},"basePath":"..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Tokens","level":"2.5.1.2.1","depth":4,"next":{"title":"Username/Password","level":"2.5.1.2.2","depth":4,"path":"nats_server/username_password.md","ref":"nats_server/username_password.md","articles":[]},"previous":{"title":"Authentication","level":"2.5.1.2","depth":3,"path":"nats_server/auth_intro.md","ref":"nats_server/auth_intro.md","articles":[{"title":"Tokens","level":"2.5.1.2.1","depth":4,"path":"nats_server/tokens.md","ref":"nats_server/tokens.md","articles":[]},{"title":"Username/Password","level":"2.5.1.2.2","depth":4,"path":"nats_server/username_password.md","ref":"nats_server/username_password.md","articles":[]},{"title":"TLS Authentication","level":"2.5.1.2.3","depth":4,"path":"nats_server/tls_mutual_auth.md","ref":"nats_server/tls_mutual_auth.md","articles":[]},{"title":"NKeys","level":"2.5.1.2.4","depth":4,"path":"nats_server/nkey_auth.md","ref":"nats_server/nkey_auth.md","articles":[]},{"title":"Accounts","level":"2.5.1.2.5","depth":4,"path":"nats_server/jwt_auth.md","ref":"nats_server/jwt_auth.md","articles":[]},{"title":"Authentication Timeout","level":"2.5.1.2.6","depth":4,"path":"nats_server/auth_timeout.md","ref":"nats_server/auth_timeout.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["prism","-highlight","include-html","toggle-chapters"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"include-html":{},"toggle-chapters":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"nats_server/tokens.md","mtime":"2019-05-20T22:47:43.236Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-20T22:49:57.562Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>