Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile: Analyze impact of introducing system users #172

Closed
2 tasks
Tracked by #470 ...
olebhansen opened this issue Aug 19, 2024 · 1 comment
Closed
2 tasks
Tracked by #470 ...

Profile: Analyze impact of introducing system users #172

olebhansen opened this issue Aug 19, 2024 · 1 comment

Comments

@olebhansen
Copy link

olebhansen commented Aug 19, 2024

Take inspiration from Altinn/altinn-storage#501

Check with Martin if 404 is a good response, or if apps will crash with null-reference, and we should diffrentiate with "unservicable" requests (e.g. getCurrent() for a system user, who does not have a profile - and will never get it by design...)

Analysis

  • Requests reaching the endpoints in the UsersController needs to have a valid bearer token, but there are no form of authorization. Any user can ask for the profile of any other. (Also required is an access token.) We should have at least one test where the caller is a system user to verify this.
  • The TelemetryHelpers.EnrichFromRequest method needs to be updated so that the telemetry being registered have correct information about the caller.
  • The "current" endpoint in UserController finds the user id from the ClaimsPrincipal. This can remain as is. Calls with a ClaimsPrincipal without a user id claim will get a 400 response.

Identified tasks

  • Implement a test of the UsersController GetUserById where the claims principal has a system user claim instead of a user id or org claim.
  • Update TelemetryHelpers.EnrichFromRequest to support requests performed with a system user. (Logging of caller information.)
@olebhansen olebhansen changed the title Analyze impact of introducing system users Profile: Analyze impact of introducing system users Aug 19, 2024
@hggutvik hggutvik self-assigned this Dec 12, 2024
@SandGrainOne
Copy link
Member

Tasks transfered to #208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants