-
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
Open
annamikhailovapsk
wants to merge
2
commits into
develop
Choose a base branch
from
feature/mddocs-en-folder
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,20 @@ | ||
| # Minimal makefile for Sphinx documentation | ||
| # | ||
|
|
||
| # You can set these variables from the command line, and also | ||
| # from the environment for the first two. | ||
| SPHINXOPTS ?= | ||
| SPHINXBUILD ?= sphinx-build | ||
| SOURCEDIR = . | ||
| BUILDDIR = _build | ||
|
|
||
| # Put it first so that "make" without argument is like "make help". | ||
| help: | ||
| @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| .PHONY: help Makefile | ||
|
|
||
| # Catch-all target: route all unknown targets to Sphinx using the new | ||
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| %: Makefile | ||
| @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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,30 @@ | ||
| # Architecture { #backend-architecture } | ||
|
|
||
| ```plantuml | ||
|
|
||
| @startuml | ||
| title Backend artitecture | ||
| skinparam linetype polyline | ||
| left to right direction | ||
|
|
||
| actor "User" | ||
|
|
||
| frame "Horizon" { | ||
| component "REST API" | ||
| database "Database" | ||
| } | ||
|
|
||
| component "LDAP" | ||
|
|
||
| [User] --> [REST API] | ||
| [REST API] --> [Database] | ||
| [REST API] ..> [LDAP] | ||
| @enduml | ||
| ``` | ||
|
|
||
| ```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,172 @@ | ||
| # 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 } | ||
|
|
||
| ```plantuml | ||
|
|
||
| @startuml | ||
| title CachedLDAPAuthProvider | ||
| participant "Client" | ||
| participant "Backend" | ||
| participant "LDAP" | ||
|
|
||
| == POST v1/auth/token == | ||
|
|
||
| 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" --[#green]> "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" -[#green]> "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" -[#green]> "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-[#red]> "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" -[#red]>x "LDAP" : Call bind(DN, password) | ||
| "Backend" x-[#red]> "Client" -- : 503 Service unavailable | ||
|
|
||
| else | ||
| note right of "Client" : Other cases are same as for LDAPAuthProvider,\nlike lookup, blocked/deleted users | ||
| end | ||
|
|
||
| == GET v1/namespaces == | ||
|
|
||
| alt Successful case | ||
| "Client" -> "Backend" ++ : access_token | ||
| "Backend" --> "Backend" : Validate token | ||
| "Backend" --> "Backend" : Check user in internal backend database | ||
| "Backend" -> "Backend" : Get data | ||
| "Backend" -[#green]> "Client" -- : Return data | ||
|
|
||
| else Token is expired | ||
| "Client" -> "Backend" ++ : access_token | ||
| "Backend" --> "Backend" : Validate token | ||
| "Backend" x-[#red]> "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-[#red]> "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-[#red]> "Client" -- : 404 Not found | ||
| end | ||
|
|
||
| deactivate "Client" | ||
| @enduml | ||
| ``` | ||
| <!-- | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Здесь и в dummy.md mermaid диаграмма закомментирована, в ldap.md нет |
||
| ```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) | ||
| "Backend" ->> "Backend" : Check user in internal backend database,\nusername = login | ||
| "Backend" ->> "Backend" : Create user if not exist | ||
| "Backend" ->> "Backend" : Save credentials to cache | ||
| else | ||
| "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 | ||
| else | ||
| "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 | ||
| else | ||
| "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) | ||
| 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 | ||
| else | ||
| "Client" ->> "Backend" : access_token | ||
| "Backend" ->> "Backend" : Validate token | ||
| else | ||
| "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 | ||
| end | ||
| deactivate "Client" | ||
| ``` --> | ||
|
|
||
| ## Configuration { #cached_ldap-configuration } | ||
|
|
||
| Other settings are just the same as for `LDAPAuthProvider` | ||
|
|
||
| ::: horizon.backend.settings.auth.cached_ldap.CachedLDAPAuthProviderSettings | ||
| <!-- :inherited-members: BaseModel --> | ||
|
|
||
| ::: 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 |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Пути должны быть вида
mkdocs/вместоmkdocs/en/