Re: Review Request 60043: Ranger KMS should validate key name before importing into DB

2017-07-10 Thread Velmurugan Periasamy

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60043/#review180006
---


Ship it!




Ship It!

- Velmurugan Periasamy


On June 22, 2017, 1:50 p.m., Ankita Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60043/
> ---
> 
> (Updated June 22, 2017, 1:50 p.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
> Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1639
> https://issues.apache.org/jira/browse/RANGER-1639
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Actual :
> Ranger KMS does not validate key name before importing into DB. So the 
> imported key can have special characters in Key name.
> 
> Expected :
> Ranger KMS should validate key name before importing into DB.
> 
> 
> Diffs
> -
> 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java 09b46bc 
>   kms/src/test/java/org/apache/hadoop/crypto/key/kms/TestRangerKeyStore.java 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60043/diff/3/
> 
> 
> Testing
> ---
> 
> Below steps were followed to test this scenario
> 
> 1. Installed Hadoop KMS
> 2. Created encryption keys with combination of special characters, alphabets 
> and numbers
> 3. Installed Ranger KMS
> 4. imported hadoop key jceks to Ranger KMS (Validation was successful)
> 
> 
> Thanks,
> 
> Ankita Sinha
> 
>



Re: Review Request 60043: Ranger KMS should validate key name before importing into DB

2017-06-22 Thread Ankita Sinha


> On June 13, 2017, 12:20 p.m., Colm O hEigeartaigh wrote:
> > Ship It!
> 
> Colm O hEigeartaigh wrote:
> Actually, is it feasible to add some unit tests for this?

Thanks Colm, added unit tests.


- Ankita


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60043/#review177731
---


On June 22, 2017, 1:50 p.m., Ankita Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60043/
> ---
> 
> (Updated June 22, 2017, 1:50 p.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
> Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1639
> https://issues.apache.org/jira/browse/RANGER-1639
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Actual :
> Ranger KMS does not validate key name before importing into DB. So the 
> imported key can have special characters in Key name.
> 
> Expected :
> Ranger KMS should validate key name before importing into DB.
> 
> 
> Diffs
> -
> 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java 09b46bc 
>   kms/src/test/java/org/apache/hadoop/crypto/key/kms/TestRangerKeyStore.java 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60043/diff/3/
> 
> 
> Testing
> ---
> 
> Below steps were followed to test this scenario
> 
> 1. Installed Hadoop KMS
> 2. Created encryption keys with combination of special characters, alphabets 
> and numbers
> 3. Installed Ranger KMS
> 4. imported hadoop key jceks to Ranger KMS (Validation was successful)
> 
> 
> Thanks,
> 
> Ankita Sinha
> 
>



Re: Review Request 60043: Ranger KMS should validate key name before importing into DB

2017-06-22 Thread Ankita Sinha

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60043/
---

(Updated June 22, 2017, 1:50 p.m.)


Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
Polavarapu, and Velmurugan Periasamy.


Changes
---

Added unit test


Bugs: RANGER-1639
https://issues.apache.org/jira/browse/RANGER-1639


Repository: ranger


Description
---

Actual :
Ranger KMS does not validate key name before importing into DB. So the imported 
key can have special characters in Key name.

Expected :
Ranger KMS should validate key name before importing into DB.


Diffs (updated)
-

  kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java 09b46bc 
  kms/src/test/java/org/apache/hadoop/crypto/key/kms/TestRangerKeyStore.java 
PRE-CREATION 


Diff: https://reviews.apache.org/r/60043/diff/3/

Changes: https://reviews.apache.org/r/60043/diff/2-3/


Testing
---

Below steps were followed to test this scenario

1. Installed Hadoop KMS
2. Created encryption keys with combination of special characters, alphabets 
and numbers
3. Installed Ranger KMS
4. imported hadoop key jceks to Ranger KMS (Validation was successful)


Thanks,

Ankita Sinha



Re: Review Request 60043: Ranger KMS should validate key name before importing into DB

2017-06-13 Thread Ankita Sinha

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60043/
---

(Updated June 13, 2017, 12:06 p.m.)


Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
Polavarapu, and Velmurugan Periasamy.


Changes
---

Updated Review request with review comments


Bugs: RANGER-1639
https://issues.apache.org/jira/browse/RANGER-1639


Repository: ranger


Description
---

Actual :
Ranger KMS does not validate key name before importing into DB. So the imported 
key can have special characters in Key name.

Expected :
Ranger KMS should validate key name before importing into DB.


Diffs (updated)
-

  kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java c4f7267 


Diff: https://reviews.apache.org/r/60043/diff/2/

Changes: https://reviews.apache.org/r/60043/diff/1-2/


Testing
---

Below steps were followed to test this scenario

1. Installed Hadoop KMS
2. Created encryption keys with combination of special characters, alphabets 
and numbers
3. Installed Ranger KMS
4. imported hadoop key jceks to Ranger KMS (Validation was successful)


Thanks,

Ankita Sinha



Re: Review Request 60043: Ranger KMS should validate key name before importing into DB

2017-06-13 Thread Ankita Sinha


- Ankita


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60043/#review177725
---


On June 13, 2017, 12:06 p.m., Ankita Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60043/
> ---
> 
> (Updated June 13, 2017, 12:06 p.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
> Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1639
> https://issues.apache.org/jira/browse/RANGER-1639
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Actual :
> Ranger KMS does not validate key name before importing into DB. So the 
> imported key can have special characters in Key name.
> 
> Expected :
> Ranger KMS should validate key name before importing into DB.
> 
> 
> Diffs
> -
> 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java c4f7267 
> 
> 
> Diff: https://reviews.apache.org/r/60043/diff/2/
> 
> 
> Testing
> ---
> 
> Below steps were followed to test this scenario
> 
> 1. Installed Hadoop KMS
> 2. Created encryption keys with combination of special characters, alphabets 
> and numbers
> 3. Installed Ranger KMS
> 4. imported hadoop key jceks to Ranger KMS (Validation was successful)
> 
> 
> Thanks,
> 
> Ankita Sinha
> 
>



Re: Review Request 60043: Ranger KMS should validate key name before importing into DB

2017-06-13 Thread Ankita Sinha


> On June 13, 2017, 10:31 a.m., Colm O hEigeartaigh wrote:
> > Instead of calling Pattern.compile for each check, it's better to make the 
> > Pattern static + call Pattern.compile once, as the regex itself is static 
> > and doesn't change.

Thanks, Updated the review request.


- Ankita


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60043/#review177725
---


On June 13, 2017, 12:06 p.m., Ankita Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60043/
> ---
> 
> (Updated June 13, 2017, 12:06 p.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
> Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1639
> https://issues.apache.org/jira/browse/RANGER-1639
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Actual :
> Ranger KMS does not validate key name before importing into DB. So the 
> imported key can have special characters in Key name.
> 
> Expected :
> Ranger KMS should validate key name before importing into DB.
> 
> 
> Diffs
> -
> 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java c4f7267 
> 
> 
> Diff: https://reviews.apache.org/r/60043/diff/2/
> 
> 
> Testing
> ---
> 
> Below steps were followed to test this scenario
> 
> 1. Installed Hadoop KMS
> 2. Created encryption keys with combination of special characters, alphabets 
> and numbers
> 3. Installed Ranger KMS
> 4. imported hadoop key jceks to Ranger KMS (Validation was successful)
> 
> 
> Thanks,
> 
> Ankita Sinha
> 
>



Re: Review Request 60043: Ranger KMS should validate key name before importing into DB

2017-06-13 Thread Colm O hEigeartaigh

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60043/#review177725
---



Instead of calling Pattern.compile for each check, it's better to make the 
Pattern static + call Pattern.compile once, as the regex itself is static and 
doesn't change.

- Colm O hEigeartaigh


On June 13, 2017, 10:07 a.m., Ankita Sinha wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60043/
> ---
> 
> (Updated June 13, 2017, 10:07 a.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja 
> Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1639
> https://issues.apache.org/jira/browse/RANGER-1639
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Actual :
> Ranger KMS does not validate key name before importing into DB. So the 
> imported key can have special characters in Key name.
> 
> Expected :
> Ranger KMS should validate key name before importing into DB.
> 
> 
> Diffs
> -
> 
>   kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java c4f7267 
> 
> 
> Diff: https://reviews.apache.org/r/60043/diff/1/
> 
> 
> Testing
> ---
> 
> Below steps were followed to test this scenario
> 
> 1. Installed Hadoop KMS
> 2. Created encryption keys with combination of special characters, alphabets 
> and numbers
> 3. Installed Ranger KMS
> 4. imported hadoop key jceks to Ranger KMS (Validation was successful)
> 
> 
> Thanks,
> 
> Ankita Sinha
> 
>