Перейти к основному содержимому

Матрица прав

Зачем нужно

Документ связывает действия, endpoints, permissions, scope, actor context и audit events. Серверная проверка прав должна соответствовать этой матрице.

Scope types

ScopeГде применяется
globalсистемные администраторы identity
organizationдействия внутри организации
teamдействия внутри команды
familyдействия взрослого относительно семьи
selfдействия пользователя над своими данными
oauth_clientдействия внешнего client по scopes

Learning Workspace не является отдельным identity scope type. Он использует self, family, organization, team и product scopes; организация и площадка выбираются внутри workspace как вложенные scopes/подслои.

Self actions

ДействиеEndpointPermissionActor contextAudit
Читать свой профильGET /api/v2/identity/meidentity.profile.read.ownpersonalнет
Изменить профильPATCH /api/v2/identity/me/profileidentity.profile.manage.own + re-auth где нужноpersonalidentity.user.updated
Сменить парольPOST /api/v2/identity/auth/password/changeidentity.auth.manage.own + re-authpersonalidentity.password.changed
Посмотреть сессииGET /api/v2/identity/me/sessionsidentity.sessions.read.ownpersonalнет
Отозвать свою сессиюDELETE /api/v2/identity/me/sessions/{id}identity.sessions.manage.ownpersonalidentity.session.revoked
Настройки уведомленийPATCH /api/v2/platform/notifications/settings/{ruleId}platform.notifications.manage.ownpersonalplatform.notification_settings.updated

Educator profile

ДействиеEndpointPermissionActor contextAudit
Читать свою преподавательскую анкетуGET /api/v2/identity/me/educator-profileidentity.educator-profile.read.ownpersonalнет
Создать или изменить свою преподавательскую анкетуPUT /api/v2/identity/me/educator-profileidentity.educator-profile.manage.ownpersonalidentity.educator_profile.updated
Отправить анкету на проверкуPOST /api/v2/identity/me/educator-profile/submitidentity.educator-profile.manage.ownpersonalidentity.educator_profile.submitted
Рассмотреть trust profilePOST /api/v2/identity/admin/educator-profiles/{id}/{decision}identity.educator-profiles.reviewglobalidentity.educator_profile.reviewed

Правило: educator_profile и trust_status не дают доступа к чужим группам, официальной статистике или organization contour без membership/assignment/grant/product permission.

Admin users

ДействиеEndpointPermissionScopeAudit
Список пользователейGET /api/v2/identity/admin/usersidentity.users.readglobalнет
Создать пользователяPOST /api/v2/identity/admin/usersidentity.users.manageglobalidentity.user.created
Читать карточкуGET /api/v2/identity/admin/users/{id}identity.users.readglobalнет
Изменить пользователяPATCH /api/v2/identity/admin/users/{id}identity.users.manageglobalidentity.user.updated
ЗаблокироватьPOST /api/v2/identity/admin/users/{id}/blockidentity.users.blockglobalidentity.user.blocked
РазблокироватьPOST /api/v2/identity/admin/users/{id}/unblockidentity.users.blockglobalidentity.user.unblocked
АнонимизироватьDELETE /api/v2/identity/admin/users/{id}identity.users.deleteglobalidentity.user.anonymized

RBAC

ДействиеEndpointPermissionScopeAudit
Список ролейGET /api/v2/identity/admin/rolesidentity.roles.readglobalнет
Создать рольPOST /api/v2/identity/admin/rolesidentity.roles.manageglobalidentity.role.created
Изменить рольPATCH /api/v2/identity/admin/roles/{id}identity.roles.manageglobalidentity.role.updated
Назначить рольPOST /api/v2/identity/admin/users/{id}/rolesidentity.roles.assignglobal/org/teamidentity.role.assigned
Снять рольDELETE /api/v2/identity/admin/users/{id}/roles/{assignmentId}identity.roles.assignglobal/org/teamidentity.role.revoked
Список permissionsGET /api/v2/identity/admin/permissionsidentity.permissions.readglobalнет

Правило: пользователь не может назначить роль с уровнем выше своей effective role в том же scope. Глобальная роль teacher не создаётся; преподавательский доступ выражается через scoped permissions и product-owned assignments.

Family

