Skip to content

Commit

Permalink
Avoid Internal Server Error when tampered directly
Browse files Browse the repository at this point in the history
Update references in authentication.md
  • Loading branch information
dormant-user committed Jan 27, 2024
1 parent 48ae13f commit bb1cf5c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 9 deletions.
11 changes: 9 additions & 2 deletions authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
a `session_token` generated by the server to access directories and streaming content.

### Username and Password

> [Signature Authentication][signature-authentication]
#### Frontend
- UI creates hex values for username and password using native JS
- These hex values are then used the calculate the hash
Expand All @@ -17,7 +17,7 @@ a `session_token` generated by the server to access directories and streaming co
- These signatures are then compared for authentication purpose

### Session Token

> [Symmetric Encryption][symmetric-encryption]
- Once the login has been successful, the API creates a randomly generated 64 bit url safe token
- This token is stored as unique key for each user
- The API then forms a payload with the username, key, and the timestamp
Expand All @@ -30,3 +30,10 @@ a `session_token` generated by the server to access directories and streaming co
> so the username and password are lost in the frontend at this point
- From then on, all calls to the backend including redirects, directory navigation and, streaming will carry the cookie
- The `session_token` is the only form of authentication from this point onward

### References
- [symmetric-encryption]
- [signature-authentication]

[symmetric-encryption]: https://cryptography.io/en/latest/fernet/
[signature-authentication]: https://developers.expediagroup.com/docs/products/rapid/resources/reference/signature-authentication
11 changes: 9 additions & 2 deletions docs/_sources/authentication.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
a `session_token` generated by the server to access directories and streaming content.

### Username and Password

> [Signature Authentication][signature-authentication]
#### Frontend
- UI creates hex values for username and password using native JS
- These hex values are then used the calculate the hash
Expand All @@ -17,7 +17,7 @@ a `session_token` generated by the server to access directories and streaming co
- These signatures are then compared for authentication purpose

### Session Token

> [Symmetric Encryption][symmetric-encryption]
- Once the login has been successful, the API creates a randomly generated 64 bit url safe token
- This token is stored as unique key for each user
- The API then forms a payload with the username, key, and the timestamp
Expand All @@ -30,3 +30,10 @@ a `session_token` generated by the server to access directories and streaming co
> so the username and password are lost in the frontend at this point
- From then on, all calls to the backend including redirects, directory navigation and, streaming will carry the cookie
- The `session_token` is the only form of authentication from this point onward

### References
- [symmetric-encryption]
- [signature-authentication]

[symmetric-encryption]: https://cryptography.io/en/latest/fernet/
[signature-authentication]: https://developers.expediagroup.com/docs/products/rapid/resources/reference/signature-authentication
14 changes: 14 additions & 0 deletions docs/authentication.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ <h1>Authentication<a class="headerlink" href="#authentication" title="Permalink
a <code class="docutils literal notranslate"><span class="pre">session_token</span></code> generated by the server to access directories and streaming content.</p>
<section id="username-and-password">
<h2>Username and Password<a class="headerlink" href="#username-and-password" title="Permalink to this heading"></a></h2>
<blockquote>
<div><p><a class="reference external" href="https://developers.expediagroup.com/docs/products/rapid/resources/reference/signature-authentication">Signature Authentication</a></p>
</div></blockquote>
<section id="frontend">
<h3>Frontend<a class="headerlink" href="#frontend" title="Permalink to this heading"></a></h3>
<ul class="simple">
Expand All @@ -69,6 +72,9 @@ <h3>Backend<a class="headerlink" href="#backend" title="Permalink to this headin
</section>
<section id="session-token">
<h2>Session Token<a class="headerlink" href="#session-token" title="Permalink to this heading"></a></h2>
<blockquote>
<div><p><a class="reference external" href="https://cryptography.io/en/latest/fernet/">Symmetric Encryption</a></p>
</div></blockquote>
<ul class="simple">
<li><p>Once the login has been successful, the API creates a randomly generated 64 bit url safe token</p></li>
<li><p>This token is stored as unique key for each user</p></li>
Expand All @@ -92,6 +98,13 @@ <h2>Session Token<a class="headerlink" href="#session-token" title="Permalink to
<li><p>The <code class="docutils literal notranslate"><span class="pre">session_token</span></code> is the only form of authentication from this point onward</p></li>
</ul>
</section>
<section id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p><a class="reference external" href="https://cryptography.io/en/latest/fernet/">symmetric-encryption</a></p></li>
<li><p><a class="reference external" href="https://developers.expediagroup.com/docs/products/rapid/resources/reference/signature-authentication">signature-authentication</a></p></li>
</ul>
</section>
</section>


Expand All @@ -111,6 +124,7 @@ <h3><a href="index.html">Table of Contents</a></h3>
</ul>
</li>
<li><a class="reference internal" href="#session-token">Session Token</a></li>
<li><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
</ul>
Expand Down
11 changes: 9 additions & 2 deletions docs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
a `session_token` generated by the server to access directories and streaming content.

### Username and Password

> [Signature Authentication][signature-authentication]
#### Frontend
- UI creates hex values for username and password using native JS
- These hex values are then used the calculate the hash
Expand All @@ -17,7 +17,7 @@ a `session_token` generated by the server to access directories and streaming co
- These signatures are then compared for authentication purpose

### Session Token

> [Symmetric Encryption][symmetric-encryption]
- Once the login has been successful, the API creates a randomly generated 64 bit url safe token
- This token is stored as unique key for each user
- The API then forms a payload with the username, key, and the timestamp
Expand All @@ -30,3 +30,10 @@ a `session_token` generated by the server to access directories and streaming co
> so the username and password are lost in the frontend at this point
- From then on, all calls to the backend including redirects, directory navigation and, streaming will carry the cookie
- The `session_token` is the only form of authentication from this point onward

### References
- [symmetric-encryption]
- [signature-authentication]

[symmetric-encryption]: https://cryptography.io/en/latest/fernet/
[signature-authentication]: https://developers.expediagroup.com/docs/products/rapid/resources/reference/signature-authentication
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ <h1>Stream-Localhost - A secured interface to stream videos<a class="headerlink"
<li class="toctree-l1"><a class="reference internal" href="authentication.html">Authentication</a><ul>
<li class="toctree-l2"><a class="reference internal" href="authentication.html#username-and-password">Username and Password</a></li>
<li class="toctree-l2"><a class="reference internal" href="authentication.html#session-token">Session Token</a></li>
<li class="toctree-l2"><a class="reference internal" href="authentication.html#references">References</a></li>
</ul>
</li>
</ul>
Expand Down
Loading

0 comments on commit bb1cf5c

Please sign in to comment.