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: README.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ If `notify_on_registration` is set then `notify_on_registration.url` will be cal
113
113
114
114
`expose_metadata_resource` must be an object with `name` field. The object will be exposed at `/_famedly/login/{expose_metadata_resource.name}`.
115
115
116
-
When `registration_enabled` is `false`, new users cannot register through this OAuth flow—except for identities listed under `sysadmins`. A `sysadmins` entry matches when both `external_id` and `issuer` equal the token's resolved `sub` and `iss`.
116
+
When `registration_enabled` is `false`, new users cannot register through this OAuth flow—except for identities listed under `sysadmins`. A `sysadmins` entry matches when both `external_id` and `issuer` equal the token's resolved `sub` and `iss`. On **first registration**, a matching sysadmin is created as a Synapse server admin, in addition to any `admin_validator` outcome.
117
117
118
118
Example:
119
119
@@ -131,7 +131,7 @@ oauth:
131
131
132
132
### OAuthSysadmin
133
133
134
-
Each object in `oauth.sysadmins` identifies one IdP subject that may register even when `registration_enabled` is `false`.
134
+
Each object in `oauth.sysadmins` identifies one IdP subject that may register even when `registration_enabled` is `false`, and who is registered as a server admin when first created via this flow.
135
135
136
136
| Parameter | Description |
137
137
| ------------- | ----------- |
@@ -150,7 +150,7 @@ Each object in `oauth.sysadmins` identifies one IdP subject that may register ev
|`required_scopes`| Space separated string or a list of strings (optional) |
156
156
|`jwk_set`|[JWKSet](https://datatracker.ietf.org/doc/html/rfc7517#section-5) or [JWK](https://datatracker.ietf.org/doc/html/rfc7517#section-4) (optional) |
@@ -159,6 +159,8 @@ Each object in `oauth.sysadmins` identifies one IdP subject that may register ev
159
159
160
160
Either `jwk_set` or `jwk_file` or `jwks_endpoint` must be specified.
161
161
162
+
If `admin_validator` is set, it is run against the decoded JWT claims when registering a new user. If it returns true, the user is created as a server admin.
|`required_scopes`| Space separated string or a list of strings (optional) |
178
180
181
+
If `admin_validator` is set, it is run against the introspection JSON when registering a new user; a true result creates the user as admin.
182
+
179
183
Keep in mind, that default validator will always pass. According to the [spec](https://datatracker.ietf.org/doc/html/rfc7662), you probably want at least
0 commit comments