ДействиеEndpointPermissionActor contextAudit
Список семейGET /api/v2/identity/familiesidentity.families.read.ownpersonalнет
Создать семьюPOST /api/v2/identity/familiesidentity.families.manage.ownpersonalidentity.family.created
Добавить student profilePOST /api/v2/identity/families/{id}/student-profilesidentity.families.manage.family или adult membershipfamily adultidentity.family_student_profile.created
Изменить student profilePATCH /api/v2/identity/families/{id}/student-profiles/{studentProfileId}identity.families.manage.family или adult membershipfamily adultidentity.family_student_profile.updated
Привязать user ребёнкаPOST /api/v2/identity/families/{id}/student-profiles/{studentProfileId}/link-useridentity.families.manage.family или adult membershipfamily adultidentity.family_student_profile.linked
Пригласить взрослогоPOST /api/v2/identity/families/{id}/invitationsidentity.families.manage.family или adult membershipfamily adultidentity.invitation.created
Начать delegated sessionPOST /api/v2/identity/families/{id}/delegated-sessionsidentity.delegated_sessions.manage.family или adult membershipfamily adultidentity.delegated_session.started
Завершить delegated sessionDELETE /api/v2/identity/families/{id}/delegated-sessions/{id}identity.delegated_sessions.manage.familyfamily adultidentity.delegated_session.ended
Создать запрос входа ребёнкаPOST /api/v2/identity/families/{id}/student-profiles/{studentProfileId}/device-authorizationsauthenticated/pre-auth child device flowpre-auth / pendingidentity.child_device_authorization.created
Подтвердить вход ребёнкаPOST /api/v2/identity/families/{id}/device-authorizations/{authorizationId}/approveadult membership или identity.child_device_authorizations.manage.familyfamily adultidentity.child_device_authorization.approved
Завершить вход ребёнкаPOST /api/v2/identity/families/{id}/device-authorizations/{authorizationId}/completevalid authorization tokenchild sessionidentity.login.succeeded + identity.child_device_authorization.completed
Отозвать запрос входаPOST /api/v2/identity/families/{id}/device-authorizations/{authorizationId}/revokeadult membership или adminfamily adult / globalidentity.child_device_authorization.revoked

Self-service удаление семьи, выход взрослого, удаление взрослого участника, перенос ребёнка и конфликтная отвязка ребёнка не входят в пользовательский MVP. В MVP такие действия выполняются администратором вручную и должны иметь отдельные admin permissions, reason и audit.

Family subject rights

ДействиеLinked user ребёнка над собойAdult над ребёнком своей семьи
Читать свой прогрессдада
Читать свой календарьдада
Редактировать свой профильдада
Покупать продукт для себядада, если покупает для ребёнка
Записываться на программудада, если записывает ребёнка
Настраивать уведомления по ребёнкусобственные настройкида, как получатель family notifications
Управлять другим взрослымнетнет

Adult membership не даёт доступа к учебному прогрессу, календарю, покупкам, уведомлениям, профилю и учебному контексту другого взрослого.

Organizations

