You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by marjana <mi...@us.ibm.com> on 2019/01/23 22:04:43 UTC

how do disable encryption on a CF

Hello,

I setup hbase encryption and enabled it on a subset of tables. 
I am looking for a way to revert back to non encrypted tables without having
to recreate a new set of tables and copy data from encrypted to
nonencrypted.

I have tried in hbase shell a few ways but can't get it to work:

alter 't1',{NAME => 'e', ENCRYPTION => ''}

ERROR: java.io.IOException: Cipher  previously failed test
	at
org.apache.hadoop.hbase.util.EncryptionTest.testEncryption(EncryptionTest.java:155)


alter 't1',{NAME => 'e', ENCRYPTION => 'NONE'}

ERROR: java.io.IOException: Cipher NONE previously failed test
	at
org.apache.hadoop.hbase.util.EncryptionTest.testEncryption(EncryptionTest.java:155)



Is there a way to make this work?
Thanks!





--
Sent from: http://apache-hbase.679495.n3.nabble.com/HBase-User-f4020416.html

Re: how do disable encryption on a CF

Posted by Anoop John <an...@gmail.com>.
And once you successfully reset the encryption for ur table:cf,  do run a
major compaction for the table:cf so that encrypted data will get rewritten
and this with no encryption.  Pls remember that major compaction will have
lots of IO and putting load on your RS too..  It depends on total  data
size getting compacted.. Pls keep that in mind and schedule

Anoop

On Thu, Jan 24, 2019 at 9:49 PM marjana <mi...@us.ibm.com> wrote:

> Thanks for the info!
>
>
>
> --
> Sent from:
> http://apache-hbase.679495.n3.nabble.com/HBase-User-f4020416.html
>

Re: how do disable encryption on a CF

Posted by marjana <mi...@us.ibm.com>.
Thanks for the info!



--
Sent from: http://apache-hbase.679495.n3.nabble.com/HBase-User-f4020416.html

Re: how do disable encryption on a CF

Posted by Wellington Chevreuil <we...@gmail.com>.
I believe this is a limitation from hbase shell, where it provides no means
to set a null value for a column family property. An alternative would be
to use Java Client API, below a code example:

    Configuration configuration =  HBaseConfiguration.create();

    try(Connection connection =
ConnectionFactory.createConnection(configuration)){
      Admin admin = connection.getAdmin();
      ColumnFamilyDescriptorBuilder descriptorBuilder =
ColumnFamilyDescriptorBuilder.newBuilder(Bytes.toBytes(args[1]));
      descriptorBuilder.setEncryptionType(null);
      admin.modifyColumnFamily(TableName.valueOf(args[0]),
descriptorBuilder.build());
    } finally {

    }

If you really want/need to have this functionality working from shell, then
an alternative would be to create your own Master coprocessor, where
in preModifyTable method you would check the ColumnFamilyDescriptor value
for ENCRYPTION property, replacing 'NONE' or '' values by null.

Em qua, 23 de jan de 2019 às 16:04, marjana <mi...@us.ibm.com> escreveu:

> Hello,
>
> I setup hbase encryption and enabled it on a subset of tables.
> I am looking for a way to revert back to non encrypted tables without
> having
> to recreate a new set of tables and copy data from encrypted to
> nonencrypted.
>
> I have tried in hbase shell a few ways but can't get it to work:
>
> alter 't1',{NAME => 'e', ENCRYPTION => ''}
>
> ERROR: java.io.IOException: Cipher  previously failed test
>         at
>
> org.apache.hadoop.hbase.util.EncryptionTest.testEncryption(EncryptionTest.java:155)
>
>
> alter 't1',{NAME => 'e', ENCRYPTION => 'NONE'}
>
> ERROR: java.io.IOException: Cipher NONE previously failed test
>         at
>
> org.apache.hadoop.hbase.util.EncryptionTest.testEncryption(EncryptionTest.java:155)
>
>
>
> Is there a way to make this work?
> Thanks!
>
>
>
>
>
> --
> Sent from:
> http://apache-hbase.679495.n3.nabble.com/HBase-User-f4020416.html
>