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

Fix role error in provisioning startup #428

Merged
merged 4 commits into from
Nov 15, 2024
Merged

Fix role error in provisioning startup #428

merged 4 commits into from
Nov 15, 2024

Conversation

byewokko
Copy link
Collaborator

Issue

When service starts in provisioning mode:

12-Nov-2024 11:09:25.732780 ERROR asab.application Error during service initialization
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/asab/application.py", line 730, in _ensure_initialization
    await service.initialize(self)
  File "/app/seacat-auth/seacatauth/provisioning/service.py", line 101, in initialize
    await self.RoleService.create(self.SuperroleID)
  File "/app/seacat-auth/seacatauth/authz/role/service.py", line 236, in create
    self.validate_superuser_access()
  File "/app/seacat-auth/seacatauth/authz/role/service.py", line 298, in validate_superuser_access
    raise exceptions.AccessDeniedError(
seacatauth.exceptions.AccessDeniedError: Not authorized to access 'authz:superuser'.

Solution

Remove duplicate superuser role initialization - it is already handled by RoleService.

@byewokko byewokko added the bug Something isn't working label Nov 13, 2024
@byewokko byewokko self-assigned this Nov 13, 2024
@byewokko byewokko merged commit 57d3952 into main Nov 15, 2024
5 checks passed
@byewokko byewokko deleted the fix/provisioning branch November 15, 2024 08:34
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

Successfully merging this pull request may close these issues.

1 participant