ДействиеEndpointPermissionScopeAudit
Поиск справочных организацийGET /api/v2/identity/organization-references/searchauthenticated userpersonalнет
Создать referencePOST /api/v2/identity/admin/organization-referencesidentity.organization-references.manageglobalidentity.organization_reference.created
Изменить referencePATCH /api/v2/identity/admin/organization-references/{id}identity.organization-references.manageglobalidentity.organization_reference.updated
Создать организациюPOST /api/v2/identity/organizationsidentity.organizations.create.ownpersonalidentity.organization.created
Читать свои организацииGET /api/v2/identity/organizationsidentity.organizations.read.ownpersonalнет
Читать организациюGET /api/v2/identity/organizations/{id}org member или identity.organizations.read.organization / identity.organizations.readorganization/globalнет
Изменить организациюPATCH /api/v2/identity/organizations/{id}identity.organizations.manage.organization или identity.organizations.manageorganization/globalidentity.organization.updated
Архивировать организациюDELETE /api/v2/identity/organizations/{id}identity.organizations.archive.organization или identity.organizations.archiveorganization/globalidentity.organization.archived
Подать заявку на вступлениеPOST /api/v2/identity/organizations/{id}/membership-requestsauthenticated userpersonalidentity.organization_membership.requested
Читать заявки на вступлениеGET /api/v2/identity/organizations/{id}/membership-requestsidentity.organization-members.read.organizationorganization/globalнет
Подтвердить заявкуPOST /api/v2/identity/organizations/{id}/membership-requests/{requestId}/approveidentity.organization-members.approve.organizationorganization/globalidentity.organization_membership.activated
Отклонить заявкуPOST /api/v2/identity/organizations/{id}/membership-requests/{requestId}/rejectidentity.organization-members.approve.organizationorganization/globalidentity.organization_membership.rejected
Пригласить участникаPOST /api/v2/identity/organizations/{id}/invitationsidentity.organization-invitations.create.organization или identity.organization-invitations.manage.organizationorganization/globalidentity.organization_invitation.created / sent
Отозвать invitationPOST /api/v2/identity/organizations/{id}/invitations/{invitationId}/revokeidentity.organization-invitations.manage.organizationorganization/globalidentity.organization_invitation.revoked
Подать заявку на владениеPOST /api/v2/identity/organizations/{id}/ownership-claimsauthenticated userpersonalidentity.organization_ownership_claim.submitted
Рассмотреть заявку на владениеPOST /api/v2/identity/admin/organization-ownership-claims/{id}/{decision}identity.organization-ownership-claims.reviewglobalidentity.organization_ownership_claim.approved / rejected
Создать передачу владенияPOST /api/v2/identity/organizations/{id}/ownership-transfersidentity.organizations.transfer-ownership.organizationorganization/globalidentity.organization_ownership_transfer.created
Принять передачу владенияPOST /api/v2/identity/organization-ownership-transfers/{token}/accepttransfer recipientpersonalidentity.organization_ownership_transfer.accepted
Создать командуPOST /api/v2/identity/organizations/{id}/teamsidentity.teams.manage.organizationorganization/globalidentity.organization_team.created
Управлять ролями организацииPOST/PATCH /api/v2/identity/organizations/{id}/rolesidentity.organization-roles.manage.organizationorganization/globalidentity.organization_role.updated
Создать organization studentPOST /api/v2/identity/organizations/{id}/studentsidentity.organization-students.create.organizationorganization/globalidentity.organization_student.created
Редактировать organization studentPATCH /api/v2/identity/organizations/{id}/students/{studentId}identity.organization-students.manage.organizationorganization/globalidentity.organization_student.updated
Архивировать organization studentDELETE /api/v2/identity/organizations/{id}/students/{studentId}identity.organization-students.archive.organizationorganization/globalidentity.organization_student.archived
Назначить permission grantPOST /api/v2/identity/organizations/{id}/permission-grantsidentity.organization-permission-grants.manage.organizationorganization/globalidentity.organization_permission_grant.created
Отозвать permission grantDELETE /api/v2/identity/organizations/{id}/permission-grants/{grantId}identity.organization-permission-grants.manage.organizationorganization/globalidentity.organization_permission_grant.revoked
Создать merge planPOST /api/v2/identity/admin/organization-mergesidentity.organization-merges.manageglobalidentity.organization.marked_duplicate
Выполнить mergePOST /api/v2/identity/admin/organization-merges/{id}/completeidentity.organization-merges.manage + confirmationglobalidentity.organization.merged

Действия с organization_student работают только для официального организационного контура. Рабочие ученики самозаявленного преподавателя не создаются через эти endpoints; они являются learning_group_participant в LMS.

Organization permission name mapping

Локальное имя из продуктовой спекиCatalog permission
organization.members.viewidentity.organization-members.read.organization
organization.members.inviteidentity.organization-invitations.create.organization
organization.members.approveidentity.organization-members.approve.organization
organization.members.suspendidentity.organization-members.suspend.organization
organization.roles.manageidentity.organization-roles.manage.organization
organization.ownership.transferidentity.organizations.transfer-ownership.organization
organization.teams.manageidentity.teams.manage.organization
students.viewidentity.organization-students.read.organization
students.createidentity.organization-students.create.organization
students.editidentity.organization-students.manage.organization
students.archiveidentity.organization-students.archive.organization

Product permissions stay in product domains:

Product-local nameCatalog permission owner
olympiad.results.editcompetitions.results.manage.organization
problem_bank.collections.edittask-bank.collections.manage.organization

OAuth clients

