-
Notifications
You must be signed in to change notification settings - Fork 0
docs(mddocs): add en mddocs from docs_rework #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7b2de94
docs(mddocs): add en mddocs from docs_rework
c06ec6e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6e8f3f2
docs(mddocs): fix docs mistake
0a70ea9
Merge branch 'feature/mddocs-en-folder' of https://github.com/MTSWebS…
813adee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f155eb8
[DOP-28349] fix docs mistakes new
790a17b
Merge branch 'feature/mddocs-en-folder' of https://github.com/MTSWebS…
8571dc1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3aaa153
[DOP-28349] fix merge conflict
ba5d07c
Merge branch 'feature/mddocs-en-folder' of https://github.com/MTSWebS…
28c35b0
[DOP-28349] fix fix
3b2ae13
[DOP-28349] fix include
c9ec18e
[DOP-28349] fix docstring
6428b51
[DOP-28349] fix last
1bf9f29
[DOP-28349] delete conf.py
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| .logo { | ||
| width: 200px !important; | ||
| } | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Generated in CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "openapi": "3.1.0", | ||
| "version": "unknown", | ||
| "info": { | ||
| "title": "Generated in CI", | ||
| "version": "unknown" | ||
| }, | ||
| "paths": {} | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
|
|
||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>Horizon - ReDoc</title> | ||
| <!-- needed for adaptive design --> | ||
| <meta charset="utf-8"/> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
|
||
| <link rel="shortcut icon" href="../_static/icon.svg"> | ||
| <!-- | ||
| ReDoc doesn't change outer page styles | ||
| --> | ||
| <style> | ||
| body { | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <noscript> | ||
| ReDoc requires Javascript to function. Please enable it to browse the documentation. | ||
| </noscript> | ||
| <redoc spec-url="../_static/openapi.json"></redoc> | ||
| <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Generated in CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta | ||
| name="description" | ||
| content="SwaggerUI" | ||
| /> | ||
| <title>SwaggerUI</title> | ||
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.css" /> | ||
| <link rel="shortcut icon" href="../_static/icon.svg"> | ||
| </head> | ||
| <body> | ||
| <div id="swagger-ui"></div> | ||
| <script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.js" crossorigin></script> | ||
| <script> | ||
| window.onload = () => { | ||
| window.ui = SwaggerUIBundle({ | ||
| url: '../_static/openapi.json', | ||
| dom_id: '#swagger-ui', | ||
| }); | ||
| }; | ||
| </script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Architecture { #backend-architecture } | ||
|
|
||
| ```mermaid | ||
| stateDiagram-v2 | ||
| [User] --> [RESTAPI] | ||
| [RESTAPI] --> [Database] | ||
| [RESTAPI] --> [LDAP] | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| # LDAP Cached Auth provider { #backend-auth-ldap-cached } | ||
|
|
||
| ## Description { #cached_ldap-description } | ||
|
|
||
| Same as [LDAP Auth provider][backend-auth-ldap-cached], but if LDAP request for checking user credentials was successful, | ||
| credentials are stored in local cache (table in internal database, in form `login` + `hash(password)` + `update timestamp`). | ||
|
|
||
| Next auth requests for the same login are performed against this cache **first**. LDAP requests are send *only* if cache have been expired. | ||
|
|
||
| This allows to: | ||
|
|
||
| - Bypass errors with LDAP availability, e.g. network errors | ||
| - Reduce number of requests made to LDAP. | ||
|
|
||
| Downsides: | ||
|
|
||
| - If user changed password, and cache is not expired yet, user may still log in with old credentials. | ||
| - Same if user was blocked in LDAP. | ||
|
|
||
| ## Interaction schema { #cached_ldap-interaction-schema } | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| participant "Client" | ||
| participant "Backend" | ||
| participant "LDAP" | ||
|
|
||
| activate "Client" | ||
| alt First time auth | Empty cache | Cache expired | ||
| "Client" ->> "Backend" : login + password | ||
| "Backend" ->> "Backend" : Search for credentials cache by login | ||
| "Backend" ->> "Backend" : No items found or item expired, using LDAP | ||
| "Backend" ->> "Backend" : DN = bind_dn_template(login) | ||
| "Backend" ->> "LDAP" : Call bind(DN, password) | ||
| "LDAP" ->> "Backend" : Successful | ||
| "Backend" ->> "Backend" : Check user in internal backend database,\nusername = login | ||
| "Backend" ->> "Backend" : Create user if not exist | ||
| "Backend" ->> "Backend" : Save credentials to cache | ||
| "Backend" ->> "Client" : Generate and return access_token | ||
|
|
||
| else Using cache, LDAP is totally ignored | ||
| "Client" ->> "Backend" : login + password | ||
| "Backend" ->> "Backend" : Search for credentials cache by login | ||
| "Backend" ->> "Backend" : Found credentials, check for expiration | ||
| "Backend" ->> "Backend" : Not expired, validate password is matching hash | ||
| "Backend" ->> "Backend" : Password match, not calling LDAP | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" ->> "Backend" : Create user if not exist | ||
| "Backend" ->> "Client" : Generate and return access_token | ||
|
|
||
| else Password mismatch with cache, LDAP is totally ignored | ||
| "Client" ->> "Backend" : login + password | ||
| "Backend" ->> "Backend" : Search for credentials cache by login | ||
| "Backend" ->> "Backend" : Found credentials, check for expiration | ||
| "Backend" ->> "Backend" : Not expired, validate password is matching hash | ||
| "Backend" ->> "Backend" : Password do not match local cache | ||
| "Backend" --x "Client" : 401 Unauthorized | ||
|
|
||
| else No cache or cache expired, LDAP is unavailable | ||
| "Client" ->> "Backend" : login + password | ||
| "Backend" ->> "Backend" : Search for credentials cache by login | ||
| "Backend" ->> "Backend" : No items found or item expired, using LDAP | ||
| "Backend" ->> "Backend" : DN = bind_dn_template(login) | ||
| "Backend" --x "LDAP" : Call bind(DN, password) | ||
| "Backend" --x "Client" : 503 Service unavailable | ||
|
|
||
| else | ||
| Note right of "Client" : Other cases are same as for LDAPAuthProvider,\nlike lookup, blocked/deleted users | ||
| end | ||
|
|
||
| alt Successful case | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" ->> "Backend" : Get data | ||
| "Backend" ->> "Client" : Return data | ||
|
|
||
| else Token is expired | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| "Backend" --x "Client" : 401 Unauthorized | ||
|
|
||
| else User is blocked | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" --x "Client" : 401 Unauthorized | ||
|
|
||
| else User is deleted | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" --x "Client" : 404 Not found | ||
| end | ||
|
|
||
| deactivate "Client" | ||
| ``` | ||
|
|
||
| ## Configuration { #cached_ldap-configuration } | ||
|
|
||
| Other settings are just the same as for `LDAPAuthProvider` | ||
|
|
||
| ::: horizon.backend.settings.auth.cached_ldap.CachedLDAPAuthProviderSettings | ||
|
|
||
| ::: horizon.backend.settings.auth.cached_ldap.LDAPCacheSettings | ||
|
|
||
| ::: horizon.backend.settings.auth.cached_ldap.LDAPCachePasswordHashSettings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Custom Auth provider { #backend-auth-custom } | ||
|
|
||
| You can implement custom auth provider by inheriting from class below and implementing necessary methods. | ||
|
|
||
| ::: horizon.backend.providers.auth.AuthProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Dummy Auth provider { #backend-auth-dummy } | ||
|
|
||
| ## Description { #dummy-description } | ||
|
|
||
| This auth provider allows to sign-in with any username and password, and and then issues an access token. | ||
|
|
||
| After successful auth, username is saved to backend database. It is then used for creating audit records for any object change, see `changed_by` field. | ||
|
|
||
| ## Interaction schema { #dummy-interaction-schema } | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| participant "Client" | ||
| participant "Backend" | ||
|
|
||
| activate "Client" | ||
| alt Successful case | ||
| "Client" ->> "Backend" : login + password | ||
| "Backend" ->> "Backend" : Password is completely ignored | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" ->> "Backend" : Create user if not exist | ||
| "Backend" ->> "Client" : Generate and return access_token | ||
|
|
||
| else User is blocked | ||
| "Client" ->> "Backend" : login + password | ||
| "Backend" ->> "Backend" : Password is completely ignored | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" --x "Client" : 401 Unauthorized | ||
|
|
||
| else User is deleted | ||
| "Client" ->> "Backend" : login + password | ||
| "Backend" ->> "Backend" : Password is completely ignored | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" --x "Client" : 404 Not found | ||
| end | ||
|
|
||
| alt Successful case | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" ->> "Backend" : Get data | ||
| "Backend" ->> "Client" : Return data | ||
|
|
||
| else Token is expired | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| "Backend" --x "Client" : 401 Unauthorized | ||
|
|
||
| else User is blocked | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
|
|
||
| else | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| "Backend" ->> "Backend" : Check user in internal backend database | ||
| "Backend" --x "Client" : 404 Not found | ||
| end | ||
|
|
||
| deactivate "Client" | ||
| ``` | ||
|
|
||
| ## Configuration { #dummy-configuration } | ||
|
|
||
| ::: horizon.backend.settings.auth.dummy.DummyAuthProviderSettings | ||
|
|
||
| ::: horizon.backend.settings.auth.jwt.JWTSettings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Auth Providers { #backend-auth-providers } | ||
|
|
||
| Horizon supports different auth provider implementations. You can change implementation via settings: | ||
|
|
||
| ::: horizon.backend.settings.auth.AuthSettings | ||
|
|
||
| ## Auth providers | ||
|
|
||
| * [Dummy Auth provider][backend-auth-dummy] | ||
| * [Description][dummy-description] | ||
| * [Interaction schema][dummy-interaction-schema] | ||
| * [Configuration][dummy-configuration] | ||
| * [LDAP Auth provider][backend-auth-ldap] | ||
| * [Description][ldap-description] | ||
| * [Strategies][ldap-strategies] | ||
| * [Interaction schema][ldap-interaction-schema] | ||
| * [Basic configuration][ldap-basic-configuration] | ||
| * [Lookup-related configuration][ldap-lookup-related-configuration] | ||
| * [LDAP Cached Auth provider][backend-auth-ldap-cached] | ||
| * [Description][cached_ldap-description] | ||
| * [Interaction schema][cached_ldap-interaction-schema] | ||
| * [Configuration][cached_ldap-configuration] | ||
|
|
||
| ## For developers | ||
|
|
||
| * [Custom Auth provider][backend-auth-custom] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.