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

App Registration | Receiving 403 Forbidden while getting recently uploaded App Roles #826

Closed
tfjanjua opened this issue Jul 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tfjanjua
Copy link
Contributor

Current Behavior

API returns 403 error forbidden while getting the roles, right after uploading the required role file..
https://portal-backend.entry.cofinity-x.com/api/apps/AppReleaseProcess/b6efcea6-d871-4f3c-a33b-0ea48a7a26ce/roles

Request Method:
GET

Status Code:
403 Forbidden

Expected Behavior

App Manager shouldnt get this 403 forbidden issue right after uploading the roles file.

Steps To Reproduce

  1. Login to portal as App manager
  2. Navigate to App Management ---> App Release Process → Register you App
  3. Create App and proceed the next steps
  4. On Technical Integration, upload the User Role file
  5. Hit “Upload App roles“

Findings

App Manager is missing the role: view_client_roles from Cl2-CX-Portal required to access GET endpoint https://portal-backend.entry.cofinity-x.com/api/apps/AppReleaseProcess/{appid}/roles

@jjeroch 's comment
Recheck done, this issue is (as already assumed by @evegufy ) on the endpoint side.
view_clinet_roles is supposed to get used when it comes to actual role assignment. Since the App Manager is not supposed to assign roles to company users, the permission is not expected to be assigned.
Instead the permission of the following endpoints need to get switched

  • GET /api/apps/AppChange/{appId}/roles => new permission validation edit_apps
  • GET /api/apps/AppReleaseProcess/{appId}/roles => new permission validation add_apps
@tfjanjua tfjanjua added the bug Something isn't working label Jul 10, 2024
@tfjanjua
Copy link
Contributor Author

Linked duplicate issue in portal-iam repo
eclipse-tractusx/portal-iam#147

cc: @typecastcloud

@evegufy
Copy link
Contributor

evegufy commented Jul 10, 2024

Hi @tfjanjua thank you for taking this up, could you please check out from the release branch https://github.com/eclipse-tractusx/portal-backend/tree/release/v2.1.0-RC1 and raise pr back to it?

@evegufy evegufy added this to the Release 2.1.0 milestone Jul 10, 2024
tfjanjua added a commit to tfjanjua/portal-backend that referenced this issue Jul 10, 2024
permission 'view_client_roles' has been changed for the following APIs

GET /api/apps/AppChange/{appId}/roles => new permission validation as 'edit_apps'
GET /api/apps/AppReleaseProcess/{appId}/roles => new permission validation as 'add_apps'

[Refs: 826](eclipse-tractusx#826)
evegufy pushed a commit that referenced this issue Jul 10, 2024
permission 'view_client_roles' has been changed for the following APIs

GET /api/apps/AppChange/{appId}/roles => new permission validation as 'edit_apps'
GET /api/apps/AppReleaseProcess/{appId}/roles => new permission validation as 'add_apps'

[Refs: 826](#826)
@tfjanjua tfjanjua added this to Portal Jul 10, 2024
@github-project-automation github-project-automation bot moved this to NEW USER REQUEST in Portal Jul 10, 2024
@tfjanjua tfjanjua removed this from Portal Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants