Skip to content

ORC-529: Allow configuration and table properties to control encryption.#415

Closed
omalley wants to merge 1 commit intoapache:masterfrom
omalley:orc-529
Closed

ORC-529: Allow configuration and table properties to control encryption.#415
omalley wants to merge 1 commit intoapache:masterfrom
omalley:orc-529

Conversation

@omalley
Copy link
Contributor

@omalley omalley commented Jul 27, 2019

We need to allow the configuration to control encryption. This PR changes a few things:

  • Factors a lot of the parsing of type names out of TypeDescription into the new ParserUtils.
  • Changes the WriterOptions to have a string for encryption and one for masking.
  • Uses annotations on the types based on the options. The user can also use type annotations to control encryption.
  • Allows control of the KeyProvider using an ORC property.
  • Adds a cache for the KeyProviders.
  • Moves KeyProvider interface out of HadoopShims.
  • Adds a service loader for ORC key providers so that we can use ORC key providers even if the Hadoop version doesn't support them.
  • Fixes the TypeDecription.clone and equals for type attributes.
  • Tests both the Hadoop KeyProvider API as well as the in memory key provider.

@omalley omalley force-pushed the orc-529 branch 4 times, most recently from d2a501e to 635fe42 Compare August 2, 2019 06:12
Fixes apache#415

Signed-off-by: Owen O'Malley <omalley@apache.org>
@jsnorman
Copy link

hi omalley , currently i want to use the orc encryption and mask feature, but i can not find any manual about how to used in hive?
i create a hive table in hive shell like this
create table testorc (
name string
) stored as orc tblproperties ("orc.mask"="sha256:name",
"orc.encrypt"="pii:name");
since i want to test the column 'name' can be masked, but i failed.
can you provide tutorial about how to use this feature.

@daddy-sunday
Copy link

I also have this requirement. Do you know how to use it

@dongjoon-hyun
Copy link
Member

I didn't tried it in Hive, but Apache ORC provides a document for Apache Spark.

CREATE TABLE encrypted (
  ssn STRING,
  email STRING,
  name STRING
)
USING ORC
OPTIONS (
  hadoop.security.key.provider.path "kms://http@localhost:9600/kms",
  orc.key.provider "hadoop",
  orc.encrypt "pii:ssn,email",
  orc.mask "nullify:ssn;sha256:email"
)

zratkai pushed a commit to zratkai/orc that referenced this pull request Jun 20, 2024
…rol encryption.

Fixes apache#415

Signed-off-by: Owen O'Malley <omalley@apache.org>
Change-Id: I6bc1198c5a8a20a12453c59cab2cc9aaa1f4f3fa
zratkai pushed a commit to zratkai/orc that referenced this pull request Jun 20, 2024
…rol encryption.

Fixes apache#415

Signed-off-by: Owen O'Malley <omalley@apache.org>
Change-Id: I25795e9dd8757ec2b7aa54cb3933aabf983c7a1e
zratkai pushed a commit to zratkai/orc that referenced this pull request Jun 20, 2024
…rol encryption.

Fixes apache#415

Signed-off-by: Owen O'Malley <omalley@apache.org>
Change-Id: I25795e9dd8757ec2b7aa54cb3933aabf983c7a1e
zratkai pushed a commit to zratkai/orc that referenced this pull request Jun 20, 2024
…rol encryption.

Fixes apache#415

Signed-off-by: Owen O'Malley <omalley@apache.org>
Change-Id: Ia91341c11c093eef947fd508ca8e7a9b3cda637d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants