You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NOTES.md
+53-49Lines changed: 53 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -1,43 +1,47 @@
1
1
# Terminology
2
-
- Assset: this Django app, an asset refers to any resourthce or content that can be accessed and read via the internet. An asset is characterized by its accessibility through a unique link or identifier, allowing it to be easily retrieved or viewed by users of the app. The document can be viewed directly in the browser and/or using a client tool. Assets are highly versatile and can encompass a wide range of items, including but not limited to: Google Docs, web pages, Miro Diagrams, Google Slides, Microsoft Powerpoint slides.
2
+
TODO: Make less passive and less verbose
3
+
- Asset: any resource or content that can be accessed and read via the internet. An asset is characterized by its accessibility through a unique link or identifier, allowing it to be easily retrieved or viewed by users of the app. The asset can be viewed directly in the browser and/or using a client tool. Assets are highly versatile and can encompass a wide range of items, including but not limited to: Google Docs, web pages, Miro Diagrams, Google Slides, Microsoft Powerpoint slides.
3
4
4
5
5
6
# Knowledgebase App Overview
7
+
6
8
The Knowledgebase App helps Hack for LA
7
-
- maintain it's assets and related information. See data_values.md for details and examples for the catalog and categorization
9
+
- maintain it's assets and related information. See [data_values.md](docs/design/data_values.md) for details and examples of topic areas, asset groups, and other related information.
8
10
- managing draft, in review, and completed versions of an asset
9
11
- filtering:
10
-
- filter by assets based on related information
12
+
- filter by assets based on related information such as topic area, asset groups, and other related information
11
13
- identifying a primary asset in an asset group for purposes of filtering
12
14
- Identifying a primary asset in a topic area for purposes of filtering
13
15
- Google doc to web page conversion
14
16
- Convert google doc to HTML
15
17
- Add a section to the HTML that lists contributors and details
18
+
- Manage authorization of Knowledgebase users
19
+
20
+
## Related information
16
21
17
-
**Related information**:
22
+
For more details see [data_values.md](docs/design/data_values.md).
18
23
19
24
Related information that is maintained in the Knowledge base app:
20
25
- topic area
21
26
- asset group
22
27
- asset category
23
28
- asset type
24
29
25
-
Related information that is maintained in
30
+
Related information that is maintained in People Depot:
26
31
- practice area
27
32
- technology
28
33
- contributors
29
34
30
-
Other capability
31
-
- Provide authorization to manage Knowledgebase users
32
-
33
35
# API Overview
34
-
The API should allow for:
35
-
- gettiing asset contributor, practice area, technology, topic area, asset type, asset category, and asset group
36
-
- filtering assets by contributor, practice area, technology, topic area, asset type, asset category, and asset group
37
-
- filtering by primary asset for an asset group
38
-
- filtering by topic area for an asset group
39
-
- getting the review status of a document
40
-
- viewing a particular version (draft, in review, or approved) version of an asset
36
+
37
+
The API should let a user:
38
+
- get a list of assets, contributors, practice areas, technologies, topic areas, asset types, asset categories, and asset groups
39
+
- filter assets by contributor, practice area, technology, topic area, asset type, asset category, and asset group
40
+
- filter an asset group by primary asset
41
+
- filter an asset group by topic area
42
+
- get the review status of a document
43
+
44
+
The API user must pick a version status - draft, in review, or approved - for any asset or assets they get. They can only get one version status at a time.
41
45
42
46
43
47
@@ -46,43 +50,43 @@ The API should allow for:
46
50
## Google Document Features
47
51
# Technical Documentation
48
52
# Technical Implementation
53
+
49
54
## People Depot Replication with SSO
50
-
People Depot data is replicated when user logs in.
51
-
### User Profile
52
-
1. User attempts to login using kb url.
53
-
2. If user is configured for SSO
54
-
- user is redirected to login
55
-
- user logs in
56
-
- Cognito calls kb callback with parameters necessary to derive token using Cognito algorithm. Token is stored in variable.
57
-
3. If user is not configured for SSO
58
-
- user is drected to kb login page
59
-
- user logs in using local account
60
-
- token is derived using local algorithm. Token is stored in variable.
61
-
4. /sync url is called. This is configured in LOGIN_REDIRECT_URL
62
-
5. sync url triggers call to update_all_from_pd
63
-
6. update_all_from_pd
64
-
6.1 calls update_practice_area_from_pd
65
-
- gets practice area data from https://<peopledepotserver>/practice-areas w
66
-
- data returned is used to create and update practice area records
67
-
6.2 calls update_user_profile_from_pd
68
-
- gets current user data from https://<peopledepotserver>/profile with token in header
69
-
- data returned is used to create or update information for current user
70
-
6.3 calls update_users_from_pd
71
-
- gets current user data from https://<peopledepotserver>/users with token in header
72
-
- data returned is used to create or update groups and users
73
-
###
74
-
1. User attempts to login using kb url.
75
-
2. gets token from https://<peopledepotserver>/login that passes entered user and password
76
-
3.
77
-
78
-
## People Depot without SSO
79
-
## Servers
80
-
- Javascript service for converting a Google doc into a markdown and placed in a location to be picked up by Jekyll Hack for LA website.
81
-
- Django app to implement the Knowledge Base Features
82
-
- Interacts with Jekyll server
83
-
- Interacts with People Depot
55
+
56
+
The Knowledgebase replicates the People Depot table when the user logs in. This is the log in flow:
57
+
58
+
1. User attempts to login using Knowledgebase url.
59
+
2. For a normal user, we configure the Knowledgebase for SSO, therefore:
60
+
2.1 user is redirected to Cognito login
61
+
2.2 user logs in to Cognito
62
+
TODO: 2.3 Cognito and Knowledgebase work together to create a token
63
+
2.4 Knowledgebase calls People Depot /profile API to validate the user. If no such user exists,
64
+
Knowledgebase shows an error screen.
65
+
3. For an internal developers who is using Knowledgebase without SSO:
66
+
3.1 user is directed to Knowledgebase login page
67
+
3.2 user logs in with username and password
68
+
3.3 Knowledgebase calls People Depot /login API to validate username and password against People Depot
69
+
3.4 Knowledgebase creates a token
70
+
5. Knowledgebase redirects the user to the /sync url. This is configured in the LOGIN_REDIRECT_URL environment variable.
71
+
6. The view associated with the /sync url, `sync_view()`, calls `update_all_from_pd()`, which:
72
+
6.1 calls `update_user_profile_from_pd()`, which:
73
+
6.1.1 gets current user data from `https://<people depot server>/profile` with token in header
74
+
6.1.2 creates or updates the user's record
75
+
6.2 calls `update_users_from_pd()`
76
+
6.2.1 gets current user data from `https://<people depot server>/users` with token in header
77
+
6.2.2 creates or updates the records for the users and security groups
78
+
6.3 calls `update_practice_area_from_pd()`
79
+
6.3.1 gets practice area data from `https://<people depot server>/practice-areas` (without a token)
80
+
6.3.2 creates or updates the practice area records
81
+
82
+
## Servers Knowledgebase interacts with
83
+
84
+
- Google doc conversion server. It converts a Google doc into markdown. We have written the backend for this server in javascript.
85
+
- Jekyll server. The Jekyll server converts the markdown to HTML for the Hack for LA website.
0 commit comments