ДействиеEndpointPermissionScopeAudit
Список clientsGET /api/v2/identity/admin/oauth/clientsidentity.oauth_clients.readglobalнет
Создать clientPOST /api/v2/identity/admin/oauth/clientsidentity.oauth_clients.manageglobalidentity.oauth_client.created
Изменить clientPATCH /api/v2/identity/admin/oauth/clients/{id}identity.oauth_clients.manageglobalidentity.oauth_client.updated
Отключить clientPOST /api/v2/identity/admin/oauth/clients/{id}/disableidentity.oauth_clients.manage + re-authglobalidentity.oauth_client.updated
Consent user/oauth/authorizeauthenticated user + scopespersonal/oauth_clientidentity.oauth_consent.granted

Platform and plugins

ДействиеEndpointPermissionScopeAudit
Читать settingsGET /api/v2/platform/admin/settingsplatform.settings.readglobalнет
Изменить settingsPATCH /api/v2/platform/admin/settingsplatform.settings.manage + re-authglobalplatform.settings.updated
Изменить брендингPATCH /api/v2/platform/admin/brandingplatform.branding.manageglobalplatform.branding.updated
Меню/навигацияPATCH /api/v2/platform/admin/navigationplatform.navigation.manageglobalplatform.navigation.updated
Список pluginsGET /api/v2/platform/admin/pluginsplatform.plugins.readglobalнет
Установить pluginPOST /api/v2/platform/admin/plugins/installplatform.plugins.install + re-authglobalplatform.plugin.installed
Включить/выключитьPOST /api/v2/platform/admin/plugins/{id}/enable или POST /api/v2/platform/admin/plugins/{id}/disableplatform.plugins.manage + re-authglobalplatform.plugin.enabled / platform.plugin.disabled
Удалить pluginDELETE /api/v2/platform/admin/plugins/{id}platform.plugins.manage + re-authglobalplatform.plugin.deleted

Notifications and audit

ДействиеEndpointPermissionScopeAudit
Читать свои уведомленияGET /api/v2/platform/notificationsplatform.notifications.read.ownpersonalнет
Счётчик непрочитанныхGET /api/v2/platform/notifications/unread-countplatform.notifications.read.ownpersonalнет
Отметить прочитаннымPATCH /api/v2/platform/notifications/{id}/readplatform.notifications.manage.ownpersonalнет
Отметить все прочитаннымиPOST /api/v2/platform/notifications/read-allplatform.notifications.manage.ownpersonalнет
Удалить уведомлениеDELETE /api/v2/platform/notifications/{id} или DELETE /api/v2/platform/notifications/readplatform.notifications.manage.ownpersonalнет
Читать настройкиGET /api/v2/platform/notifications/settingsplatform.notifications.read.ownpersonalнет
Изменить настройку правилаPATCH /api/v2/platform/notifications/settings/{ruleId}platform.notifications.manage.ownpersonalplatform.notification_settings.updated
Правила уведомленийGET /api/v2/platform/admin/notifications/rulesplatform.notifications.readglobalнет
Создать правилоPOST /api/v2/platform/admin/notifications/rulesplatform.notifications.manageglobalplatform.notification_rule.created
Изменить правилоPATCH /api/v2/platform/admin/notifications/rules/{id}platform.notifications.manageglobalplatform.notification_rule.updated
Удалить правилоDELETE /api/v2/platform/admin/notifications/rules/{id}platform.notifications.manageglobalplatform.notification_rule.deleted
Шаблоны уведомленийGET /api/v2/platform/admin/notifications/templatesplatform.notifications.readglobalнет
Изменить шаблонPATCH /api/v2/platform/admin/notifications/templates/{id}platform.notifications.manageglobalplatform.notification_template.updated
Читать auditGET /api/v2/identity/admin/audit-logsidentity.audit.readglobalidentity.audit.viewed при экспорте или PII-фильтре

OAuth scopes

ScopeClaims/API
openidsub, ID token
profiledisplay_name, avatar_url, locale
emailverified primary email
phoneverified primary phone
rolesrole keys and permissions summary
familyallowed family contexts
organizationsorganization/team memberships
offline_accessrefresh token

Готовность

  • каждый endpoint имеет permission;
  • каждый опасный action имеет audit event;
  • self/family/organization/global scopes не смешиваются;
  • Learning Workspace не добавляет отдельный верхнеуровневый identity scope;
  • educator_profile не является источником прав;
  • organization_student не используется для всех рабочих учеников преподавателя;
  • OAuth scopes не раскрывают лишние claims;
  • re-auth required для danger actions.