You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/02/28 01:18:19 UTC

[GitHub] [incubator-shardingsphere] ppourali opened a new issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

ppourali opened a new issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507
 
 
   Hello,
   
   My questions is that, when we run SELECT * FROM Table1, it returns both plain column and cipher column , which is not a good idea because what would be the point of encryption then?! However, when we run SELECT column from Table1, it returns the encrypted column only. Are we doing anything wrong?
   
   Thanks,
   Parsa

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507#issuecomment-596206494
 
 
   Fixed at #4637

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] zhongjiajie commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on issue #4507:
URL: https://github.com/apache/shardingsphere/issues/4507#issuecomment-766718288


   > Hi @dongzl ,
   > 
   > My expectation is that, when I do SELECT *, I _only_ get the cipher column (we don't want to expose the plain column to the users). So. basically the expectation is that we get only the encrypted data. Let's say we never want to expose the plain (decrypted data to some users).
   > 
   > Thanks,
   > Parsa
   
   @terrymanu @tristaZero  So, do we support return only encrypt columns for now? And how


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] zhongjiajie edited a comment on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
zhongjiajie edited a comment on issue #4507:
URL: https://github.com/apache/shardingsphere/issues/4507#issuecomment-766718288


   > Hi @dongzl ,
   > 
   > My expectation is that, when I do SELECT *, I _only_ get the cipher column (we don't want to expose the plain column to the users). So. basically the expectation is that we get only the encrypted data. Let's say we never want to expose the plain (decrypted data to some users).
   > 
   > Thanks,
   > Parsa
   
   @terrymanu @tristaZero  So, do we support return only encrypt columns for now? And how?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] ppourali commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
ppourali commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507#issuecomment-592536060
 
 
   Hi @dongzl ,
   
   Thanks for the reply. 
   **Here is my config-encrypt.yaml:**
   `
   schemaName: anonymized_db
   
   dataSource:
     url: jdbc:postgresql://127.0.0.1:5432/database?serverTimezone=UTC&useSSL=false
     username: dbuser
     password: database
     connectionTimeoutMilliseconds: 30000
     idleTimeoutMilliseconds: 60000
     maxLifetimeMilliseconds: 1800000
     maxPoolSize: 50
   
   encryptRule:
     encryptors:
       encryptor_aes:
         type: aes
         props:
           aes.key.value: 123456abc
       encryptor_md5:
         type: md5
     tables:
       test:
         columns:
           data:
             plainColumn: data
             cipherColumn: data_anonymized
             encryptor: encryptor_md5
   `
   
   **Here is the create script for my test table:**
   `
   create table public.test (
   id INTEGER not null,
   	name character varying (20),
   	data text,
   	data_anonymized text
   )
   `
   The data column is what we want to be encrypted. When we run "SELECT * FROM test", it returns both the data and the data_anonymized column. But we expect to only return the data_anonymized column. We use psql shell to run the queries and connect to port 3307.
   
   Please advise.
   
   Thanks,
   Parsa
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] dongzl commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
dongzl commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507#issuecomment-592891095
 
 
   Hi @ppourali , what's your Sharding-Proxy's version?
   
   I use Sharding-Proxy's lastest version and recurrent your problem.
   
   Your expect to only return the `data_anonymized` column, not include `data ` column?
   
   But what's your expect `data_anonymized`'s value?  `original encrypted data` or `data after decryption`?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] zhongjiajie commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on issue #4507:
URL: https://github.com/apache/shardingsphere/issues/4507#issuecomment-766718288


   > Hi @dongzl ,
   > 
   > My expectation is that, when I do SELECT *, I _only_ get the cipher column (we don't want to expose the plain column to the users). So. basically the expectation is that we get only the encrypted data. Let's say we never want to expose the plain (decrypted data to some users).
   > 
   > Thanks,
   > Parsa
   
   @terrymanu @tristaZero  So, do we support return only encrypt columns for now? And how


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] ppourali edited a comment on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
ppourali edited a comment on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507#issuecomment-592536060
 
 
   Hi @dongzl ,
   
   Thanks for the reply. 
   **Here is my config-encrypt.yaml:**
   
   schemaName: anonymized_db
   dataSource:
     url: jdbc:postgresql://127.0.0.1:5432/database?serverTimezone=UTC&useSSL=false
     username: dbuser
     password: database
     connectionTimeoutMilliseconds: 30000
     idleTimeoutMilliseconds: 60000
     maxLifetimeMilliseconds: 1800000
     maxPoolSize: 50
   
   encryptRule:
     encryptors:
       encryptor_aes:
         type: aes
         props:
           aes.key.value: 123456abc
       encryptor_md5:
         type: md5
     tables:
       test:
         columns:
           data:
             plainColumn: data
             cipherColumn: data_anonymized
             encryptor: encryptor_md5
   
   **Here is the create script for my test table:**
   ` create table public.test (
    id INTEGER not null,
    name character varying (20),
    data text,
    data_anonymized text
   )`
   The data column is what we want to be encrypted. When we run "SELECT * FROM test", it returns both the data and the data_anonymized column. But we expect to only return the data_anonymized column. We use psql shell to run the queries and connect to port 3307.
   
   Please advise.
   
   Thanks,
   Parsa
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507#issuecomment-595193467
 
 
   @ppourali Hi, thanks for your feedback, and I got your point.
   It is a bug obviously and we will fix this bug ASAP.
   
   Cheers,
   Trista

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero edited a comment on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507#issuecomment-595193467
 
 
   @ppourali Hi, thanks for your feedback, and I got your point.
   It is a bug obviously and we will fix this issue ASAP.
   
   Cheers,
   Trista

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] ppourali commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
ppourali commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507#issuecomment-593461492
 
 
   Hi @dongzl ,
   
   My expectation is that,  when I do SELECT *, I *only* get the cipher column (we don't want to expose the plain column to the users). So. basically the expectation is that we get only the encrypted data. Let's say we never want to expose the plain (decrypted data to some users).
   
   Thanks,
   Parsa

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] zhongjiajie edited a comment on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
zhongjiajie edited a comment on issue #4507:
URL: https://github.com/apache/shardingsphere/issues/4507#issuecomment-766718288


   > Hi @dongzl ,
   > 
   > My expectation is that, when I do SELECT *, I _only_ get the cipher column (we don't want to expose the plain column to the users). So. basically the expectation is that we get only the encrypted data. Let's say we never want to expose the plain (decrypted data to some users).
   > 
   > Thanks,
   > Parsa
   
   @terrymanu @tristaZero  So, do we support return only encrypt columns for now? And how?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] dongzl commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
dongzl commented on issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507#issuecomment-592380372
 
 
   Hi @ppourali , can you show more details, what's your configuration and table structure and so on?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu closed issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4507: "Select * From table" returns both plain and cipher columns in the resultset in Sharding-Proxy
URL: https://github.com/apache/incubator-shardingsphere/issues/4507
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services