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

Technical Roles Not Available #410

Open
anjuchaurasiya opened this issue Aug 12, 2024 · 6 comments
Open

Technical Roles Not Available #410

anjuchaurasiya opened this issue Aug 12, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@anjuchaurasiya
Copy link

Some of the technical roles are not present to use from the portal. How to remove them from portal:

ERROR:

[10:59:50 ERR] Not Found: https://example.com/auth/admin/realms/CX-Central/clients/6df310ed-500e-43d5-b510-fa4668e939ee/roles/BPDM Management
{"Timestamp":"2024-07-18T10:59:50.2931620+00:00","Level":"Error","MessageTemplate":"{Message}","RenderedMessage":""Not Found: https://example.com/auth/admin/realms/CX-Central/clients/6df310ed-500e-43d5-b510-fa4668e939ee/roles/BPDM Management"","TraceId":"677d55072282dda91034f7fbc76074a9","SpanId":"cb0d317a3640440c","Exception":"Flurl.Http.FlurlHttpException: Call failed with status code 404 (Not Found): GET https://example.com/auth/admin/realms/CX-Central/clients/6df310ed-500e-43d5-b510-fa4668e939ee/roles/BPDM%20Management\n at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, CancellationToken cancellationToken, HttpCompletionOption completionOption)","Properties":{"Message":"Not Found: https://example.com/auth/admin/realms/CX-Central/clients/6df310ed-500e-43d5-b510-fa4668e939ee/roles/BPDM Management","SourceContext":"Program","ActionId":"3408e758-3328-4a50-977c-b22d7d1938c8","ActionName":"Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Controllers.ServiceAccountController.ExecuteCompanyUserCreation (Org.Eclipse.TractusX.Portal.Backend.Administration.Service)","RequestId":"0HN51K4IVFB8A:00000001","RequestPath":"/api/administration/serviceaccount/owncompany/serviceaccounts","ConnectionId":"0HN51K4IVFB8A","CorrelationId":"a884cff9238960fae20bc085f2a66b8a","Application":"Org.Eclipse.TractusX.Portal.Backend.Administration.Service"}}
[10:59:50 ERR] GeneralErrorHandler caught KeycloakNoSuccessException with errorId: 68965ebf-1869-44bc-abcf-163357978ce5 resulting in response status code 500, message 'inconsistend data. roles were not assigned in keycloak: client: technical_roles_management, roles: [BPDM Management], error: '

Available roles: https://github.com/eclipse-tractusx/portal-iam/blob/centralidp-3.0.0/import/realm-config/generic/catenax-central/CX-Central-realm.json

Current Behavior

Failing to create technical user with some specific roles

Expected Behavior

Portal should not show the invalid roles

Steps To Reproduce

Centralidp: 3.0.0
Portal: 2.0.0
bpdm: 5.0.2
image-2024-7-22_20-32-22

@anjuchaurasiya anjuchaurasiya added the bug Something isn't working label Aug 12, 2024
@evegufy
Copy link
Contributor

evegufy commented Aug 12, 2024

This role (BPDM Management) has actually been removed in preparation for the 2.0.0 version see eclipse-tractusx/portal-backend@07832c1
Could you please check if the portal migrations job was executed when upgrading to 2.0.0 version?

@evegufy evegufy self-assigned this Aug 12, 2024
@anjuchaurasiya
Copy link
Author

These migration jobs were completed successfully:

k get pods|grep migration
portaldev-portal-migrations-lkwhq 0/1 Completed 0 4d1h
portaldev-provisioning-migrations-ttpn2 0/1 Completed 0 4d1h

[04:31:18 INF] Found 2 custom seeder
{"Timestamp":"2024-08-09T04:31:18.8026412+00:00","Level":"Information","MessageTemplate":"Found {SeederCount} custom seeder","RenderedMessage":"Found 2 custom seeder","Properties":{"SeederCount":2,"SourceContext":"Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding.CustomSeederRunner","MachineName":"portaldev-portal-migrations-lkwhq","ProcessId":1,"ThreadId":7,"Application":"Org.Eclipse.TractusX.Portal.Backend.PortalBackend.Migrations"}}
[04:32:45 INF] Custom seeding finished
{"Timestamp":"2024-08-09T04:32:45.9538504+00:00","Level":"Information","MessageTemplate":"Custom seeding finished","RenderedMessage":"Custom seeding finished","Properties":{"SourceContext":"Org.Eclipse.TractusX.Portal.Backend.Framework.Seeding.DbSeeder","MachineName":"portaldev-portal-migrations-lkwhq","ProcessId":1,"ThreadId":7,"Application":"Org.Eclipse.TractusX.Portal.Backend.PortalBackend.Migrations"}}
[04:32:46 INF] Process Shutting down...
{"Timestamp":"2024-08-09T04:32:46.0721849+00:00","Level":"Information","MessageTemplate":"Process Shutting down...","RenderedMessage":"Process Shutting down...","Properties":{"MachineName":"portaldev-portal-migrations-lkwhq","ProcessId":1,"ThreadId":7,"Application":"Org.Eclipse.TractusX.Portal.Backend.PortalBackend.Migrations"}}

@evegufy
Copy link
Contributor

evegufy commented Aug 13, 2024

@anjuchaurasiya so the new roles are also available in your environment?

  • BPDM Sharing Admin
  • BPDM Sharing Input Manager
  • BPDM Sharing Input Consumer
  • BPDM Sharing Output Consumer
  • BPDM Pool Admin
  • BPDM Pool Consumer

@anjuchaurasiya
Copy link
Author

@evegufy yes, all these new roles are also present:

user_option

@evegufy
Copy link
Contributor

evegufy commented Aug 14, 2024

thanks for the feedback!
@Phil91 do you have an idea, how the roles can be still there when they were removed with eclipse-tractusx/portal-backend@07832c1 and the migration ran?

@MaximilianHauer MaximilianHauer added this to the Release 24.12 milestone Sep 6, 2024
@Phil91
Copy link
Member

Phil91 commented Sep 16, 2024

@evegufy sorry completely overlooked this issue.

I think since we don't have a delete seeder in place and I don't see a migration where the roles are removed this needs to be done manually.

@anjuchaurasiya fyi

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: IN PROGRESS
Development

No branches or pull requests

4 participants