Requires changing admin password after upgrade #673

Closed
opened 2024-07-02 09:55:56 +00:00 by william-elastisys · 4 comments
william-elastisys commented 2024-07-02 09:55:56 +00:00 (Migrated from gitea.com)

Hello!

After upgrading from v9.0.4 to v10.2.0 it seems I'm now required to change the password of the configured admin user after upgrading the system.

It seems the password update happens at this line:
1ac39a6f5d/templates/gitea/init.yaml (L117)

And this command now has an option:

$ gitea admin user change-password --help
...
--must-change-password         User must change password (can be disabled by --must-change-password=false) (default: true)

Which defaults to true so after the command has been run, the password must be changed (again) manually for the user to be active.

I'm not sure if there is another way to configure the admin user without having to change the password? Or would this option need to be added to this command?

Hello! After upgrading from v9.0.4 to v10.2.0 it seems I'm now required to change the password of the configured admin user after upgrading the system. It seems the password update happens at this line: https://gitea.com/gitea/helm-chart/src/commit/1ac39a6f5dd0dc09c2fd933f79d75d883bf4278d/templates/gitea/init.yaml#L117 And this command now has an option: ```sh $ gitea admin user change-password --help ... --must-change-password User must change password (can be disabled by --must-change-password=false) (default: true) ``` Which defaults to `true` so after the command has been run, the password must be changed (again) manually for the user to be active. I'm not sure if there is another way to configure the admin user without having to change the password? Or would this option need to be added to this command?
justusbunsi commented 2024-07-02 16:14:01 +00:00 (Migrated from gitea.com)

Thanks for bringing this to our attention. It seems related to https://github.com/go-gitea/gitea/pull/27626 and was not marked as breaking change.
To fix the issue in the Helm Chart, we'd need to add the flag to the command. I remember it being tricky for boolean flags in our context. If you feel comfortable enough, you can open a PR to fix this issue. If you feel extra comfortable, I suggest also make it customizable in values.yaml.

Thanks for bringing this to our attention. It seems related to https://github.com/go-gitea/gitea/pull/27626 and was not marked as breaking change. To fix the issue in the Helm Chart, we'd need to add the flag to the command. I remember it being tricky for boolean flags in our context. If you feel comfortable enough, you can open a PR to fix this issue. If you feel extra comfortable, I suggest also make it customizable in values.yaml.
pat-s commented 2024-07-03 07:03:26 +00:00 (Migrated from gitea.com)

I just tried to replicate this and I failed. Here's what I did:

  1. Deploy a fresh instance using chart version 10.2.0

-> The default gitea_admin user was "activated" after login

  1. Deleted the pod so it gets recreated

-> No password change request, user still activated

@william-elastisys
Can you share more info about your setup? Are you using a custom username and that user was not the initial admin of that instance?

I just tried to replicate this and I failed. Here's what I did: 1. Deploy a fresh instance using chart version 10.2.0 -> The default `gitea_admin` user was "activated" after login 2. Deleted the pod so it gets recreated -> No password change request, user still activated @william-elastisys Can you share more info about your setup? Are you using a custom username and that user was not the initial admin of that instance?
william-elastisys commented 2024-07-03 07:50:05 +00:00 (Migrated from gitea.com)

Hello! Yes, the username of my admin user is just gitea:

gitea:
  admin:
    username: gitea
  • So if I deploy a fresh gitea with the latest chart, everything works fine, no password change required.
  • But then if I restart gitea I'm forced to update the password for the gitea user
Hello! Yes, the username of my admin user is just `gitea`: ```yaml gitea: admin: username: gitea ``` - So if I deploy a fresh gitea with the latest chart, everything works fine, no password change required. - But then if I restart gitea I'm forced to update the password for the `gitea` user
pat-s commented 2024-07-03 08:04:17 +00:00 (Migrated from gitea.com)

Thanks! I'll try later with a custom username, maybe this is important point.

Thanks! I'll try later with a custom username, maybe this is important point.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#673
No description provided.