VMware Cloud Community
rkrichevskiy
Enthusiast
Enthusiast
Jump to solution

Configuration element update - secure string

Is there a way to update configuration element attribute value of secure string type? Using one of the PSO examples, my secure string value turns into regular string once it is inserted into configuration element using setAttributeWithKey().

Thanks.

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Could you attach this sample?

How are you inserting it into configuration element? Does the configuration element already have such attribute of type SecureString, and calling setAttributeWithKey() changes its type to plain string? Or perhaps the configuration element does not have such attribute yet, and calling setAttributeWithKey() inserts a new attribute of type string instead of SecureString?

View solution in original post

Reply
0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Could you attach this sample?

How are you inserting it into configuration element? Does the configuration element already have such attribute of type SecureString, and calling setAttributeWithKey() changes its type to plain string? Or perhaps the configuration element does not have such attribute yet, and calling setAttributeWithKey() inserts a new attribute of type string instead of SecureString?

Reply
0 Kudos
rkrichevskiy
Enthusiast
Enthusiast
Jump to solution

Oh wow... yes, you're absolutely correct. I was inserting a brand new attribute; but if I pre-populate dummy value in the config element, then run configElement.setAttributeWithKey("attrName",attrValue); my dummy value is in fact updated as a secure string type.

Much obliged.

Reply
0 Kudos