on 12-28-2018 12:15 PM
I have to encrypt a field value which is of type String. Below is the declaration:
<attribute qualifier="value" type="java.lang.String">
<persistence type="property">
<columntype>
<value>HYBRIS.LONG_STRING</value>
</columntype>
</persistence>
<modifiers encrypted="true"/>
</attribute>
When I see this field in Backoffice, it displays as plain text but if I search this using the flexible search then I see the encrypted value. I want this encrypted value to be displayed in Backoffice but not the plain text. I see that in OOTB for some attributes with encrypted="true" , the encrypted value is displayed in Backoffice. Am I missing anything? Thanks in advance.
The FS Query returns exactly the same data which is stored in the database and therefore you see the encrypted value with FS Query. AFAIK, backoffice does not display the data of an encrypted field in the encrypted form e.g. the Password Question field of a user (customer or employee) always displays the decrypted value in backoffice although it is marked as encrypted=true
in items.xml.
I can't think of any use case to display the encrypted data in backoffice. It is like displaying ********
for a password field. What will a backoffice user do with an encrypted value? Instead of displaying an encrypted value, it's better not to display it at all.
Note: the 'Migrate' functionality at https://localhost:9002/maintain/keys has nothing to do with the display. It is used to migrate the old unencrypted values to encrypted values. Once an attribute has been built with encrypted=true
, all new/updated values will automatically be saved in encrypted form in the database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did value
attribute already exist before you added the encrypted
modifier?
Any existing data is not encrypted. You can trigger the encryption by clicking the Migrate
button here: https://localhost:9002/maintain/keys After that, the data should be encrypted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.