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: src/apigateway/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The `apigateway` app needs to be added to the `INSTALLED_APPS` in your Django pr
27
27
```python
28
28
INSTALLED_APPS= [
29
29
...
30
-
"mitol.apigateway",
30
+
"mitol.apigateway.apps.ApigatewayApp",
31
31
]
32
32
```
33
33
@@ -86,13 +86,13 @@ These settings are needed for your environment:
86
86
87
87
These settings are likely to need adjustment for your environment:
88
88
89
-
-`MITOL_APIGATEWAY_CREATE_USER` - controls if the backend will create _new_ users or not. If set to False, users will have to be pre-created within the system before they can be authenticated.
90
-
-`MITOL_APIGATEWAY_UPDATE_USER` - controls if the backend will update _existing_ users or not.
89
+
-`MITOL_APIGATEWAY_USERINFO_CREATE` - controls if the backend will create _new_ users or not. If set to False, users will have to be pre-created within the system before they can be authenticated.
90
+
-`MITOL_APIGATEWAY_USERINFO_UPDATE` - controls if the backend will update _existing_ users or not.
91
91
92
92
These settings are unlikely to need adjustment:
93
93
94
-
-`MITOL_APIGATEWAY_HEADER_NAME` - the name of the header the API gateway will use to attach user data to the request. For APISIX's `openid-connect` plugin, this will be `HTTP_X_USERINFO` and it isn't changeable (at time of writing). **This should be formatted as it will be after Django normalizes the header names.**
95
-
-`MITOL_APIGATEWAY_ID_FIELD` - the name of the field to use to identify the user. This will depend on your SSO provider; for Keycloak, this is usually `sub`. You should use whatever immutable ID is available for this - email and username are not good choices unless there's no other option.
94
+
-`MITOL_APIGATEWAY_USERINFO_HEADER_NAME` - the name of the header the API gateway will use to attach user data to the request. For APISIX's `openid-connect` plugin, this will be `HTTP_X_USERINFO` and it isn't changeable (at time of writing). **This should be formatted as it will be after Django normalizes the header names.**
95
+
-`MITOL_APIGATEWAY_USERINFO_ID_FIELD` - the name of the field to use to identify the user. This will depend on your SSO provider; for Keycloak, this is usually `sub`. You should use whatever immutable ID is available for this - email and username are not good choices unless there's no other option.
96
96
97
97
98
98
> ### Account management considerations
@@ -103,9 +103,9 @@ These settings are unlikely to need adjustment:
103
103
>
104
104
> When an existing user is matched to the remote user, the backend can update the user's data with what has been attached to the request. This is an easy way to keep your user database up to date. However, if you have a process that manages that for you, you may want to turn this off to prevent potential conflicts. (But be warned: if you do turn this off, you should make sure to configure the back-channel update process or your userdata will fall out of sync quickly.)
105
105
106
-
_If you've turned on user creation or update_, you should additionally check the field mappings. The fields present in the user info attached to the request are often not a 1-to-1 map to what's in your `User` model, so the backend uses a setting that contains a map between the userinfo field and the `User` model field. This mapping is in `MITOL_APIGATEWAY_MODEL_MAP`.
106
+
_If you've turned on user creation or update_, you should additionally check the field mappings. The fields present in the user info attached to the request are often not a 1-to-1 map to what's in your `User` model, so the backend uses a setting that contains a map between the userinfo field and the `User` model field. This mapping is in `MITOL_APIGATEWAY_USERINFO_MODEL_MAP`.
107
107
108
-
The `MODEL_MAP` is a dict with two root keys:
108
+
The `MITOL_APIGATEWAY_USERINFO_MODEL_MAP` is a dict with two root keys:
109
109
110
110
-`user_fields`: Maps data into the user model. Contains a dict.
111
111
- Keys are the userinfo field name and values are the target user model field.
0 commit comments