Skip to content

feat: Support multi-user and role management#12588

Closed
ssongliu wants to merge 4 commits intodev-v2from
pr@dev-v2@feat_xpack_ee
Closed

feat: Support multi-user and role management#12588
ssongliu wants to merge 4 commits intodev-v2from
pr@dev-v2@feat_xpack_ee

Conversation

@ssongliu
Copy link
Copy Markdown
Member

No description provided.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Apr 23, 2026

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Apr 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zhengkunwang223 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 707fc24fb5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread core/app/auth/auth.go
return BeginMFALogin(c, nameSetting.Value, entrance, mfaSetting.Value), "", nil
}

sessionUser := psession.SessionUser{ID: psession.SuperAdminSessionUserID, Name: info.Name, Role: "ADMIN"}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Enforce username match before creating login session

Login validates only the password and never verifies that info.Name matches the configured account, then writes info.Name into the session. With MFA disabled, anyone with the correct password can authenticate as an arbitrary displayed username, which breaks identity/audit semantics and enables user impersonation in logs/UI. Either reject mismatched usernames (as before) or always bind the session name to the stored user record.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment on lines +72 to +75
request.oldPassword = Base64.encode(request.oldPassword);
}
if (request.password) {
request.password = Base64.encode(request.password);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove incompatible Base64 encoding in profile password update

This client now Base64-encodes oldPassword/password before calling /core/auth/current/update, but the server path (auth.UpdateCurrentUserInfo -> auth.HandlePasswordExpired) compares the old password as plaintext against the decrypted stored password and does not decode Base64 first. As a result, changing password from the user profile will consistently fail with an initial-password mismatch. Keep the payload plaintext (or add server-side decoding) so password updates work.

Useful? React with πŸ‘Β / πŸ‘Ž.

Comment thread core/router/ro_setting.go
Comment on lines 21 to +23
router.POST("/search", baseApi.GetSettingInfo)
router.POST("/expired/handle", baseApi.HandlePasswordExpired)
router.POST("/search/base", baseApi.GetSettingBaseInfo)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore a handler for expired-password reset endpoint

The settings router no longer registers /core/settings/expired/handle, but the expired-password flow still posts to that endpoint from the frontend (setting/expired.vue via handleExpired), and middleware still treats that path as a special case. When users are redirected after HTTP 313, submitting a new password now hits a missing route instead of resetting credentials. Reintroduce the route or migrate the frontend flow to the new auth endpoint.

Useful? React with πŸ‘Β / πŸ‘Ž.

@ssongliu ssongliu closed this Apr 23, 2026
@ssongliu ssongliu deleted the pr@dev-v2@feat_xpack_ee branch April 23, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants