Skip to content

Lack of systemuser-support for SO endusercontext/systemlabels #3177

@elsand

Description

@elsand

Description

Supplying a invalid EndUserId to v1/serviceowner/dialogs/:dialogId/endusercontext/systemlabels?EndUserId= causes a 400 but without any errors. We must support supplying systemuserid as EndUserId.

Reproduction

  1. Perform a SO authenticated request toapi/v1/serviceowner/dialogs/{dialogId}/endusercontext/systemlabels?EndUserId=urn:altinn:systemuser:uuid:{systemUserUuid}

Expected behavior

The label request is processed if given a valid and the supplied end user is authorized. If a invalid (ie. not well-formed) EndUserId, the returned ProblemDetails should indicate this.

Actual behavior

A 400 Bad Request is returned with an ProblemDetails missing errors:

{
  "type": "https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "instance": "/api/v1/serviceowner/dialogs/0197ee86-a1fd-71c4-9762-5339e51c3e68/endusercontext/systemlabels",
  "traceId": "00-8caf832f3b071a5f6277ba180f948f48-7aeaf9dda0d8271d-01"
}

Additional information

SystemUsers should be allowed in ServiceOwnerOnBehalfOfPersonMiddleware, same as ServiceOwner/Dialogs/Queries/Get/GetDialogQueryValidator.cs. As the middleware always handles validation of EndUserId, the query specific rule should probably be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Sprint Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions