-
Notifications
You must be signed in to change notification settings - Fork 78
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
doc: adding flow diagrams for interactions #247
Open
gausnes
wants to merge
2
commits into
auth0:master
Choose a base branch
from
gausnes:docs/flows
base: master
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.
+138
−0
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 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,138 @@ | ||
# AD Server Interactions | ||
|
||
AD LDAP Connector helps facilitate proxied interactions to an LDAP server. The connector provides a set of | ||
APIs that mirrors the interactions with other connections e.g. Custom Database Connections. | ||
|
||
In the diagrams below the following names will be used to indicate the defined participants: | ||
|
||
- CIC: The environment of Okta CIC (Auth0) that is being interacted with | ||
- Connector: A running instance of the application defined in this repository | ||
- AD: An active directory implementation that is the backend for the Auth0 connection | ||
|
||
All three components act as servers, only the first two act as clients. | ||
|
||
## Boot | ||
|
||
### Client Instantiation | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Connector ->> AD : Create Connection | ||
Connector ->> AD : Bind Connection | ||
Note right of Connector: referred to as Client | ||
Connector ->> AD : Create Connection | ||
Note right of Connector: referred to as Binder | ||
``` | ||
|
||
### Health Check | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Connector ->> AD : Create Connection | ||
loop HealthCheck | ||
Connector ->> AD : Bind Connection | ||
Connector ->> AD : Search | ||
Connector ->> Connector : Update Health | ||
end | ||
``` | ||
|
||
## HTTP Server | ||
|
||
- Source: [endpoints.js](endpoints.js) | ||
- Handled by Password WindowsAuthentication implementation: | ||
- https://github.com/auth0/passport-windowsauth | ||
|
||
### Login | ||
|
||
- Endpoint: `/wsfed` | ||
|
||
### List Users | ||
|
||
- Endpoint: `/users` | ||
|
||
## Proxied Interactions | ||
|
||
- Source: [ws_validator.js](ws_validator.js) | ||
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. Same here. URL return 404 |
||
- Ingress: Websocket | ||
|
||
### Authenticate User | ||
|
||
- Event: `authenticate_user` | ||
```mermaid | ||
sequenceDiagram | ||
Auth0 ->> Connector : Authenticate User | ||
note right of Auth0 : Username, Password | ||
Connector ->> AD : Search with Client | ||
AD ->> Connector : User | ||
alt if user found | ||
Connector ->> AD : Bind with Binder | ||
alt not successful | ||
Connector ->> Auth0 : Error | ||
else | ||
alt if groups enabled | ||
Connector ->> Connector : Check Cache | ||
alt if cache empty | ||
Connector ->> AD : Search with Client | ||
AD ->> Connector : Groups | ||
end | ||
end | ||
Connector ->> Auth0 : User | ||
end | ||
end | ||
``` | ||
|
||
### Search Users | ||
|
||
- Event: `search_users` | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Auth0 ->> Connector : Search Users | ||
Connector ->> AD : Search with Client | ||
AD ->> Connector : Users | ||
alt if groups enabled | ||
Connector ->> Connector : Check Cache | ||
alt if cache empty | ||
Connector ->> AD : Search with Client | ||
AD ->> Connector : Groups | ||
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. Question: Should we also add |
||
end | ||
end | ||
``` | ||
|
||
### Change Password | ||
|
||
- Event: `change_password` | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Auth0 ->> Connector : Change Password | ||
note right of Auth0 : Username, Password | ||
Connector ->> AD : Search | ||
AD ->> Connector : Users | ||
alt if user found | ||
Connector ->> AD : Modify | ||
alt if groups enabled | ||
Connector ->> Connector : Check Cache | ||
alt if cache empty | ||
Connector ->> AD : Search with Client | ||
AD ->> Connector : Groups | ||
end | ||
end | ||
Connector ->> Connector : Create Profile | ||
Connector ->> Auth0 : User | ||
else | ||
Connector ->> Auth0 : Error | ||
end | ||
``` | ||
|
||
### List Groups | ||
|
||
- Event: `list_groups` | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Auth0 ->> Connector : List Groups | ||
Connector ->> AD : Search with Client | ||
AD ->> Connector : Groups | ||
Connector ->> Auth0 : Groups | ||
``` |
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.
URL returns 404