You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First step to add support for system users in Profile is to update a few things in the application. The analysis revealed a few things that must be looked at.
System users doesn't have their own profile so the endpoint current will return 400.
Tasks
Implement a test of the UsersController.GetUserById method where the claims principal has a system user claim instead of a user id or org claim. Expect 200.
Implement a test of the UsersController.Get method where the claims principal has a system user claim instead of a user id or org claim. Expect 400.
Update TelemetryHelpers.EnrichFromRequest to support requests performed with a system user. (Logging of caller information.) Copy logic from Storage and the PEP package. Should be unnecessary to import the PEP package directly.
Acceptance criteria
A user with credentials that includes a user id will get the user profile of current user when asking the "current" endpoint
A user with credentials that includes a system user will get a 400 response when asking the "current" endpoint
A user with credentials that include a system user will get the user profile of any user when asking for profile based in a user id.
Repeat those above for other endpoints in the UserController.
The text was updated successfully, but these errors were encountered:
When invoking the endpoint GET https://platform.at23.altinn.cloud/profile/api/v1/users/current, a 400 Bad Request response is returned with the message: "Invalid request context. UserId must be provided in claims."
When invoking the endpoint GET https://platform.at23.altinn.cloud/profile/api/v1/users/20020304, the corresponding user profile is successfully retrieved.
When invoking the endpoint GET https://platform.at23.altinn.cloud/profile/api/v1/users/byuuid/4a80af94-14be-4af5-9f95-a6a0824c5b55, the corresponding user profile is successfully retrieved.
When invoking the endpoint POST https://platform.at23.altinn.cloud/profile/api/v1/users, where the social security number is "18874198354" the corresponding user profile is successfully retrieved.
Blockers
Description
First step to add support for system users in Profile is to update a few things in the application. The analysis revealed a few things that must be looked at.
System users doesn't have their own profile so the endpoint current will return 400.
Tasks
UsersController.GetUserById
method where the claims principal has a system user claim instead of a user id or org claim. Expect 200.UsersController.Get
method where the claims principal has a system user claim instead of a user id or org claim. Expect 400.TelemetryHelpers.EnrichFromRequest
to support requests performed with a system user. (Logging of caller information.) Copy logic from Storage and the PEP package. Should be unnecessary to import the PEP package directly.Acceptance criteria
The text was updated successfully, but these errors were encountered: