Skip to content
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

WIP: MSC3861: MAS support #3493

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ba542fe
mas: added /auth_issuer endpoint
mdnight Dec 21, 2024
2c47959
mas: added username_available endpoint
mdnight Dec 22, 2024
e1dfe62
mas: rename msc2965 to msc3861
mdnight Dec 22, 2024
150be58
mas: added localpart_external_ids table
mdnight Dec 24, 2024
63a199c
mas: first successful attempt of login with via mas
mdnight Dec 29, 2024
9d9841d
mas: added "admin's replacement without uia" endpoint
mdnight Dec 30, 2024
4f406e2
minor goimports fix
mdnight Dec 30, 2024
b950703
mas: return correct http code
mdnight Dec 30, 2024
9ebcebe
another goimports fix
mdnight Dec 30, 2024
be8d490
mas: implemented PUT /admin/v2/users/{userID} endpoint
mdnight Dec 30, 2024
524f65c
mas: add AccountTypeOIDCService
mdnight Dec 30, 2024
ff63e7f
mas: modify PUT /profile/{userID}/displayname endpoint
mdnight Dec 30, 2024
bf310d5
drop primary key constraint from userapi_devices.access_token
mdnight Dec 31, 2024
f4ff426
mas: refactor admin user device handler
mdnight Jan 1, 2025
803cce8
mas: added admin's delete devices endpoint
mdnight Jan 1, 2025
7ffb2c1
mas: minor fixes in cross_signing_keys_table files
mdnight Jan 5, 2025
c06e0aa
refactor logger calls
mdnight Jan 5, 2025
48f3cd3
mas: added /admin/v1/deactivate/{userID} endpoint
mdnight Jan 5, 2025
9b064b1
minor refactoring
mdnight Jan 5, 2025
cc7deb2
mas: added support of msc3861 to /keys/device_signing/upload endpoint
mdnight Jan 5, 2025
5cffc2c
mas: fix displayname handling
mdnight Jan 6, 2025
811a504
mas: handle 3pids from mas
mdnight Jan 6, 2025
17576cc
mas: acced msc3861 config example to the dendrite-sample.yaml
mdnight Jan 7, 2025
e943ba5
mas: fail if conflicts in config occur
mdnight Jan 7, 2025
7eec60e
mas: reorganise endpoints
mdnight Jan 7, 2025
fb15db7
unit tests fix
mdnight Jan 8, 2025
b44a79c
Bump golang version
mdnight Jan 8, 2025
7311d3e
more fixes
mdnight Jan 8, 2025
0990676
linter fixes
mdnight Jan 9, 2025
1afe2b9
fix cross_signing_keys_table
mdnight Jan 9, 2025
244021d
deleted test cases TestDevices/sqlite/dupe_token
mdnight Jan 9, 2025
78457f3
++
mdnight Jan 9, 2025
80ee52e
fix syncapi tests
mdnight Jan 9, 2025
930daa1
mas: move org.matrix.cross_signing_reset const from logintypes.go to …
mdnight Jan 10, 2025
0be9b3c
syncapi_test.go fix
mdnight Jan 10, 2025
4cde3ba
mas: add missing migration for adding x-signing updatable_without_uia…
mdnight Jan 10, 2025
5ea033d
mas: remove enabled field from msc3861 config + remove some incorrect…
mdnight Jan 10, 2025
5fd654f
Add TestMakeServiceAdminAPI
mdnight Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mas: move org.matrix.cross_signing_reset const from logintypes.go to …
…key_crosssigning.go
  • Loading branch information
mdnight committed Jan 10, 2025
commit 930daa109000f59e427f1f791baf54c284e78332
1 change: 0 additions & 1 deletion clientapi/auth/authtypes/logintypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ const (
LoginTypeRecaptcha = "m.login.recaptcha"
LoginTypeApplicationService = "m.login.application_service"
LoginTypeToken = "m.login.token"
LoginTypeCrossSigningReset = "org.matrix.cross_signing_reset"
)
10 changes: 6 additions & 4 deletions clientapi/routing/key_crosssigning.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"github.com/matrix-org/util"
)

const CrossSigningResetStage = "org.matrix.cross_signing_reset"

type crossSigningRequest struct {
api.PerformUploadDeviceKeysRequest
Auth newPasswordAuth `json:"auth"`
Expand Down Expand Up @@ -101,7 +103,7 @@ func UploadCrossSigningDeviceKeys(
if !masterKeyUpdatableWithoutUIA {
url := ""
if m := cfg.MSCs.MSC3861; m.AccountManagementURL != "" {
url = strings.Join([]string{m.AccountManagementURL, "?action=", authtypes.LoginTypeCrossSigningReset}, "")
url = strings.Join([]string{m.AccountManagementURL, "?action=", CrossSigningResetStage}, "")
} else {
url = m.Issuer
}
Expand All @@ -111,11 +113,11 @@ func UploadCrossSigningDeviceKeys(
"dummy",
[]authtypes.Flow{
{
Stages: []authtypes.LoginType{authtypes.LoginTypeCrossSigningReset},
Stages: []authtypes.LoginType{CrossSigningResetStage},
},
},
map[string]interface{}{
authtypes.LoginTypeCrossSigningReset: map[string]string{
CrossSigningResetStage: map[string]string{
"url": url,
},
},
Expand All @@ -128,7 +130,7 @@ func UploadCrossSigningDeviceKeys(
}
}
// XXX: is it necessary?
sessions.addCompletedSessionStage(sessionID, authtypes.LoginTypeCrossSigningReset)
sessions.addCompletedSessionStage(sessionID, CrossSigningResetStage)
} else {
if uploadReq.Auth.Type != authtypes.LoginTypePassword {
return util.JSONResponse{
Expand Down