feat!: sensitive actions need a fresh passkey touch (elevation windows), plus login page hint cleanup [CI]

This commit is contained in:
justme committed 2026-10-07 22:29:24 +08:00
1 parent 1379b8c7cb
commit ff45ad086e
27 files changed
+1305 -58

No files matched your search

+286 -1
View File
@@ -1625,6 +1625,208 @@
"x-moshiro-capability": "authenticated"
}
},
"/api/admin/auth/elevation": {
"get": {
"tags": [
"admin-auth"
],
"summary": "The elevation windows this session has open (sensitive actions need one)",
"operationId": "auth_elevation_list",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageDtoOfElevationDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
},
"x-moshiro-capability": "authenticated"
},
"post": {
"tags": [
"admin-auth"
],
"summary": "Open an elevation window from a passkey assertion (enroll 15 min, revoke 5 min, credential one use within 60 s)",
"operationId": "auth_elevate",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ElevationAssertionRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ElevationDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
},
"x-moshiro-capability": "authenticated"
},
"delete": {
"tags": [
"admin-auth"
],
"summary": "Close all elevation windows of this session",
"operationId": "auth_elevation_end",
"responses": {
"204": {
"description": "No Content",
"content": {
"application/json": {
"schema": { }
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
},
"x-moshiro-capability": "authenticated"
}
},
"/api/admin/auth/elevation/options": {
"post": {
"tags": [
"admin-auth"
],
"summary": "A challenge for opening an elevation window with a passkey touch",
"operationId": "auth_elevation_options",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ElevationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PasskeyRequestOptionsDto"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDto"
}
}
}
}
},
"x-moshiro-capability": "authenticated"
}
},
"/api/admin/auth/me": {
"get": {
"tags": [
@@ -4025,7 +4227,7 @@
}
}
},
"x-moshiro-capability": "accounts.manage"
"x-moshiro-capability": "accounts.read"
},
"post": {
"tags": [
@@ -5803,6 +6005,59 @@
}
}
},
"ElevationAssertionRequest": {
"required": [
"class",
"credential_id",
"authenticator_data",
"client_data_json",
"signature"
],
"type": "object",
"properties": {
"class": {
"type": "string"
},
"credential_id": {
"type": "string"
},
"authenticator_data": {
"type": "string"
},
"client_data_json": {
"type": "string"
},
"signature": {
"type": "string"
}
}
},
"ElevationDto": {
"required": [
"class",
"expires_at"
],
"type": "object",
"properties": {
"class": {
"type": "string"
},
"expires_at": {
"format": "date-time"
}
}
},
"ElevationRequest": {
"required": [
"class"
],
"type": "object",
"properties": {
"class": {
"type": "string"
}
}
},
"EventDto": {
"required": [
"id",
@@ -7147,6 +7402,27 @@
}
}
},
"PageDtoOfElevationDto": {
"required": [
"items",
"next_cursor"
],
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ElevationDto"
}
},
"next_cursor": {
"type": [
"null",
"string"
]
}
}
},
"PageDtoOfEventDto": {
"required": [
"items",
@@ -7688,6 +7964,15 @@
"string"
],
"format": "int32"
},
"allow_credentials": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
}
}
},