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

Service refuses to launch if superadmin user has been removed #290

Open
cailyoung opened this issue Nov 23, 2023 · 2 comments
Open

Service refuses to launch if superadmin user has been removed #290

cailyoung opened this issue Nov 23, 2023 · 2 comments

Comments

@cailyoung
Copy link

Upgraded to 5.10.0 recently in our production system and this service refused to launch, because we had removed the bootstrap superadmin user. I would have expected the service to skip past the superadmin password initialiser and continue to launch, rather than crash.

@cailyoung
Copy link
Author

We ended up adding a new superadmin without any privileges in order to allow the service to start.

@malmor
Copy link

malmor commented Feb 6, 2024

Hey, we just ran into this issue after upgrading from v5.7.2 to v5.10.0. The service-authorization container keeps restarting and throws an EntityNotFoundException exception:

image

We managed to use the same workaround and manually created the superadmin user in the database:

docker compose exec -it postgres psql -U rpuser reportportal
\dt
\d users

SELECT * FROM users WHERE login LIKE 'superadmin';
(0 rows)

INSERT INTO users (login, email, role, type, expired)
  VALUES (‘superadmin’, ‘[email protected]’, ‘USER’, ‘INTERNAL’, FALSE);

SELECT * FROM users WHERE login LIKE 'superadmin';
(1 row)

Afterwards the service was able to start without any issues and we were able to log in again.

I think the AdminPasswordInitializer should be updated to allow the absence of the superadmin user - because some deployments might want to remove it in favour of personalized admin accounts.

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

2 participants