未验证 提交 f4304706 编写于 作者: K KubeSphere CI Bot 提交者: GitHub

Merge pull request #2730 from wansir/iam

remove LastAppliedConfig annotation after password encrypted
...@@ -367,6 +367,8 @@ func (c *Controller) ensurePasswordIsEncrypted(user *iamv1alpha2.User) (*iamv1al ...@@ -367,6 +367,8 @@ func (c *Controller) ensurePasswordIsEncrypted(user *iamv1alpha2.User) (*iamv1al
if user.Annotations == nil { if user.Annotations == nil {
user.Annotations = make(map[string]string, 0) user.Annotations = make(map[string]string, 0)
} }
// ensure plain text password won't be kept anywhere
delete(user.Annotations, corev1.LastAppliedConfigAnnotation)
user.Annotations[iamv1alpha2.PasswordEncryptedAnnotation] = "true" user.Annotations[iamv1alpha2.PasswordEncryptedAnnotation] = "true"
user.Status = iamv1alpha2.UserStatus{ user.Status = iamv1alpha2.UserStatus{
State: iamv1alpha2.UserActive, State: iamv1alpha2.UserActive,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册