Ejemplo n.º 1
0
class VlobCreateReqSchema(BaseReqSchema):
    realm_id = RealmIDField(required=True)
    encryption_revision = fields.Integer(required=True)
    vlob_id = VlobIDField(required=True)
    # If blob contains a signed message, it timestamp cannot be directly enforced
    # by the backend (given the message is probably also encrypted).
    # Hence the timestamp is passed in clear so backend can reject the message
    # if it considers the timestamp invalid. On top of that each client asking
    # for the message will receive the declared timestamp to check against
    # the actual timestamp within the message.
    timestamp = fields.DateTime(required=True)
    blob = fields.Bytes(required=True)
Ejemplo n.º 2
0
class EventsRealmMaintenanceFinishedRepSchema(BaseRepSchema):
    event = fields.EnumCheckedConstant(APIEvent.REALM_MAINTENANCE_FINISHED, required=True)
    realm_id = RealmIDField(required=True)
    encryption_revision = fields.Integer(required=True)
Ejemplo n.º 3
0
class EventsRealmVlobsUpdatedRepSchema(BaseRepSchema):
    event = fields.EnumCheckedConstant(APIEvent.REALM_VLOBS_UPDATED, required=True)
    realm_id = RealmIDField(required=True)
    checkpoint = fields.Integer(required=True)
    src_id = VlobIDField(required=True)
    src_version = fields.Integer(required=True)
Ejemplo n.º 4
0
class EventsRealmRolesUpdatedRepSchema(BaseRepSchema):
    event = fields.EnumCheckedConstant(APIEvent.REALM_ROLES_UPDATED, required=True)
    realm_id = RealmIDField(required=True)
    role = RealmRoleField(required=True, allow_none=True)
Ejemplo n.º 5
0
class VlobMaintenanceSaveReencryptionBatchReqSchema(BaseReqSchema):
    realm_id = RealmIDField(required=True)
    encryption_revision = fields.Integer(required=True)
    batch = fields.List(fields.Nested(ReencryptionBatchEntrySchema),
                        required=True)
Ejemplo n.º 6
0
class VlobMaintenanceGetReencryptionBatchReqSchema(BaseReqSchema):
    realm_id = RealmIDField(required=True)
    encryption_revision = fields.Integer(required=True)
    size = fields.Integer(required=True,
                          validate=validate.Range(min=0, max=1000))
Ejemplo n.º 7
0
class VlobPollChangesReqSchema(BaseReqSchema):
    realm_id = RealmIDField(required=True)
    last_checkpoint = fields.Integer(required=True)
Ejemplo n.º 8
0
class BlockCreateReqSchema(BaseReqSchema):
    block_id = BlockIDField(required=True)
    realm_id = RealmIDField(required=True)
    block = fields.Bytes(required=True)