Helper that checks to see if we should encrypt the packets between HBase based on the client config. If the client has set "integrity" or "privacy" then the packets will be encrypted. If set to "authentication" then no encryption is used. Any other value will throw an exception @return A string to c
()
| 170 | * the three strings above. |
| 171 | */ |
| 172 | private String parseQOP() { |
| 173 | final String protection = config.hasProperty(RPC_QOP_KEY) ? |
| 174 | config.getString(RPC_QOP_KEY) : "authentication"; |
| 175 | |
| 176 | if ("integrity".equalsIgnoreCase(protection)) { |
| 177 | return "auth-int"; |
| 178 | } |
| 179 | if ("privacy".equalsIgnoreCase(protection)) { |
| 180 | return "auth-conf"; |
| 181 | } |
| 182 | if ("authentication".equalsIgnoreCase(protection)) { |
| 183 | return "auth"; |
| 184 | } |
| 185 | throw new IllegalArgumentException("Unrecognized rpc protection level: " |
| 186 | + protection); |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * When QOP of auth-int or auth-conf is selected |
no test coverage detected