mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-09-10 22:14:48 -05:00
feat(@xen-orchestra/rest-api): setup simple auth middleware (#8327)
Configure dependency injection + configure authentication middleware for openapi (copy of what actually exists in the current REST API. Will be improved later when implementing ACL/resource set)
This commit is contained in:
@@ -89,6 +89,12 @@ type BaseXoVm = {
|
||||
}
|
||||
}
|
||||
|
||||
export type XoGroup = {
|
||||
id: Branded<'group'>
|
||||
name: string
|
||||
users: XoUser['id'][]
|
||||
}
|
||||
|
||||
export type XoHost = {
|
||||
id: Branded<'host'>
|
||||
type: 'host'
|
||||
@@ -104,6 +110,17 @@ export type XoSr = {
|
||||
type: 'SR'
|
||||
}
|
||||
|
||||
export type XoUser = {
|
||||
authProviders?: Record<string, string>
|
||||
email: string
|
||||
groups: XoGroup['id'][]
|
||||
id: Branded<'user'>
|
||||
name: string
|
||||
permission: string
|
||||
pw_hash: string
|
||||
preferences: Record<string, string>
|
||||
}
|
||||
|
||||
export type XoVbd = {
|
||||
id: Branded<'VBD'>
|
||||
type: 'VBDu'
|
||||
@@ -166,9 +183,11 @@ export type XoVtpm = {
|
||||
}
|
||||
|
||||
export type XoRecord =
|
||||
| XoGroup
|
||||
| XoHost
|
||||
| XoPool
|
||||
| XoSr
|
||||
| XoUser
|
||||
| XoVbd
|
||||
| XoVdi
|
||||
| XoVgpu
|
||||
|
||||
Reference in New Issue
Block a user