Adding encryption flag

CLOUDSTACK-3308
UCS:DB: UCS Manager password should not get stored in plain text.
This commit is contained in:
Amogh Vasekar 2013-07-19 16:17:45 -07:00 committed by frank
parent 04cdd90a84
commit 5ff83e9c31

View File

@ -5,9 +5,9 @@
// to you under the Apache License, Version 2.0 (the // to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance // "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at // with the License. You may obtain a copy of the License at
// //
// http://www.apache.org/licenses/LICENSE-2.0 // http://www.apache.org/licenses/LICENSE-2.0
// //
// Unless required by applicable law or agreed to in writing, // Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an // software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@ -27,6 +27,8 @@ import javax.persistence.Table;
import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity; import org.apache.cloudstack.api.InternalIdentity;
import com.cloud.utils.db.Encrypt;
@Entity @Entity
@Table(name="ucs_manager") @Table(name="ucs_manager")
public class UcsManagerVO implements InternalIdentity, Identity { public class UcsManagerVO implements InternalIdentity, Identity {
@ -50,16 +52,19 @@ public class UcsManagerVO implements InternalIdentity, Identity {
@Column(name="username") @Column(name="username")
private String username; private String username;
@Encrypt
@Column(name="password") @Column(name="password")
private String password; private String password;
public long getId() { @Override
public long getId() {
return id; return id;
} }
public void setId(long id) { public void setId(long id) {
this.id = id; this.id = id;
} }
public String getUuid() { @Override
public String getUuid() {
return uuid; return uuid;
} }
public void setUuid(String uuid) { public void setUuid(String uuid) {