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

Company Subscriptions | App & Service Subscriptions -> Details page responds 403 #987

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

Comments

@tfjanjua
Copy link
Contributor

Current Behavior

App & Service Subscriptions -> Details page is responding 403 error code.

Expected Behavior

Portal should display detailed information about the selected subscription.
OR
Details column should not be there for the role who does not have access to details page or we should disable details Icon for Restricted Users.

Steps To Reproduce

  1. Login to Portal App using App Manager or Service Manager user.
  2. Go to Profile icon, right-top-corner
  3. Click on ‘Company Subscriptions’
  4. Click on Details Arrow.

Findings

So, I have following findings related to the ‘App & Service Subscriptions' and ‘Details’ pages

  1. User: App Manager
    App Manager can see all the apps on 'App & Service Subscriptions' page
    API: /api/Apps/subscribed/subscription-status

But App Manager is not able to see the ‘Details’ of Apps because of not having subscribe_apps role
API: /api/apps/{appId}/subscription/{subscriptionId}/subscriber

  1. User: Service Manager
    In case of ‘Service Manager’ user, frontend has also been calling the same API as App Manager and see all Apps instead of Services
Currently calling the same API as App Manager: 
/api/Apps/subscribed/subscription-status
Whereas API exists for Service Manager to see the list of Services: 
/api/Services/subscribed/subscription-status

and same is happening with 'Details' page that frontend has been calling the same API as App Manager

Currently calling the same API as App Manager: 
/api/apps/{appId}/subscription/{subscriptionId}/subscriber
Whereas API exists for Service Manager to see the Details of a Service: 
/api/services/{serviceId}/subscription/{subscriptionId}/subscriber

Although Service Manager doesnt have subscribe_service role to see the Details.

So, I feel like first we need to decide if we should call APIs related to Services for Service Manager or not? OR we can keep calling Apps related API for Service Manager? and then we can decide if App or Service Manager can see the details from 'App & Service Subscriptions' page or not?

If App or Service Manager is not supposed to see the details from 'App & Service Subscriptions' page, then we can assign subscribe_apps role to App Manager and subscribe_service role to Service Manager from keycloak side and if not, then we can hide Details Button from 'App & Service Subscriptions' frontend page in case of App or Service Manager users.

@evegufy | @MaximilianHauer | @ybidois please suggest the workaround as per the business logic/case. thanks

@tfjanjua tfjanjua added the bug Something isn't working label Sep 10, 2024
@tfjanjua tfjanjua self-assigned this Sep 10, 2024
@ybidois
Copy link

ybidois commented Sep 10, 2024

Hi @tfjanjua, thanks for the detailed investigation!

As per the role names, I would expect the App Manager to see only apps and Service Manager to see only services.

I let @MaximilianHauer and @evegufy confirm whether they agree with this logic.

@MaximilianHauer
Copy link

@ybidois got this story in my backlog but want to take my time to have a concentrated look

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
Status: NEW USER REQUEST
Development

No branches or pull requests

3 participants