├── .dockerignore ├── .gitignore ├── .vscode └── launch.json ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── LICENSE.md ├── README.md ├── integration_test ├── docker-compose.yml ├── ooproxy.postman_collection.json └── test.pfx ├── ooproxy.code-workspace ├── proxy.png └── src ├── main.rs ├── openid.rs └── token.rs /.dockerignore: -------------------------------------------------------------------------------- 1 | target 2 | .git 3 | .gitignore 4 | .vscode 5 | README.md 6 | integration_test 7 | docker-compose.yml 8 | ooproxy.code-workspace -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Launch", 6 | "preLaunchTask": "Rust: cargo build", 7 | "type": "lldb", 8 | "request": "launch", 9 | "program": "${workspaceFolder}/target/debug/deps/ooproxy-e53d7a448be4c5fd", 10 | "cwd": "${workspaceFolder}", 11 | "env": { 12 | "LISTEN_URL": "0.0.0.0:8081", 13 | "PROVIDER_URL": "http://identity", 14 | "UPSTREAM_URL": "http://echo", 15 | "RUST_LOG": "info" 16 | } 17 | }, 18 | { 19 | "name": "Test", 20 | "preLaunchTask": "Rust: cargo test", 21 | "type": "lldb", 22 | "request": "launch", 23 | "program": "${workspaceFolder}/target/debug/deps/ooproxy-5761885a2a048f86", 24 | "cwd": "${workspaceFolder}" 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "MacTypes-sys" 3 | version = "2.1.0" 4 | source = "registry+https://github.com/rust-lang/crates.io-index" 5 | dependencies = [ 6 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 7 | ] 8 | 9 | [[package]] 10 | name = "actix" 11 | version = "0.7.9" 12 | source = "registry+https://github.com/rust-lang/crates.io-index" 13 | dependencies = [ 14 | "actix_derive 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 15 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 16 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 17 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 18 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 19 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 20 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 21 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 22 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 23 | "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 24 | "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 25 | "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 26 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 27 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 28 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 29 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 30 | "tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 31 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 32 | "tokio-timer 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 33 | "trust-dns-proto 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 34 | "trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", 35 | "uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 36 | ] 37 | 38 | [[package]] 39 | name = "actix-net" 40 | version = "0.2.6" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | dependencies = [ 43 | "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", 44 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 45 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 46 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 47 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 48 | "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 49 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 50 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 51 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 52 | "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 53 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 54 | "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 55 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 56 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 57 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 58 | "tokio-timer 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 59 | "tower-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 60 | "trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", 61 | ] 62 | 63 | [[package]] 64 | name = "actix-web" 65 | version = "0.7.18" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | dependencies = [ 68 | "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", 69 | "actix-net 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 70 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 71 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 72 | "brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 73 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 74 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 75 | "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 76 | "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 77 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 78 | "flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 79 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 80 | "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 81 | "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 82 | "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 83 | "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 84 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 85 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 86 | "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 87 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 88 | "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 89 | "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", 90 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 91 | "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 92 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 93 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 94 | "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 95 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 96 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 97 | "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 98 | "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 99 | "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", 100 | "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", 101 | "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 102 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 103 | "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 104 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 105 | "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 106 | "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 107 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 108 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 109 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 110 | "tokio-timer 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 111 | "tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 112 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 113 | "v_htmlescape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 114 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 115 | ] 116 | 117 | [[package]] 118 | name = "actix_derive" 119 | version = "0.3.2" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | dependencies = [ 122 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 123 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 124 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 125 | ] 126 | 127 | [[package]] 128 | name = "adler32" 129 | version = "1.0.3" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | 132 | [[package]] 133 | name = "aho-corasick" 134 | version = "0.6.9" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | dependencies = [ 137 | "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 138 | ] 139 | 140 | [[package]] 141 | name = "arc-swap" 142 | version = "0.3.7" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | 145 | [[package]] 146 | name = "arrayvec" 147 | version = "0.4.10" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | dependencies = [ 150 | "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 151 | ] 152 | 153 | [[package]] 154 | name = "atty" 155 | version = "0.2.11" 156 | source = "registry+https://github.com/rust-lang/crates.io-index" 157 | dependencies = [ 158 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 159 | "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 160 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 161 | ] 162 | 163 | [[package]] 164 | name = "autocfg" 165 | version = "0.1.2" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | 168 | [[package]] 169 | name = "backtrace" 170 | version = "0.3.13" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | dependencies = [ 173 | "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 174 | "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", 175 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 177 | "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 178 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 179 | ] 180 | 181 | [[package]] 182 | name = "backtrace-sys" 183 | version = "0.1.28" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | dependencies = [ 186 | "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", 187 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 188 | ] 189 | 190 | [[package]] 191 | name = "base64" 192 | version = "0.9.3" 193 | source = "registry+https://github.com/rust-lang/crates.io-index" 194 | dependencies = [ 195 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 196 | "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 197 | ] 198 | 199 | [[package]] 200 | name = "base64" 201 | version = "0.10.1" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | dependencies = [ 204 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 205 | ] 206 | 207 | [[package]] 208 | name = "bitflags" 209 | version = "1.0.4" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | 212 | [[package]] 213 | name = "brotli-sys" 214 | version = "0.3.2" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | dependencies = [ 217 | "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", 218 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 219 | ] 220 | 221 | [[package]] 222 | name = "brotli2" 223 | version = "0.3.2" 224 | source = "registry+https://github.com/rust-lang/crates.io-index" 225 | dependencies = [ 226 | "brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 227 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 228 | ] 229 | 230 | [[package]] 231 | name = "build_const" 232 | version = "0.2.1" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | 235 | [[package]] 236 | name = "byteorder" 237 | version = "1.3.1" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | 240 | [[package]] 241 | name = "bytes" 242 | version = "0.4.11" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | dependencies = [ 245 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 246 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 247 | ] 248 | 249 | [[package]] 250 | name = "cc" 251 | version = "1.0.28" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | 254 | [[package]] 255 | name = "cfg-if" 256 | version = "0.1.6" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | 259 | [[package]] 260 | name = "chrono" 261 | version = "0.4.6" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | dependencies = [ 264 | "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 265 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 266 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 267 | ] 268 | 269 | [[package]] 270 | name = "cloudabi" 271 | version = "0.0.3" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | dependencies = [ 274 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 275 | ] 276 | 277 | [[package]] 278 | name = "config" 279 | version = "0.9.2" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | dependencies = [ 282 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 283 | "nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 284 | "rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", 285 | "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 286 | "serde-hjson 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", 287 | "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", 288 | "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", 289 | "yaml-rust 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 290 | ] 291 | 292 | [[package]] 293 | name = "cookie" 294 | version = "0.11.0" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | dependencies = [ 297 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 298 | "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", 299 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 300 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 301 | ] 302 | 303 | [[package]] 304 | name = "core-foundation" 305 | version = "0.5.1" 306 | source = "registry+https://github.com/rust-lang/crates.io-index" 307 | dependencies = [ 308 | "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 309 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 310 | ] 311 | 312 | [[package]] 313 | name = "core-foundation-sys" 314 | version = "0.5.1" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | dependencies = [ 317 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 318 | ] 319 | 320 | [[package]] 321 | name = "crc" 322 | version = "1.8.1" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | dependencies = [ 325 | "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 326 | ] 327 | 328 | [[package]] 329 | name = "crc32fast" 330 | version = "1.1.2" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | dependencies = [ 333 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 334 | ] 335 | 336 | [[package]] 337 | name = "crossbeam" 338 | version = "0.6.0" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | dependencies = [ 341 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 342 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 343 | "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", 344 | "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 345 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 346 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 347 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 348 | "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 349 | ] 350 | 351 | [[package]] 352 | name = "crossbeam-channel" 353 | version = "0.3.8" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | dependencies = [ 356 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 357 | "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 358 | ] 359 | 360 | [[package]] 361 | name = "crossbeam-deque" 362 | version = "0.6.3" 363 | source = "registry+https://github.com/rust-lang/crates.io-index" 364 | dependencies = [ 365 | "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 366 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 367 | ] 368 | 369 | [[package]] 370 | name = "crossbeam-epoch" 371 | version = "0.7.1" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | dependencies = [ 374 | "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", 375 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 376 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 377 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 378 | "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 379 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 380 | ] 381 | 382 | [[package]] 383 | name = "crossbeam-utils" 384 | version = "0.6.5" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | dependencies = [ 387 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 388 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 389 | ] 390 | 391 | [[package]] 392 | name = "dtoa" 393 | version = "0.4.3" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | 396 | [[package]] 397 | name = "encoding" 398 | version = "0.2.33" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | dependencies = [ 401 | "encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 402 | "encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 403 | "encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 404 | "encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 405 | "encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 406 | ] 407 | 408 | [[package]] 409 | name = "encoding-index-japanese" 410 | version = "1.20141219.5" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | dependencies = [ 413 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 414 | ] 415 | 416 | [[package]] 417 | name = "encoding-index-korean" 418 | version = "1.20141219.5" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | dependencies = [ 421 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 422 | ] 423 | 424 | [[package]] 425 | name = "encoding-index-simpchinese" 426 | version = "1.20141219.5" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | dependencies = [ 429 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 430 | ] 431 | 432 | [[package]] 433 | name = "encoding-index-singlebyte" 434 | version = "1.20141219.5" 435 | source = "registry+https://github.com/rust-lang/crates.io-index" 436 | dependencies = [ 437 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 438 | ] 439 | 440 | [[package]] 441 | name = "encoding-index-tradchinese" 442 | version = "1.20141219.5" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | dependencies = [ 445 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 446 | ] 447 | 448 | [[package]] 449 | name = "encoding_index_tests" 450 | version = "0.1.4" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | 453 | [[package]] 454 | name = "env_logger" 455 | version = "0.6.0" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | dependencies = [ 458 | "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 459 | "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 460 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 461 | "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 462 | "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 463 | ] 464 | 465 | [[package]] 466 | name = "error-chain" 467 | version = "0.8.1" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | dependencies = [ 470 | "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 471 | ] 472 | 473 | [[package]] 474 | name = "failure" 475 | version = "0.1.5" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | dependencies = [ 478 | "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 479 | "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 480 | ] 481 | 482 | [[package]] 483 | name = "failure_derive" 484 | version = "0.1.5" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | dependencies = [ 487 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 488 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 489 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 490 | "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 491 | ] 492 | 493 | [[package]] 494 | name = "flate2" 495 | version = "1.0.6" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | dependencies = [ 498 | "crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 499 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 500 | "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 501 | "miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 502 | ] 503 | 504 | [[package]] 505 | name = "fnv" 506 | version = "1.0.6" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | 509 | [[package]] 510 | name = "foreign-types" 511 | version = "0.3.2" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | dependencies = [ 514 | "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 515 | ] 516 | 517 | [[package]] 518 | name = "foreign-types-shared" 519 | version = "0.1.1" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | 522 | [[package]] 523 | name = "fuchsia-cprng" 524 | version = "0.1.0" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | 527 | [[package]] 528 | name = "fuchsia-zircon" 529 | version = "0.3.3" 530 | source = "registry+https://github.com/rust-lang/crates.io-index" 531 | dependencies = [ 532 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 533 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 534 | ] 535 | 536 | [[package]] 537 | name = "fuchsia-zircon-sys" 538 | version = "0.3.3" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | 541 | [[package]] 542 | name = "futures" 543 | version = "0.1.25" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | 546 | [[package]] 547 | name = "futures-cpupool" 548 | version = "0.1.8" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | dependencies = [ 551 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 552 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 553 | ] 554 | 555 | [[package]] 556 | name = "h2" 557 | version = "0.1.16" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | dependencies = [ 560 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 561 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 562 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 563 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 564 | "http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 565 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 566 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 567 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 568 | "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 569 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 570 | ] 571 | 572 | [[package]] 573 | name = "hostname" 574 | version = "0.1.5" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | dependencies = [ 577 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 578 | "winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 579 | ] 580 | 581 | [[package]] 582 | name = "http" 583 | version = "0.1.15" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | dependencies = [ 586 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 587 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 588 | "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 589 | ] 590 | 591 | [[package]] 592 | name = "httparse" 593 | version = "1.3.3" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | 596 | [[package]] 597 | name = "humantime" 598 | version = "1.2.0" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | dependencies = [ 601 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 602 | ] 603 | 604 | [[package]] 605 | name = "idna" 606 | version = "0.1.5" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | dependencies = [ 609 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 610 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 611 | "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 612 | ] 613 | 614 | [[package]] 615 | name = "indexmap" 616 | version = "1.0.2" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | 619 | [[package]] 620 | name = "iovec" 621 | version = "0.1.2" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | dependencies = [ 624 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 625 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 626 | ] 627 | 628 | [[package]] 629 | name = "ipconfig" 630 | version = "0.1.9" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | dependencies = [ 633 | "error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 634 | "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 635 | "widestring 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 636 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 637 | "winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 638 | ] 639 | 640 | [[package]] 641 | name = "itoa" 642 | version = "0.4.3" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | 645 | [[package]] 646 | name = "jsonwebtoken" 647 | version = "5.0.1" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | dependencies = [ 650 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 651 | "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 652 | "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", 653 | "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 654 | "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 655 | "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", 656 | "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 657 | ] 658 | 659 | [[package]] 660 | name = "kernel32-sys" 661 | version = "0.2.2" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | dependencies = [ 664 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 665 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 666 | ] 667 | 668 | [[package]] 669 | name = "language-tags" 670 | version = "0.2.2" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | 673 | [[package]] 674 | name = "lazy_static" 675 | version = "0.2.11" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | 678 | [[package]] 679 | name = "lazy_static" 680 | version = "1.2.0" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | 683 | [[package]] 684 | name = "lazycell" 685 | version = "1.2.1" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | 688 | [[package]] 689 | name = "libc" 690 | version = "0.2.48" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | 693 | [[package]] 694 | name = "linked-hash-map" 695 | version = "0.3.0" 696 | source = "registry+https://github.com/rust-lang/crates.io-index" 697 | dependencies = [ 698 | "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", 699 | "serde_test 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", 700 | ] 701 | 702 | [[package]] 703 | name = "linked-hash-map" 704 | version = "0.4.2" 705 | source = "registry+https://github.com/rust-lang/crates.io-index" 706 | 707 | [[package]] 708 | name = "linked-hash-map" 709 | version = "0.5.1" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | 712 | [[package]] 713 | name = "lock_api" 714 | version = "0.1.5" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | dependencies = [ 717 | "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 718 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 719 | ] 720 | 721 | [[package]] 722 | name = "log" 723 | version = "0.4.6" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | dependencies = [ 726 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 727 | ] 728 | 729 | [[package]] 730 | name = "lru-cache" 731 | version = "0.1.1" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | dependencies = [ 734 | "linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 735 | ] 736 | 737 | [[package]] 738 | name = "matches" 739 | version = "0.1.8" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | 742 | [[package]] 743 | name = "memchr" 744 | version = "2.1.3" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | dependencies = [ 747 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 748 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 749 | ] 750 | 751 | [[package]] 752 | name = "memoffset" 753 | version = "0.2.1" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | 756 | [[package]] 757 | name = "mime" 758 | version = "0.3.13" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | dependencies = [ 761 | "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 762 | ] 763 | 764 | [[package]] 765 | name = "mime_guess" 766 | version = "2.0.0-alpha.6" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | dependencies = [ 769 | "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 770 | "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 771 | "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 772 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 773 | ] 774 | 775 | [[package]] 776 | name = "miniz-sys" 777 | version = "0.1.11" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | dependencies = [ 780 | "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", 781 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 782 | ] 783 | 784 | [[package]] 785 | name = "miniz_oxide" 786 | version = "0.2.1" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | dependencies = [ 789 | "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 790 | ] 791 | 792 | [[package]] 793 | name = "miniz_oxide_c_api" 794 | version = "0.2.1" 795 | source = "registry+https://github.com/rust-lang/crates.io-index" 796 | dependencies = [ 797 | "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", 798 | "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 799 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 800 | "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 801 | ] 802 | 803 | [[package]] 804 | name = "mio" 805 | version = "0.6.16" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | dependencies = [ 808 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 809 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 810 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 811 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 812 | "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 813 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 814 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 815 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 816 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 817 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 818 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 819 | ] 820 | 821 | [[package]] 822 | name = "mio-uds" 823 | version = "0.6.7" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | dependencies = [ 826 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 827 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 828 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 829 | ] 830 | 831 | [[package]] 832 | name = "miow" 833 | version = "0.2.1" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | dependencies = [ 836 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 837 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 838 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 839 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 840 | ] 841 | 842 | [[package]] 843 | name = "native-tls" 844 | version = "0.2.2" 845 | source = "registry+https://github.com/rust-lang/crates.io-index" 846 | dependencies = [ 847 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 848 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 849 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 850 | "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", 851 | "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 852 | "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", 853 | "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", 854 | "security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 855 | "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 856 | "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 857 | ] 858 | 859 | [[package]] 860 | name = "net2" 861 | version = "0.2.33" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | dependencies = [ 864 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 865 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 866 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 867 | ] 868 | 869 | [[package]] 870 | name = "nodrop" 871 | version = "0.1.13" 872 | source = "registry+https://github.com/rust-lang/crates.io-index" 873 | 874 | [[package]] 875 | name = "nom" 876 | version = "4.2.0" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | dependencies = [ 879 | "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 880 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 881 | ] 882 | 883 | [[package]] 884 | name = "num" 885 | version = "0.2.0" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | dependencies = [ 888 | "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 889 | "num-complex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 890 | "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 891 | "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", 892 | "num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 893 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 894 | ] 895 | 896 | [[package]] 897 | name = "num-bigint" 898 | version = "0.2.2" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | dependencies = [ 901 | "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 902 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 903 | ] 904 | 905 | [[package]] 906 | name = "num-complex" 907 | version = "0.2.1" 908 | source = "registry+https://github.com/rust-lang/crates.io-index" 909 | dependencies = [ 910 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 911 | ] 912 | 913 | [[package]] 914 | name = "num-integer" 915 | version = "0.1.39" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | dependencies = [ 918 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 919 | ] 920 | 921 | [[package]] 922 | name = "num-iter" 923 | version = "0.1.37" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | dependencies = [ 926 | "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 927 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 928 | ] 929 | 930 | [[package]] 931 | name = "num-rational" 932 | version = "0.2.1" 933 | source = "registry+https://github.com/rust-lang/crates.io-index" 934 | dependencies = [ 935 | "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 936 | "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 937 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 938 | ] 939 | 940 | [[package]] 941 | name = "num-traits" 942 | version = "0.1.43" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | dependencies = [ 945 | "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 946 | ] 947 | 948 | [[package]] 949 | name = "num-traits" 950 | version = "0.2.6" 951 | source = "registry+https://github.com/rust-lang/crates.io-index" 952 | 953 | [[package]] 954 | name = "num_cpus" 955 | version = "1.9.0" 956 | source = "registry+https://github.com/rust-lang/crates.io-index" 957 | dependencies = [ 958 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 959 | ] 960 | 961 | [[package]] 962 | name = "ooproxy" 963 | version = "1.0.3" 964 | dependencies = [ 965 | "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", 966 | "actix-web 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)", 967 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 968 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 969 | "config 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", 970 | "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 971 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 972 | "jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 973 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 974 | "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 975 | "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 976 | "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 977 | "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", 978 | ] 979 | 980 | [[package]] 981 | name = "openssl" 982 | version = "0.10.16" 983 | source = "registry+https://github.com/rust-lang/crates.io-index" 984 | dependencies = [ 985 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 986 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 987 | "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 988 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 989 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 990 | "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", 991 | ] 992 | 993 | [[package]] 994 | name = "openssl-probe" 995 | version = "0.1.2" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | 998 | [[package]] 999 | name = "openssl-sys" 1000 | version = "0.9.40" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | dependencies = [ 1003 | "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", 1004 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1005 | "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 1006 | "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 1007 | ] 1008 | 1009 | [[package]] 1010 | name = "owning_ref" 1011 | version = "0.4.0" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | dependencies = [ 1014 | "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1015 | ] 1016 | 1017 | [[package]] 1018 | name = "parking_lot" 1019 | version = "0.7.1" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | dependencies = [ 1022 | "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1023 | "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1024 | ] 1025 | 1026 | [[package]] 1027 | name = "parking_lot_core" 1028 | version = "0.4.0" 1029 | source = "registry+https://github.com/rust-lang/crates.io-index" 1030 | dependencies = [ 1031 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1032 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1033 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 1034 | "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 1035 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "percent-encoding" 1040 | version = "1.0.1" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | 1043 | [[package]] 1044 | name = "phf" 1045 | version = "0.7.24" 1046 | source = "registry+https://github.com/rust-lang/crates.io-index" 1047 | dependencies = [ 1048 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "phf_codegen" 1053 | version = "0.7.24" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | dependencies = [ 1056 | "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 1057 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 1058 | ] 1059 | 1060 | [[package]] 1061 | name = "phf_generator" 1062 | version = "0.7.24" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | dependencies = [ 1065 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 1066 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "phf_shared" 1071 | version = "0.7.24" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | dependencies = [ 1074 | "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 1075 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1076 | ] 1077 | 1078 | [[package]] 1079 | name = "pkg-config" 1080 | version = "0.3.14" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | 1083 | [[package]] 1084 | name = "proc-macro2" 1085 | version = "0.4.27" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | dependencies = [ 1088 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1089 | ] 1090 | 1091 | [[package]] 1092 | name = "quick-error" 1093 | version = "1.2.2" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | 1096 | [[package]] 1097 | name = "quote" 1098 | version = "0.6.11" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | dependencies = [ 1101 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1102 | ] 1103 | 1104 | [[package]] 1105 | name = "rand" 1106 | version = "0.5.6" 1107 | source = "registry+https://github.com/rust-lang/crates.io-index" 1108 | dependencies = [ 1109 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 1110 | "fuchsia-cprng 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1111 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1112 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1113 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1114 | ] 1115 | 1116 | [[package]] 1117 | name = "rand" 1118 | version = "0.6.5" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | dependencies = [ 1121 | "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1122 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1123 | "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1124 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1125 | "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1126 | "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1127 | "rand_jitter 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1128 | "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1129 | "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1130 | "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1131 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1132 | ] 1133 | 1134 | [[package]] 1135 | name = "rand_chacha" 1136 | version = "0.1.1" 1137 | source = "registry+https://github.com/rust-lang/crates.io-index" 1138 | dependencies = [ 1139 | "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1140 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1141 | ] 1142 | 1143 | [[package]] 1144 | name = "rand_core" 1145 | version = "0.3.1" 1146 | source = "registry+https://github.com/rust-lang/crates.io-index" 1147 | dependencies = [ 1148 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1149 | ] 1150 | 1151 | [[package]] 1152 | name = "rand_core" 1153 | version = "0.4.0" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | 1156 | [[package]] 1157 | name = "rand_hc" 1158 | version = "0.1.0" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | dependencies = [ 1161 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1162 | ] 1163 | 1164 | [[package]] 1165 | name = "rand_isaac" 1166 | version = "0.1.1" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | dependencies = [ 1169 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1170 | ] 1171 | 1172 | [[package]] 1173 | name = "rand_jitter" 1174 | version = "0.1.2" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | dependencies = [ 1177 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1178 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1179 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1180 | ] 1181 | 1182 | [[package]] 1183 | name = "rand_os" 1184 | version = "0.1.2" 1185 | source = "registry+https://github.com/rust-lang/crates.io-index" 1186 | dependencies = [ 1187 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 1188 | "fuchsia-cprng 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1189 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1190 | "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1191 | "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1192 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "rand_pcg" 1197 | version = "0.1.1" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | dependencies = [ 1200 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1201 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 1202 | ] 1203 | 1204 | [[package]] 1205 | name = "rand_xorshift" 1206 | version = "0.1.1" 1207 | source = "registry+https://github.com/rust-lang/crates.io-index" 1208 | dependencies = [ 1209 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1210 | ] 1211 | 1212 | [[package]] 1213 | name = "rdrand" 1214 | version = "0.4.0" 1215 | source = "registry+https://github.com/rust-lang/crates.io-index" 1216 | dependencies = [ 1217 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1218 | ] 1219 | 1220 | [[package]] 1221 | name = "redox_syscall" 1222 | version = "0.1.51" 1223 | source = "registry+https://github.com/rust-lang/crates.io-index" 1224 | 1225 | [[package]] 1226 | name = "redox_termios" 1227 | version = "0.1.1" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | dependencies = [ 1230 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 1231 | ] 1232 | 1233 | [[package]] 1234 | name = "regex" 1235 | version = "1.1.0" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | dependencies = [ 1238 | "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", 1239 | "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1240 | "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1241 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1242 | "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1243 | ] 1244 | 1245 | [[package]] 1246 | name = "regex-syntax" 1247 | version = "0.6.5" 1248 | source = "registry+https://github.com/rust-lang/crates.io-index" 1249 | dependencies = [ 1250 | "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "remove_dir_all" 1255 | version = "0.5.1" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | dependencies = [ 1258 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1259 | ] 1260 | 1261 | [[package]] 1262 | name = "resolv-conf" 1263 | version = "0.6.2" 1264 | source = "registry+https://github.com/rust-lang/crates.io-index" 1265 | dependencies = [ 1266 | "hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1267 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "ring" 1272 | version = "0.13.5" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | dependencies = [ 1275 | "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", 1276 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1277 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1278 | "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "rust-ini" 1283 | version = "0.13.0" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | 1286 | [[package]] 1287 | name = "rustc-demangle" 1288 | version = "0.1.13" 1289 | source = "registry+https://github.com/rust-lang/crates.io-index" 1290 | 1291 | [[package]] 1292 | name = "rustc_version" 1293 | version = "0.2.3" 1294 | source = "registry+https://github.com/rust-lang/crates.io-index" 1295 | dependencies = [ 1296 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1297 | ] 1298 | 1299 | [[package]] 1300 | name = "ryu" 1301 | version = "0.2.7" 1302 | source = "registry+https://github.com/rust-lang/crates.io-index" 1303 | 1304 | [[package]] 1305 | name = "safemem" 1306 | version = "0.3.0" 1307 | source = "registry+https://github.com/rust-lang/crates.io-index" 1308 | 1309 | [[package]] 1310 | name = "schannel" 1311 | version = "0.1.14" 1312 | source = "registry+https://github.com/rust-lang/crates.io-index" 1313 | dependencies = [ 1314 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1315 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1316 | ] 1317 | 1318 | [[package]] 1319 | name = "scopeguard" 1320 | version = "0.3.3" 1321 | source = "registry+https://github.com/rust-lang/crates.io-index" 1322 | 1323 | [[package]] 1324 | name = "security-framework" 1325 | version = "0.2.2" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | dependencies = [ 1328 | "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1329 | "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1330 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1331 | "security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 1332 | ] 1333 | 1334 | [[package]] 1335 | name = "security-framework-sys" 1336 | version = "0.2.3" 1337 | source = "registry+https://github.com/rust-lang/crates.io-index" 1338 | dependencies = [ 1339 | "MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1340 | "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1341 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1342 | ] 1343 | 1344 | [[package]] 1345 | name = "semver" 1346 | version = "0.9.0" 1347 | source = "registry+https://github.com/rust-lang/crates.io-index" 1348 | dependencies = [ 1349 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1350 | ] 1351 | 1352 | [[package]] 1353 | name = "semver-parser" 1354 | version = "0.7.0" 1355 | source = "registry+https://github.com/rust-lang/crates.io-index" 1356 | 1357 | [[package]] 1358 | name = "serde" 1359 | version = "0.8.23" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | 1362 | [[package]] 1363 | name = "serde" 1364 | version = "1.0.87" 1365 | source = "registry+https://github.com/rust-lang/crates.io-index" 1366 | dependencies = [ 1367 | "serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 1368 | ] 1369 | 1370 | [[package]] 1371 | name = "serde-hjson" 1372 | version = "0.8.2" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | dependencies = [ 1375 | "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 1376 | "linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1377 | "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 1378 | "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1379 | "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", 1380 | ] 1381 | 1382 | [[package]] 1383 | name = "serde_derive" 1384 | version = "1.0.87" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | dependencies = [ 1387 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1388 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 1389 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "serde_json" 1394 | version = "1.0.38" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | dependencies = [ 1397 | "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1398 | "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 1399 | "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 1400 | ] 1401 | 1402 | [[package]] 1403 | name = "serde_test" 1404 | version = "0.8.23" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | dependencies = [ 1407 | "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", 1408 | ] 1409 | 1410 | [[package]] 1411 | name = "serde_urlencoded" 1412 | version = "0.5.4" 1413 | source = "registry+https://github.com/rust-lang/crates.io-index" 1414 | dependencies = [ 1415 | "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1416 | "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 1417 | "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 1418 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1419 | ] 1420 | 1421 | [[package]] 1422 | name = "sha1" 1423 | version = "0.6.0" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | 1426 | [[package]] 1427 | name = "signal-hook" 1428 | version = "0.1.7" 1429 | source = "registry+https://github.com/rust-lang/crates.io-index" 1430 | dependencies = [ 1431 | "arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 1432 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1433 | ] 1434 | 1435 | [[package]] 1436 | name = "siphasher" 1437 | version = "0.2.3" 1438 | source = "registry+https://github.com/rust-lang/crates.io-index" 1439 | 1440 | [[package]] 1441 | name = "slab" 1442 | version = "0.4.2" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | 1445 | [[package]] 1446 | name = "smallvec" 1447 | version = "0.6.8" 1448 | source = "registry+https://github.com/rust-lang/crates.io-index" 1449 | dependencies = [ 1450 | "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1451 | ] 1452 | 1453 | [[package]] 1454 | name = "socket2" 1455 | version = "0.3.8" 1456 | source = "registry+https://github.com/rust-lang/crates.io-index" 1457 | dependencies = [ 1458 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1459 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1460 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 1461 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1462 | ] 1463 | 1464 | [[package]] 1465 | name = "stable_deref_trait" 1466 | version = "1.1.1" 1467 | source = "registry+https://github.com/rust-lang/crates.io-index" 1468 | 1469 | [[package]] 1470 | name = "string" 1471 | version = "0.1.3" 1472 | source = "registry+https://github.com/rust-lang/crates.io-index" 1473 | 1474 | [[package]] 1475 | name = "syn" 1476 | version = "0.15.26" 1477 | source = "registry+https://github.com/rust-lang/crates.io-index" 1478 | dependencies = [ 1479 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1480 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 1481 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1482 | ] 1483 | 1484 | [[package]] 1485 | name = "synstructure" 1486 | version = "0.10.1" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | dependencies = [ 1489 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1490 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 1491 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 1492 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "tempfile" 1497 | version = "3.0.5" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | dependencies = [ 1500 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1501 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1502 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1503 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 1504 | "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1505 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1506 | ] 1507 | 1508 | [[package]] 1509 | name = "termcolor" 1510 | version = "1.0.4" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | dependencies = [ 1513 | "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1514 | ] 1515 | 1516 | [[package]] 1517 | name = "termion" 1518 | version = "1.5.1" 1519 | source = "registry+https://github.com/rust-lang/crates.io-index" 1520 | dependencies = [ 1521 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1522 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 1523 | "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1524 | ] 1525 | 1526 | [[package]] 1527 | name = "thread_local" 1528 | version = "0.3.6" 1529 | source = "registry+https://github.com/rust-lang/crates.io-index" 1530 | dependencies = [ 1531 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1532 | ] 1533 | 1534 | [[package]] 1535 | name = "time" 1536 | version = "0.1.42" 1537 | source = "registry+https://github.com/rust-lang/crates.io-index" 1538 | dependencies = [ 1539 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1540 | "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", 1541 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1542 | ] 1543 | 1544 | [[package]] 1545 | name = "tokio" 1546 | version = "0.1.15" 1547 | source = "registry+https://github.com/rust-lang/crates.io-index" 1548 | dependencies = [ 1549 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1550 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1551 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1552 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1553 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1554 | "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 1555 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1556 | "tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1557 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1558 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1559 | "tokio-sync 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1560 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1561 | "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1562 | "tokio-timer 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 1563 | "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1564 | "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 1565 | ] 1566 | 1567 | [[package]] 1568 | name = "tokio-codec" 1569 | version = "0.1.1" 1570 | source = "registry+https://github.com/rust-lang/crates.io-index" 1571 | dependencies = [ 1572 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1573 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1574 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1575 | ] 1576 | 1577 | [[package]] 1578 | name = "tokio-current-thread" 1579 | version = "0.1.4" 1580 | source = "registry+https://github.com/rust-lang/crates.io-index" 1581 | dependencies = [ 1582 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1583 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1584 | ] 1585 | 1586 | [[package]] 1587 | name = "tokio-executor" 1588 | version = "0.1.6" 1589 | source = "registry+https://github.com/rust-lang/crates.io-index" 1590 | dependencies = [ 1591 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1592 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1593 | ] 1594 | 1595 | [[package]] 1596 | name = "tokio-fs" 1597 | version = "0.1.5" 1598 | source = "registry+https://github.com/rust-lang/crates.io-index" 1599 | dependencies = [ 1600 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1601 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1602 | "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1603 | ] 1604 | 1605 | [[package]] 1606 | name = "tokio-io" 1607 | version = "0.1.11" 1608 | source = "registry+https://github.com/rust-lang/crates.io-index" 1609 | dependencies = [ 1610 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1611 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1612 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1613 | ] 1614 | 1615 | [[package]] 1616 | name = "tokio-reactor" 1617 | version = "0.1.8" 1618 | source = "registry+https://github.com/rust-lang/crates.io-index" 1619 | dependencies = [ 1620 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1621 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1622 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1623 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1624 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1625 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1626 | "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 1627 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1628 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1629 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1630 | ] 1631 | 1632 | [[package]] 1633 | name = "tokio-signal" 1634 | version = "0.2.7" 1635 | source = "registry+https://github.com/rust-lang/crates.io-index" 1636 | dependencies = [ 1637 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1638 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1639 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1640 | "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", 1641 | "signal-hook 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 1642 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1643 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1644 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1645 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1646 | ] 1647 | 1648 | [[package]] 1649 | name = "tokio-sync" 1650 | version = "0.1.1" 1651 | source = "registry+https://github.com/rust-lang/crates.io-index" 1652 | dependencies = [ 1653 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1654 | ] 1655 | 1656 | [[package]] 1657 | name = "tokio-tcp" 1658 | version = "0.1.3" 1659 | source = "registry+https://github.com/rust-lang/crates.io-index" 1660 | dependencies = [ 1661 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1662 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1663 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1664 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1665 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1666 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1667 | ] 1668 | 1669 | [[package]] 1670 | name = "tokio-threadpool" 1671 | version = "0.1.11" 1672 | source = "registry+https://github.com/rust-lang/crates.io-index" 1673 | dependencies = [ 1674 | "crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 1675 | "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1676 | "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", 1677 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1678 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1679 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1680 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1681 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1682 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1683 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1684 | ] 1685 | 1686 | [[package]] 1687 | name = "tokio-timer" 1688 | version = "0.2.9" 1689 | source = "registry+https://github.com/rust-lang/crates.io-index" 1690 | dependencies = [ 1691 | "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1692 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1693 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1694 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1695 | ] 1696 | 1697 | [[package]] 1698 | name = "tokio-tls" 1699 | version = "0.2.1" 1700 | source = "registry+https://github.com/rust-lang/crates.io-index" 1701 | dependencies = [ 1702 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1703 | "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1704 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1705 | ] 1706 | 1707 | [[package]] 1708 | name = "tokio-udp" 1709 | version = "0.1.3" 1710 | source = "registry+https://github.com/rust-lang/crates.io-index" 1711 | dependencies = [ 1712 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1713 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1714 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1715 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1716 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1717 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1718 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1719 | ] 1720 | 1721 | [[package]] 1722 | name = "tokio-uds" 1723 | version = "0.2.5" 1724 | source = "registry+https://github.com/rust-lang/crates.io-index" 1725 | dependencies = [ 1726 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 1727 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1728 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1729 | "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", 1730 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1731 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 1732 | "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", 1733 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1734 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1735 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1736 | ] 1737 | 1738 | [[package]] 1739 | name = "toml" 1740 | version = "0.4.10" 1741 | source = "registry+https://github.com/rust-lang/crates.io-index" 1742 | dependencies = [ 1743 | "serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)", 1744 | ] 1745 | 1746 | [[package]] 1747 | name = "tower-service" 1748 | version = "0.1.0" 1749 | source = "registry+https://github.com/rust-lang/crates.io-index" 1750 | dependencies = [ 1751 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1752 | ] 1753 | 1754 | [[package]] 1755 | name = "trust-dns-proto" 1756 | version = "0.5.0" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | dependencies = [ 1759 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1760 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1761 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1762 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1763 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1764 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1765 | "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", 1766 | "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 1767 | "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1768 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1769 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1770 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1771 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1772 | "tokio-timer 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 1773 | "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1774 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1775 | ] 1776 | 1777 | [[package]] 1778 | name = "trust-dns-proto" 1779 | version = "0.6.3" 1780 | source = "registry+https://github.com/rust-lang/crates.io-index" 1781 | dependencies = [ 1782 | "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1783 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1784 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1785 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1786 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1787 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1788 | "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", 1789 | "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 1790 | "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1791 | "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1792 | "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", 1793 | "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1794 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1795 | "tokio-timer 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 1796 | "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1797 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1798 | ] 1799 | 1800 | [[package]] 1801 | name = "trust-dns-resolver" 1802 | version = "0.10.3" 1803 | source = "registry+https://github.com/rust-lang/crates.io-index" 1804 | dependencies = [ 1805 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1806 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1807 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 1808 | "ipconfig 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1809 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1810 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 1811 | "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1812 | "resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 1813 | "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 1814 | "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 1815 | "trust-dns-proto 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", 1816 | ] 1817 | 1818 | [[package]] 1819 | name = "ucd-util" 1820 | version = "0.1.3" 1821 | source = "registry+https://github.com/rust-lang/crates.io-index" 1822 | 1823 | [[package]] 1824 | name = "unicase" 1825 | version = "1.4.2" 1826 | source = "registry+https://github.com/rust-lang/crates.io-index" 1827 | dependencies = [ 1828 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1829 | ] 1830 | 1831 | [[package]] 1832 | name = "unicase" 1833 | version = "2.2.0" 1834 | source = "registry+https://github.com/rust-lang/crates.io-index" 1835 | dependencies = [ 1836 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1837 | ] 1838 | 1839 | [[package]] 1840 | name = "unicode-bidi" 1841 | version = "0.3.4" 1842 | source = "registry+https://github.com/rust-lang/crates.io-index" 1843 | dependencies = [ 1844 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1845 | ] 1846 | 1847 | [[package]] 1848 | name = "unicode-normalization" 1849 | version = "0.1.8" 1850 | source = "registry+https://github.com/rust-lang/crates.io-index" 1851 | dependencies = [ 1852 | "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", 1853 | ] 1854 | 1855 | [[package]] 1856 | name = "unicode-xid" 1857 | version = "0.1.0" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | 1860 | [[package]] 1861 | name = "unreachable" 1862 | version = "1.0.0" 1863 | source = "registry+https://github.com/rust-lang/crates.io-index" 1864 | dependencies = [ 1865 | "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1866 | ] 1867 | 1868 | [[package]] 1869 | name = "untrusted" 1870 | version = "0.6.2" 1871 | source = "registry+https://github.com/rust-lang/crates.io-index" 1872 | 1873 | [[package]] 1874 | name = "url" 1875 | version = "1.7.2" 1876 | source = "registry+https://github.com/rust-lang/crates.io-index" 1877 | dependencies = [ 1878 | "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 1879 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1880 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1881 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1882 | ] 1883 | 1884 | [[package]] 1885 | name = "utf8-ranges" 1886 | version = "1.0.2" 1887 | source = "registry+https://github.com/rust-lang/crates.io-index" 1888 | 1889 | [[package]] 1890 | name = "uuid" 1891 | version = "0.7.2" 1892 | source = "registry+https://github.com/rust-lang/crates.io-index" 1893 | dependencies = [ 1894 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1895 | ] 1896 | 1897 | [[package]] 1898 | name = "v_escape" 1899 | version = "0.3.2" 1900 | source = "registry+https://github.com/rust-lang/crates.io-index" 1901 | dependencies = [ 1902 | "v_escape_derive 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 1903 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1904 | ] 1905 | 1906 | [[package]] 1907 | name = "v_escape_derive" 1908 | version = "0.2.1" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | dependencies = [ 1911 | "nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1912 | "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", 1913 | "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 1914 | "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", 1915 | ] 1916 | 1917 | [[package]] 1918 | name = "v_htmlescape" 1919 | version = "0.3.2" 1920 | source = "registry+https://github.com/rust-lang/crates.io-index" 1921 | dependencies = [ 1922 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1923 | "v_escape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 1924 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1925 | ] 1926 | 1927 | [[package]] 1928 | name = "vcpkg" 1929 | version = "0.2.6" 1930 | source = "registry+https://github.com/rust-lang/crates.io-index" 1931 | 1932 | [[package]] 1933 | name = "version_check" 1934 | version = "0.1.5" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | 1937 | [[package]] 1938 | name = "void" 1939 | version = "1.0.2" 1940 | source = "registry+https://github.com/rust-lang/crates.io-index" 1941 | 1942 | [[package]] 1943 | name = "widestring" 1944 | version = "0.2.2" 1945 | source = "registry+https://github.com/rust-lang/crates.io-index" 1946 | 1947 | [[package]] 1948 | name = "winapi" 1949 | version = "0.2.8" 1950 | source = "registry+https://github.com/rust-lang/crates.io-index" 1951 | 1952 | [[package]] 1953 | name = "winapi" 1954 | version = "0.3.6" 1955 | source = "registry+https://github.com/rust-lang/crates.io-index" 1956 | dependencies = [ 1957 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1958 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1959 | ] 1960 | 1961 | [[package]] 1962 | name = "winapi-build" 1963 | version = "0.1.1" 1964 | source = "registry+https://github.com/rust-lang/crates.io-index" 1965 | 1966 | [[package]] 1967 | name = "winapi-i686-pc-windows-gnu" 1968 | version = "0.4.0" 1969 | source = "registry+https://github.com/rust-lang/crates.io-index" 1970 | 1971 | [[package]] 1972 | name = "winapi-util" 1973 | version = "0.1.2" 1974 | source = "registry+https://github.com/rust-lang/crates.io-index" 1975 | dependencies = [ 1976 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1977 | ] 1978 | 1979 | [[package]] 1980 | name = "winapi-x86_64-pc-windows-gnu" 1981 | version = "0.4.0" 1982 | source = "registry+https://github.com/rust-lang/crates.io-index" 1983 | 1984 | [[package]] 1985 | name = "wincolor" 1986 | version = "1.0.1" 1987 | source = "registry+https://github.com/rust-lang/crates.io-index" 1988 | dependencies = [ 1989 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1990 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1991 | ] 1992 | 1993 | [[package]] 1994 | name = "winreg" 1995 | version = "0.5.1" 1996 | source = "registry+https://github.com/rust-lang/crates.io-index" 1997 | dependencies = [ 1998 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1999 | ] 2000 | 2001 | [[package]] 2002 | name = "winutil" 2003 | version = "0.1.1" 2004 | source = "registry+https://github.com/rust-lang/crates.io-index" 2005 | dependencies = [ 2006 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 2007 | ] 2008 | 2009 | [[package]] 2010 | name = "ws2_32-sys" 2011 | version = "0.2.1" 2012 | source = "registry+https://github.com/rust-lang/crates.io-index" 2013 | dependencies = [ 2014 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 2015 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 2016 | ] 2017 | 2018 | [[package]] 2019 | name = "yaml-rust" 2020 | version = "0.4.2" 2021 | source = "registry+https://github.com/rust-lang/crates.io-index" 2022 | dependencies = [ 2023 | "linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 2024 | ] 2025 | 2026 | [metadata] 2027 | "checksum MacTypes-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eaf9f0d0b1cc33a4d2aee14fb4b2eac03462ef4db29c8ac4057327d8a71ad86f" 2028 | "checksum actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c616db5fa4b0c40702fb75201c2af7f8aa8f3a2e2c1dda3b0655772aa949666" 2029 | "checksum actix-net 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8bebfbe6629e0131730746718c9e032b58f02c6ce06ed7c982b9fef6c8545acd" 2030 | "checksum actix-web 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)" = "e9f33c941e5e69a58a6bfef33853228042ed3799fc4b5a4923a36a85776fb690" 2031 | "checksum actix_derive 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4300e9431455322ae393d43a2ba1ef96b8080573c0fc23b196219efedfb6ba69" 2032 | "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" 2033 | "checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" 2034 | "checksum arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1025aeae2b664ca0ea726a89d574fe8f4e77dd712d443236ad1de00379450cf6" 2035 | "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" 2036 | "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 2037 | "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" 2038 | "checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5" 2039 | "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" 2040 | "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 2041 | "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" 2042 | "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" 2043 | "checksum brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" 2044 | "checksum brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" 2045 | "checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" 2046 | "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" 2047 | "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" 2048 | "checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749" 2049 | "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" 2050 | "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" 2051 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 2052 | "checksum config 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e82d07fac0a5eeaa9d959b5194d01bb66e414665f547416958d2b430f8f4852" 2053 | "checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" 2054 | "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" 2055 | "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" 2056 | "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" 2057 | "checksum crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e91d5240c6975ef33aeb5f148f35275c25eda8e8a5f95abe421978b05b8bf192" 2058 | "checksum crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad4c7ea749d9fb09e23c5cb17e3b70650860553a0e2744e38446b1803bf7db94" 2059 | "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" 2060 | "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" 2061 | "checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" 2062 | "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" 2063 | "checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" 2064 | "checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" 2065 | "checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" 2066 | "checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" 2067 | "checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" 2068 | "checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" 2069 | "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" 2070 | "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" 2071 | "checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" 2072 | "checksum error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6930e04918388a9a2e41d518c25cf679ccafe26733fb4127dbf21993f2575d46" 2073 | "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" 2074 | "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" 2075 | "checksum flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2291c165c8e703ee54ef3055ad6188e3d51108e2ded18e9f2476e774fc5ad3d4" 2076 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 2077 | "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 2078 | "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 2079 | "checksum fuchsia-cprng 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81f7f8eb465745ea9b02e2704612a9946a59fa40572086c6fd49d6ddcf30bf31" 2080 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 2081 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 2082 | "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" 2083 | "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" 2084 | "checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" 2085 | "checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" 2086 | "checksum http 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1a10e5b573b9a0146545010f50772b9e8b1dd0a256564cc4307694c68832a2f5" 2087 | "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" 2088 | "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" 2089 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 2090 | "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" 2091 | "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" 2092 | "checksum ipconfig 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "08f7eadeaf4b52700de180d147c4805f199854600b36faa963d91114827b2ffc" 2093 | "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" 2094 | "checksum jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d438ea707d465c230305963b67f8357a1d56fcfad9434797d7cb1c46c2e41df" 2095 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 2096 | "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 2097 | "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" 2098 | "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" 2099 | "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" 2100 | "checksum libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "e962c7641008ac010fa60a7dfdc1712449f29c44ef2d4702394aea943ee75047" 2101 | "checksum linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd" 2102 | "checksum linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7860ec297f7008ff7a1e3382d7f7e1dcd69efc94751a2284bafc3d013c2aa939" 2103 | "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" 2104 | "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" 2105 | "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" 2106 | "checksum lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d06ff7ff06f729ce5f4e227876cb88d10bc59cd4ae1e09fbb2bde15c850dc21" 2107 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 2108 | "checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8" 2109 | "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" 2110 | "checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" 2111 | "checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" 2112 | "checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649" 2113 | "checksum miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c468f2369f07d651a5d0bb2c9079f8488a66d5466efe42d0c5c6466edcb7f71e" 2114 | "checksum miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fe927a42e3807ef71defb191dc87d4e24479b221e67015fe38ae2b7b447bab" 2115 | "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" 2116 | "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" 2117 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 2118 | "checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" 2119 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 2120 | "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" 2121 | "checksum nom 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b30adc557058ce00c9d0d7cb3c6e0b5bc6f36e2e2eabe74b0ba726d194abd588" 2122 | "checksum num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf4825417e1e1406b3782a8ce92f4d53f26ec055e3622e1881ca8e9f5f9e08db" 2123 | "checksum num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "57450397855d951f1a41305e54851b1a7b8f5d2e349543a02a2effe25459f718" 2124 | "checksum num-complex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "107b9be86cd2481930688277b675b0114578227f034674726605b8a482d8baf8" 2125 | "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" 2126 | "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" 2127 | "checksum num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e96f040177bb3da242b5b1ecf3f54b5d5af3efbbfb18608977a5d2767b22f10" 2128 | "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" 2129 | "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" 2130 | "checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" 2131 | "checksum openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ec7bd7ca4cce6dbdc77e7c1230682740d307d1218a87fb0349a571272be749f9" 2132 | "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 2133 | "checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6" 2134 | "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" 2135 | "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" 2136 | "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" 2137 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 2138 | "checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" 2139 | "checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" 2140 | "checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" 2141 | "checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" 2142 | "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" 2143 | "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" 2144 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 2145 | "checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" 2146 | "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" 2147 | "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 2148 | "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 2149 | "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 2150 | "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" 2151 | "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" 2152 | "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" 2153 | "checksum rand_jitter 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "080723c6145e37503a2224f801f252e14ac5531cb450f4502698542d188cb3c0" 2154 | "checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d" 2155 | "checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" 2156 | "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" 2157 | "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 2158 | "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" 2159 | "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 2160 | "checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" 2161 | "checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" 2162 | "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" 2163 | "checksum resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b263b4aa1b5de9ffc0054a2386f96992058bb6870aab516f8cdeb8a667d56dcb" 2164 | "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" 2165 | "checksum rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" 2166 | "checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" 2167 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 2168 | "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" 2169 | "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" 2170 | "checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" 2171 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" 2172 | "checksum security-framework 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfab8dda0e7a327c696d893df9ffa19cadc4bd195797997f5223cf5831beaf05" 2173 | "checksum security-framework-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d6696852716b589dff9e886ff83778bb635150168e83afa8ac6b8a78cb82abc" 2174 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 2175 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 2176 | "checksum serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" 2177 | "checksum serde 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "2e20fde37801e83c891a2dc4ebd3b81f0da4d1fb67a9e0a2a3b921e2536a58ee" 2178 | "checksum serde-hjson 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0b833c5ad67d52ced5f5938b2980f32a9c1c5ef047f0b4fb3127e7a423c76153" 2179 | "checksum serde_derive 1.0.87 (registry+https://github.com/rust-lang/crates.io-index)" = "633e97856567e518b59ffb2ad7c7a4fd4c5d91d9c7f32dd38a27b2bf7e8114ea" 2180 | "checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" 2181 | "checksum serde_test 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5" 2182 | "checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" 2183 | "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" 2184 | "checksum signal-hook 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1f272d1b7586bec132ed427f532dd418d8beca1ca7f2caf7df35569b1415a4b4" 2185 | "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" 2186 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 2187 | "checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" 2188 | "checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7" 2189 | "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" 2190 | "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" 2191 | "checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" 2192 | "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" 2193 | "checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" 2194 | "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" 2195 | "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" 2196 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 2197 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 2198 | "checksum tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e0500b88064f08bebddd0c0bed39e19f5c567a5f30975bee52b0c0d3e2eeb38c" 2199 | "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" 2200 | "checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" 2201 | "checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" 2202 | "checksum tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9cbbc8a3698b7ab652340f46633364f9eaa928ddaaee79d8b8f356dd79a09d" 2203 | "checksum tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b53aeb9d3f5ccf2ebb29e19788f96987fa1355f8fe45ea193928eaaaf3ae820f" 2204 | "checksum tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afbcdb0f0d2a1e4c440af82d7bbf0bf91a8a8c0575bcd20c05d15be7e9d3a02f" 2205 | "checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" 2206 | "checksum tokio-sync 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3742b64166c1ee9121f1921aea5a726098458926a6b732d906ef23b1f3ef6f4f" 2207 | "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" 2208 | "checksum tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd86cb15547d02daa2b21aadaf4e37dee3368df38a526178a5afa3c034d2fb" 2209 | "checksum tokio-timer 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "21c04a314a1f69f73c0227beba6250e06cdc1e9a62e7eff912bf54a59b6d1b94" 2210 | "checksum tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" 2211 | "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" 2212 | "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" 2213 | "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" 2214 | "checksum tower-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b32f72af77f1bfe3d3d4da8516a238ebe7039b51dd8637a09841ac7f16d2c987" 2215 | "checksum trust-dns-proto 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0838272e89f1c693b4df38dc353412e389cf548ceed6f9fd1af5a8d6e0e7cf74" 2216 | "checksum trust-dns-proto 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "09144f0992b0870fa8d2972cc069cbf1e3c0fda64d1f3d45c4d68d0e0b52ad4e" 2217 | "checksum trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8a9f877f7a1ad821ab350505e1f1b146a4960402991787191d6d8cab2ce2de2c" 2218 | "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" 2219 | "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" 2220 | "checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" 2221 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 2222 | "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" 2223 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 2224 | "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" 2225 | "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" 2226 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 2227 | "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" 2228 | "checksum uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0238db0c5b605dd1cf51de0f21766f97fba2645897024461d6a00c036819a768" 2229 | "checksum v_escape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b50688edb86f4c092a1a9fe8bda004b0faa3197100897653809e97e09a2814" 2230 | "checksum v_escape_derive 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7cd994c63b487fef7aad31e5394ec04b9e24de7b32ea5251c9fb499cd2cbf44c" 2231 | "checksum v_htmlescape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "020cae817dc82693aa523f01087b291b1c7a9ac8cea5c12297963f21769fb27f" 2232 | "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" 2233 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 2234 | "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 2235 | "checksum widestring 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7157704c2e12e3d2189c507b7482c52820a16dfa4465ba91add92f266667cadb" 2236 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 2237 | "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" 2238 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 2239 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2240 | "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 2241 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2242 | "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" 2243 | "checksum winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a" 2244 | "checksum winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" 2245 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 2246 | "checksum yaml-rust 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "95acf0db5515d07da9965ec0e0ba6cc2d825e2caeb7303b66ca441729801254e" 2247 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ooproxy" 3 | version = "1.0.3" 4 | authors = ["Tim Stokman "] 5 | readme = "README.md" 6 | repository = "https://github.com/HAL24K/ooproxy" 7 | homepage = "https://github.com/HAL24K/ooproxy" 8 | keywords = ["openid", "oauth", "oauth2", "proxy"] 9 | description = "A reverse OpenID Connect and OAuth 2 proxy, implementing the client-credentials flow." 10 | license = "GPL-3.0-only" 11 | edition = "2018" 12 | 13 | [dependencies] 14 | actix-web = "0.7" 15 | jsonwebtoken = "5" 16 | serde_json = "1" 17 | log = "0.4" 18 | env_logger = "0.6" 19 | futures = "0.1" 20 | actix = "0.7" 21 | bytes = "0.4" 22 | base64 = "0.10" 23 | num = "0.2" 24 | config = "0.9" 25 | serde = { version = "1", features = ["derive"] } 26 | native-tls = { version = "0.2", optional = true } 27 | 28 | [features] 29 | tls = [ "native-tls", "actix-web/tls" ] 30 | 31 | [profile.release] 32 | lto = true 33 | panic = 'abort' -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.9 AS build 2 | ARG features=tls 3 | RUN apk add openssl-dev rust cargo 4 | COPY . . 5 | RUN cargo test --all-features 6 | RUN cargo build --release --features="$features" 7 | RUN mv /target/release/ooproxy . 8 | RUN strip --strip-all ooproxy 9 | 10 | FROM alpine:3.9 11 | ARG features=tls 12 | RUN if [ "$features" = "tls" ] ; then apk add openssl libgcc ; else apk add libgcc ; fi 13 | COPY --from=build /ooproxy / 14 | ENTRYPOINT ["/ooproxy"] -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | ### GNU GENERAL PUBLIC LICENSE 2 | 3 | Version 3, 29 June 2007 4 | 5 | Copyright (C) 2007 Free Software Foundation, Inc. 6 | 7 | 8 | Everyone is permitted to copy and distribute verbatim copies of this 9 | license document, but changing it is not allowed. 10 | 11 | ### Preamble 12 | 13 | The GNU General Public License is a free, copyleft license for 14 | software and other kinds of works. 15 | 16 | The licenses for most software and other practical works are designed 17 | to take away your freedom to share and change the works. By contrast, 18 | the GNU General Public License is intended to guarantee your freedom 19 | to share and change all versions of a program--to make sure it remains 20 | free software for all its users. We, the Free Software Foundation, use 21 | the GNU General Public License for most of our software; it applies 22 | also to any other work released this way by its authors. You can apply 23 | it to your programs, too. 24 | 25 | When we speak of free software, we are referring to freedom, not 26 | price. Our General Public Licenses are designed to make sure that you 27 | have the freedom to distribute copies of free software (and charge for 28 | them if you wish), that you receive source code or can get it if you 29 | want it, that you can change the software or use pieces of it in new 30 | free programs, and that you know you can do these things. 31 | 32 | To protect your rights, we need to prevent others from denying you 33 | these rights or asking you to surrender the rights. Therefore, you 34 | have certain responsibilities if you distribute copies of the 35 | software, or if you modify it: responsibilities to respect the freedom 36 | of others. 37 | 38 | For example, if you distribute copies of such a program, whether 39 | gratis or for a fee, you must pass on to the recipients the same 40 | freedoms that you received. You must make sure that they, too, receive 41 | or can get the source code. And you must show them these terms so they 42 | know their rights. 43 | 44 | Developers that use the GNU GPL protect your rights with two steps: 45 | (1) assert copyright on the software, and (2) offer you this License 46 | giving you legal permission to copy, distribute and/or modify it. 47 | 48 | For the developers' and authors' protection, the GPL clearly explains 49 | that there is no warranty for this free software. For both users' and 50 | authors' sake, the GPL requires that modified versions be marked as 51 | changed, so that their problems will not be attributed erroneously to 52 | authors of previous versions. 53 | 54 | Some devices are designed to deny users access to install or run 55 | modified versions of the software inside them, although the 56 | manufacturer can do so. This is fundamentally incompatible with the 57 | aim of protecting users' freedom to change the software. The 58 | systematic pattern of such abuse occurs in the area of products for 59 | individuals to use, which is precisely where it is most unacceptable. 60 | Therefore, we have designed this version of the GPL to prohibit the 61 | practice for those products. If such problems arise substantially in 62 | other domains, we stand ready to extend this provision to those 63 | domains in future versions of the GPL, as needed to protect the 64 | freedom of users. 65 | 66 | Finally, every program is threatened constantly by software patents. 67 | States should not allow patents to restrict development and use of 68 | software on general-purpose computers, but in those that do, we wish 69 | to avoid the special danger that patents applied to a free program 70 | could make it effectively proprietary. To prevent this, the GPL 71 | assures that patents cannot be used to render the program non-free. 72 | 73 | The precise terms and conditions for copying, distribution and 74 | modification follow. 75 | 76 | ### TERMS AND CONDITIONS 77 | 78 | #### 0. Definitions. 79 | 80 | "This License" refers to version 3 of the GNU General Public License. 81 | 82 | "Copyright" also means copyright-like laws that apply to other kinds 83 | of works, such as semiconductor masks. 84 | 85 | "The Program" refers to any copyrightable work licensed under this 86 | License. Each licensee is addressed as "you". "Licensees" and 87 | "recipients" may be individuals or organizations. 88 | 89 | To "modify" a work means to copy from or adapt all or part of the work 90 | in a fashion requiring copyright permission, other than the making of 91 | an exact copy. The resulting work is called a "modified version" of 92 | the earlier work or a work "based on" the earlier work. 93 | 94 | A "covered work" means either the unmodified Program or a work based 95 | on the Program. 96 | 97 | To "propagate" a work means to do anything with it that, without 98 | permission, would make you directly or secondarily liable for 99 | infringement under applicable copyright law, except executing it on a 100 | computer or modifying a private copy. Propagation includes copying, 101 | distribution (with or without modification), making available to the 102 | public, and in some countries other activities as well. 103 | 104 | To "convey" a work means any kind of propagation that enables other 105 | parties to make or receive copies. Mere interaction with a user 106 | through a computer network, with no transfer of a copy, is not 107 | conveying. 108 | 109 | An interactive user interface displays "Appropriate Legal Notices" to 110 | the extent that it includes a convenient and prominently visible 111 | feature that (1) displays an appropriate copyright notice, and (2) 112 | tells the user that there is no warranty for the work (except to the 113 | extent that warranties are provided), that licensees may convey the 114 | work under this License, and how to view a copy of this License. If 115 | the interface presents a list of user commands or options, such as a 116 | menu, a prominent item in the list meets this criterion. 117 | 118 | #### 1. Source Code. 119 | 120 | The "source code" for a work means the preferred form of the work for 121 | making modifications to it. "Object code" means any non-source form of 122 | a work. 123 | 124 | A "Standard Interface" means an interface that either is an official 125 | standard defined by a recognized standards body, or, in the case of 126 | interfaces specified for a particular programming language, one that 127 | is widely used among developers working in that language. 128 | 129 | The "System Libraries" of an executable work include anything, other 130 | than the work as a whole, that (a) is included in the normal form of 131 | packaging a Major Component, but which is not part of that Major 132 | Component, and (b) serves only to enable use of the work with that 133 | Major Component, or to implement a Standard Interface for which an 134 | implementation is available to the public in source code form. A 135 | "Major Component", in this context, means a major essential component 136 | (kernel, window system, and so on) of the specific operating system 137 | (if any) on which the executable work runs, or a compiler used to 138 | produce the work, or an object code interpreter used to run it. 139 | 140 | The "Corresponding Source" for a work in object code form means all 141 | the source code needed to generate, install, and (for an executable 142 | work) run the object code and to modify the work, including scripts to 143 | control those activities. However, it does not include the work's 144 | System Libraries, or general-purpose tools or generally available free 145 | programs which are used unmodified in performing those activities but 146 | which are not part of the work. For example, Corresponding Source 147 | includes interface definition files associated with source files for 148 | the work, and the source code for shared libraries and dynamically 149 | linked subprograms that the work is specifically designed to require, 150 | such as by intimate data communication or control flow between those 151 | subprograms and other parts of the work. 152 | 153 | The Corresponding Source need not include anything that users can 154 | regenerate automatically from other parts of the Corresponding Source. 155 | 156 | The Corresponding Source for a work in source code form is that same 157 | work. 158 | 159 | #### 2. Basic Permissions. 160 | 161 | All rights granted under this License are granted for the term of 162 | copyright on the Program, and are irrevocable provided the stated 163 | conditions are met. This License explicitly affirms your unlimited 164 | permission to run the unmodified Program. The output from running a 165 | covered work is covered by this License only if the output, given its 166 | content, constitutes a covered work. This License acknowledges your 167 | rights of fair use or other equivalent, as provided by copyright law. 168 | 169 | You may make, run and propagate covered works that you do not convey, 170 | without conditions so long as your license otherwise remains in force. 171 | You may convey covered works to others for the sole purpose of having 172 | them make modifications exclusively for you, or provide you with 173 | facilities for running those works, provided that you comply with the 174 | terms of this License in conveying all material for which you do not 175 | control copyright. Those thus making or running the covered works for 176 | you must do so exclusively on your behalf, under your direction and 177 | control, on terms that prohibit them from making any copies of your 178 | copyrighted material outside their relationship with you. 179 | 180 | Conveying under any other circumstances is permitted solely under the 181 | conditions stated below. Sublicensing is not allowed; section 10 makes 182 | it unnecessary. 183 | 184 | #### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 185 | 186 | No covered work shall be deemed part of an effective technological 187 | measure under any applicable law fulfilling obligations under article 188 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 189 | similar laws prohibiting or restricting circumvention of such 190 | measures. 191 | 192 | When you convey a covered work, you waive any legal power to forbid 193 | circumvention of technological measures to the extent such 194 | circumvention is effected by exercising rights under this License with 195 | respect to the covered work, and you disclaim any intention to limit 196 | operation or modification of the work as a means of enforcing, against 197 | the work's users, your or third parties' legal rights to forbid 198 | circumvention of technological measures. 199 | 200 | #### 4. Conveying Verbatim Copies. 201 | 202 | You may convey verbatim copies of the Program's source code as you 203 | receive it, in any medium, provided that you conspicuously and 204 | appropriately publish on each copy an appropriate copyright notice; 205 | keep intact all notices stating that this License and any 206 | non-permissive terms added in accord with section 7 apply to the code; 207 | keep intact all notices of the absence of any warranty; and give all 208 | recipients a copy of this License along with the Program. 209 | 210 | You may charge any price or no price for each copy that you convey, 211 | and you may offer support or warranty protection for a fee. 212 | 213 | #### 5. Conveying Modified Source Versions. 214 | 215 | You may convey a work based on the Program, or the modifications to 216 | produce it from the Program, in the form of source code under the 217 | terms of section 4, provided that you also meet all of these 218 | conditions: 219 | 220 | - a) The work must carry prominent notices stating that you modified 221 | it, and giving a relevant date. 222 | - b) The work must carry prominent notices stating that it is 223 | released under this License and any conditions added under 224 | section 7. This requirement modifies the requirement in section 4 225 | to "keep intact all notices". 226 | - c) You must license the entire work, as a whole, under this 227 | License to anyone who comes into possession of a copy. This 228 | License will therefore apply, along with any applicable section 7 229 | additional terms, to the whole of the work, and all its parts, 230 | regardless of how they are packaged. This License gives no 231 | permission to license the work in any other way, but it does not 232 | invalidate such permission if you have separately received it. 233 | - d) If the work has interactive user interfaces, each must display 234 | Appropriate Legal Notices; however, if the Program has interactive 235 | interfaces that do not display Appropriate Legal Notices, your 236 | work need not make them do so. 237 | 238 | A compilation of a covered work with other separate and independent 239 | works, which are not by their nature extensions of the covered work, 240 | and which are not combined with it such as to form a larger program, 241 | in or on a volume of a storage or distribution medium, is called an 242 | "aggregate" if the compilation and its resulting copyright are not 243 | used to limit the access or legal rights of the compilation's users 244 | beyond what the individual works permit. Inclusion of a covered work 245 | in an aggregate does not cause this License to apply to the other 246 | parts of the aggregate. 247 | 248 | #### 6. Conveying Non-Source Forms. 249 | 250 | You may convey a covered work in object code form under the terms of 251 | sections 4 and 5, provided that you also convey the machine-readable 252 | Corresponding Source under the terms of this License, in one of these 253 | ways: 254 | 255 | - a) Convey the object code in, or embodied in, a physical product 256 | (including a physical distribution medium), accompanied by the 257 | Corresponding Source fixed on a durable physical medium 258 | customarily used for software interchange. 259 | - b) Convey the object code in, or embodied in, a physical product 260 | (including a physical distribution medium), accompanied by a 261 | written offer, valid for at least three years and valid for as 262 | long as you offer spare parts or customer support for that product 263 | model, to give anyone who possesses the object code either (1) a 264 | copy of the Corresponding Source for all the software in the 265 | product that is covered by this License, on a durable physical 266 | medium customarily used for software interchange, for a price no 267 | more than your reasonable cost of physically performing this 268 | conveying of source, or (2) access to copy the Corresponding 269 | Source from a network server at no charge. 270 | - c) Convey individual copies of the object code with a copy of the 271 | written offer to provide the Corresponding Source. This 272 | alternative is allowed only occasionally and noncommercially, and 273 | only if you received the object code with such an offer, in accord 274 | with subsection 6b. 275 | - d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | - e) Convey the object code using peer-to-peer transmission, 288 | provided you inform other peers where the object code and 289 | Corresponding Source of the work are being offered to the general 290 | public at no charge under subsection 6d. 291 | 292 | A separable portion of the object code, whose source code is excluded 293 | from the Corresponding Source as a System Library, need not be 294 | included in conveying the object code work. 295 | 296 | A "User Product" is either (1) a "consumer product", which means any 297 | tangible personal property which is normally used for personal, 298 | family, or household purposes, or (2) anything designed or sold for 299 | incorporation into a dwelling. In determining whether a product is a 300 | consumer product, doubtful cases shall be resolved in favor of 301 | coverage. For a particular product received by a particular user, 302 | "normally used" refers to a typical or common use of that class of 303 | product, regardless of the status of the particular user or of the way 304 | in which the particular user actually uses, or expects or is expected 305 | to use, the product. A product is a consumer product regardless of 306 | whether the product has substantial commercial, industrial or 307 | non-consumer uses, unless such uses represent the only significant 308 | mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to 312 | install and execute modified versions of a covered work in that User 313 | Product from a modified version of its Corresponding Source. The 314 | information must suffice to ensure that the continued functioning of 315 | the modified object code is in no case prevented or interfered with 316 | solely because modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or 331 | updates for a work that has been modified or installed by the 332 | recipient, or for the User Product in which it has been modified or 333 | installed. Access to a network may be denied when the modification 334 | itself materially and adversely affects the operation of the network 335 | or violates the rules and protocols for communication across the 336 | network. 337 | 338 | Corresponding Source conveyed, and Installation Information provided, 339 | in accord with this section must be in a format that is publicly 340 | documented (and with an implementation available to the public in 341 | source code form), and must require no special password or key for 342 | unpacking, reading or copying. 343 | 344 | #### 7. Additional Terms. 345 | 346 | "Additional permissions" are terms that supplement the terms of this 347 | License by making exceptions from one or more of its conditions. 348 | Additional permissions that are applicable to the entire Program shall 349 | be treated as though they were included in this License, to the extent 350 | that they are valid under applicable law. If additional permissions 351 | apply only to part of the Program, that part may be used separately 352 | under those permissions, but the entire Program remains governed by 353 | this License without regard to the additional permissions. 354 | 355 | When you convey a copy of a covered work, you may at your option 356 | remove any additional permissions from that copy, or from any part of 357 | it. (Additional permissions may be written to require their own 358 | removal in certain cases when you modify the work.) You may place 359 | additional permissions on material, added by you to a covered work, 360 | for which you have or can give appropriate copyright permission. 361 | 362 | Notwithstanding any other provision of this License, for material you 363 | add to a covered work, you may (if authorized by the copyright holders 364 | of that material) supplement the terms of this License with terms: 365 | 366 | - a) Disclaiming warranty or limiting liability differently from the 367 | terms of sections 15 and 16 of this License; or 368 | - b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | - c) Prohibiting misrepresentation of the origin of that material, 372 | or requiring that modified versions of such material be marked in 373 | reasonable ways as different from the original version; or 374 | - d) Limiting the use for publicity purposes of names of licensors 375 | or authors of the material; or 376 | - e) Declining to grant rights under trademark law for use of some 377 | trade names, trademarks, or service marks; or 378 | - f) Requiring indemnification of licensors and authors of that 379 | material by anyone who conveys the material (or modified versions 380 | of it) with contractual assumptions of liability to the recipient, 381 | for any liability that these contractual assumptions directly 382 | impose on those licensors and authors. 383 | 384 | All other non-permissive additional terms are considered "further 385 | restrictions" within the meaning of section 10. If the Program as you 386 | received it, or any part of it, contains a notice stating that it is 387 | governed by this License along with a term that is a further 388 | restriction, you may remove that term. If a license document contains 389 | a further restriction but permits relicensing or conveying under this 390 | License, you may add to a covered work material governed by the terms 391 | of that license document, provided that the further restriction does 392 | not survive such relicensing or conveying. 393 | 394 | If you add terms to a covered work in accord with this section, you 395 | must place, in the relevant source files, a statement of the 396 | additional terms that apply to those files, or a notice indicating 397 | where to find the applicable terms. 398 | 399 | Additional terms, permissive or non-permissive, may be stated in the 400 | form of a separately written license, or stated as exceptions; the 401 | above requirements apply either way. 402 | 403 | #### 8. Termination. 404 | 405 | You may not propagate or modify a covered work except as expressly 406 | provided under this License. Any attempt otherwise to propagate or 407 | modify it is void, and will automatically terminate your rights under 408 | this License (including any patent licenses granted under the third 409 | paragraph of section 11). 410 | 411 | However, if you cease all violation of this License, then your license 412 | from a particular copyright holder is reinstated (a) provisionally, 413 | unless and until the copyright holder explicitly and finally 414 | terminates your license, and (b) permanently, if the copyright holder 415 | fails to notify you of the violation by some reasonable means prior to 416 | 60 days after the cessation. 417 | 418 | Moreover, your license from a particular copyright holder is 419 | reinstated permanently if the copyright holder notifies you of the 420 | violation by some reasonable means, this is the first time you have 421 | received notice of violation of this License (for any work) from that 422 | copyright holder, and you cure the violation prior to 30 days after 423 | your receipt of the notice. 424 | 425 | Termination of your rights under this section does not terminate the 426 | licenses of parties who have received copies or rights from you under 427 | this License. If your rights have been terminated and not permanently 428 | reinstated, you do not qualify to receive new licenses for the same 429 | material under section 10. 430 | 431 | #### 9. Acceptance Not Required for Having Copies. 432 | 433 | You are not required to accept this License in order to receive or run 434 | a copy of the Program. Ancillary propagation of a covered work 435 | occurring solely as a consequence of using peer-to-peer transmission 436 | to receive a copy likewise does not require acceptance. However, 437 | nothing other than this License grants you permission to propagate or 438 | modify any covered work. These actions infringe copyright if you do 439 | not accept this License. Therefore, by modifying or propagating a 440 | covered work, you indicate your acceptance of this License to do so. 441 | 442 | #### 10. Automatic Licensing of Downstream Recipients. 443 | 444 | Each time you convey a covered work, the recipient automatically 445 | receives a license from the original licensors, to run, modify and 446 | propagate that work, subject to this License. You are not responsible 447 | for enforcing compliance by third parties with this License. 448 | 449 | An "entity transaction" is a transaction transferring control of an 450 | organization, or substantially all assets of one, or subdividing an 451 | organization, or merging organizations. If propagation of a covered 452 | work results from an entity transaction, each party to that 453 | transaction who receives a copy of the work also receives whatever 454 | licenses to the work the party's predecessor in interest had or could 455 | give under the previous paragraph, plus a right to possession of the 456 | Corresponding Source of the work from the predecessor in interest, if 457 | the predecessor has it or can get it with reasonable efforts. 458 | 459 | You may not impose any further restrictions on the exercise of the 460 | rights granted or affirmed under this License. For example, you may 461 | not impose a license fee, royalty, or other charge for exercise of 462 | rights granted under this License, and you may not initiate litigation 463 | (including a cross-claim or counterclaim in a lawsuit) alleging that 464 | any patent claim is infringed by making, using, selling, offering for 465 | sale, or importing the Program or any portion of it. 466 | 467 | #### 11. Patents. 468 | 469 | A "contributor" is a copyright holder who authorizes use under this 470 | License of the Program or a work on which the Program is based. The 471 | work thus licensed is called the contributor's "contributor version". 472 | 473 | A contributor's "essential patent claims" are all patent claims owned 474 | or controlled by the contributor, whether already acquired or 475 | hereafter acquired, that would be infringed by some manner, permitted 476 | by this License, of making, using, or selling its contributor version, 477 | but do not include claims that would be infringed only as a 478 | consequence of further modification of the contributor version. For 479 | purposes of this definition, "control" includes the right to grant 480 | patent sublicenses in a manner consistent with the requirements of 481 | this License. 482 | 483 | Each contributor grants you a non-exclusive, worldwide, royalty-free 484 | patent license under the contributor's essential patent claims, to 485 | make, use, sell, offer for sale, import and otherwise run, modify and 486 | propagate the contents of its contributor version. 487 | 488 | In the following three paragraphs, a "patent license" is any express 489 | agreement or commitment, however denominated, not to enforce a patent 490 | (such as an express permission to practice a patent or covenant not to 491 | sue for patent infringement). To "grant" such a patent license to a 492 | party means to make such an agreement or commitment not to enforce a 493 | patent against the party. 494 | 495 | If you convey a covered work, knowingly relying on a patent license, 496 | and the Corresponding Source of the work is not available for anyone 497 | to copy, free of charge and under the terms of this License, through a 498 | publicly available network server or other readily accessible means, 499 | then you must either (1) cause the Corresponding Source to be so 500 | available, or (2) arrange to deprive yourself of the benefit of the 501 | patent license for this particular work, or (3) arrange, in a manner 502 | consistent with the requirements of this License, to extend the patent 503 | license to downstream recipients. "Knowingly relying" means you have 504 | actual knowledge that, but for the patent license, your conveying the 505 | covered work in a country, or your recipient's use of the covered work 506 | in a country, would infringe one or more identifiable patents in that 507 | country that you have reason to believe are valid. 508 | 509 | If, pursuant to or in connection with a single transaction or 510 | arrangement, you convey, or propagate by procuring conveyance of, a 511 | covered work, and grant a patent license to some of the parties 512 | receiving the covered work authorizing them to use, propagate, modify 513 | or convey a specific copy of the covered work, then the patent license 514 | you grant is automatically extended to all recipients of the covered 515 | work and works based on it. 516 | 517 | A patent license is "discriminatory" if it does not include within the 518 | scope of its coverage, prohibits the exercise of, or is conditioned on 519 | the non-exercise of one or more of the rights that are specifically 520 | granted under this License. You may not convey a covered work if you 521 | are a party to an arrangement with a third party that is in the 522 | business of distributing software, under which you make payment to the 523 | third party based on the extent of your activity of conveying the 524 | work, and under which the third party grants, to any of the parties 525 | who would receive the covered work from you, a discriminatory patent 526 | license (a) in connection with copies of the covered work conveyed by 527 | you (or copies made from those copies), or (b) primarily for and in 528 | connection with specific products or compilations that contain the 529 | covered work, unless you entered into that arrangement, or that patent 530 | license was granted, prior to 28 March 2007. 531 | 532 | Nothing in this License shall be construed as excluding or limiting 533 | any implied license or other defenses to infringement that may 534 | otherwise be available to you under applicable patent law. 535 | 536 | #### 12. No Surrender of Others' Freedom. 537 | 538 | If conditions are imposed on you (whether by court order, agreement or 539 | otherwise) that contradict the conditions of this License, they do not 540 | excuse you from the conditions of this License. If you cannot convey a 541 | covered work so as to satisfy simultaneously your obligations under 542 | this License and any other pertinent obligations, then as a 543 | consequence you may not convey it at all. For example, if you agree to 544 | terms that obligate you to collect a royalty for further conveying 545 | from those to whom you convey the Program, the only way you could 546 | satisfy both those terms and this License would be to refrain entirely 547 | from conveying the Program. 548 | 549 | #### 13. Use with the GNU Affero General Public License. 550 | 551 | Notwithstanding any other provision of this License, you have 552 | permission to link or combine any covered work with a work licensed 553 | under version 3 of the GNU Affero General Public License into a single 554 | combined work, and to convey the resulting work. The terms of this 555 | License will continue to apply to the part which is the covered work, 556 | but the special requirements of the GNU Affero General Public License, 557 | section 13, concerning interaction through a network will apply to the 558 | combination as such. 559 | 560 | #### 14. Revised Versions of this License. 561 | 562 | The Free Software Foundation may publish revised and/or new versions 563 | of the GNU General Public License from time to time. Such new versions 564 | will be similar in spirit to the present version, but may differ in 565 | detail to address new problems or concerns. 566 | 567 | Each version is given a distinguishing version number. If the Program 568 | specifies that a certain numbered version of the GNU General Public 569 | License "or any later version" applies to it, you have the option of 570 | following the terms and conditions either of that numbered version or 571 | of any later version published by the Free Software Foundation. If the 572 | Program does not specify a version number of the GNU General Public 573 | License, you may choose any version ever published by the Free 574 | Software Foundation. 575 | 576 | If the Program specifies that a proxy can decide which future versions 577 | of the GNU General Public License can be used, that proxy's public 578 | statement of acceptance of a version permanently authorizes you to 579 | choose that version for the Program. 580 | 581 | Later license versions may give you additional or different 582 | permissions. However, no additional obligations are imposed on any 583 | author or copyright holder as a result of your choosing to follow a 584 | later version. 585 | 586 | #### 15. Disclaimer of Warranty. 587 | 588 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 589 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 590 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT 591 | WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT 592 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 593 | A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND 594 | PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE 595 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR 596 | CORRECTION. 597 | 598 | #### 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR 602 | CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 603 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES 604 | ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT 605 | NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR 606 | LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM 607 | TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER 608 | PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 609 | 610 | #### 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ooproxy 2 | 3 | # Deprecated, no longer maintained 4 | 5 | A reverse OpenID Connect and OAuth 2 proxy, implementing the client-credentials flow (machine-to-machine authentication/authorization). It can be used to protect http-based APIs with an authentication mechanism. Because it only supports the client-credentials flow, there are no redirects when the authentication fails, and only bearer tokens are supported in the authorization header. 6 | 7 | The proxy has the following advantages: 8 | * Low resource usage (CPU / Memory), small docker image 9 | * Doesn't put a lot of strain on the SSO server, will only retrieve new keys on the first request, when keys are rotated and on an optional timeout 10 | 11 | The proxy supports the following algorithms: 12 | 13 | * RS256 14 | * RS384 15 | * RS512 16 | * HS256 17 | * HS384 18 | * HS512 19 | 20 | ![The reverse authentication proxy](proxy.png) 21 | 22 | ## Configuration 23 | 24 | The proxy can be configured through environment variables: 25 | 26 | * LISTEN_URL -> The url the proxy listens on 27 | * LISTEN_SSL_URL -> The SSL url the proxy listens on (if this is set, also configure CERT_FILE) 28 | * PROVIDER_URL -> The OpenID connect provider root url, no trailing slashes 29 | * UPSTREAM_URL -> The upstream url for the proxy (the resource it's protecting) 30 | * CLIENT_SECRET -> The OpenID client secret (optional, necessary when using symmetric token encryption algorithms) 31 | * KEY_EXPIRY_SECS -> Check for new jkws keys every x seconds (optional, defaults to no timeout) 32 | * UPSTREAM_TIMEOUT_SECS -> Requests to upstream timeout after x seconds (optional, defaults to 1 hour) 33 | * AUDIENCE -> Validate that the "aud" claim matches this value (optional, not validated when not provided). Since the aud claim can be either an array, or a single string, the configuration must be in json format. Use ["a", "b"] if you want to validate it as an array, or "c" if you want to validate that it's that exact value. 34 | * SUBJECT -> Validate that the "sub" claim matches this value (optional, not validated when not provided) 35 | * LEEWAY -> The amount of clock skew in seconds that is allowed to occur when validating tokens (optional, defaults to 0) 36 | * NUM_WORKERS -> Number of threads (optional, defaults to two) 37 | * CERT_FILE -> A pfx SSL certificate (optional, needs to be configured if listen_ssl_url is configured) 38 | * CERT_PASSWORD -> A password to decrypt the certificate (optional) 39 | * RUST_LOG -> Either error, warning, info, debug or all (optional, for enabling logging) 40 | 41 | It also supports loading a configuration from a settings.toml file in $PATH: 42 | 43 | ``` 44 | listen_url = "0.0.0.0:8080' 45 | listen_ssl_url = '0.0.0.0:4443' 46 | cert_file = 'cert.pfx' 47 | cert_password = 'hunter2' 48 | upstream_url = 'http://upstream.com' 49 | provider_url = 'https://my-identity.com' 50 | client_secret = 'secret' 51 | key_expiry_secs = 3600 52 | upstream_timeout_secs = 120 53 | audience = '"my-api"' 54 | subject = 'my-user' 55 | leeway = 3 56 | num_workers = 8 57 | ``` 58 | 59 | ## Run 60 | 61 | Run from [docker](https://hub.docker.com/r/hal24000/ooproxy/): 62 | 63 | `docker run -e LISTEN_URL=0.0.0.0:80 -e PROVIDER_URL=https://identity -e CLIENT_SECRET=secret -e UPSTREAM_URL=https://upstream/ -e RUST_LOG=info -e KEY_EXPIRY_SECS=3600 -e UPSTREAM_TIMEOUT_SECS=60 -e NUM_WORKERS=4 -e AUDIENCE='\"myproxy\"' -e SUBJECT=myuser -e LEEWAY=2 -e CERT_FILE=cert.pfx -e CERT_PASSWORD=hunter2 hal24000/ooproxy:lastest` 64 | 65 | Run outside docker (after building, use a settings.toml file): 66 | 67 | `ooproxy` 68 | 69 | ## Build 70 | 71 | If you want to run the proxy inside docker: 72 | 73 | `docker build . -t ooproxy --build-arg features=` 74 | 75 | For a docker image with TLS use: 76 | 77 | `docker build . -t ooproxy --build-arg features=tls` 78 | 79 | Or, if you want to run the proxy outside of docker: 80 | 81 | `cargo install ooproxy` 82 | 83 | With TLS: 84 | 85 | `cargo install ooproxy --all-features` 86 | 87 | ## How to authenticate 88 | 89 | To authenticate to your APIs, use the client credentials flow, using the correct credentials for the client (indicated by client and secret). Example with curl: 90 | 91 | * Get a token from your identity server: curl -X POST -d "client_id=client&client_secret=secret&grant_type=client_credentials" https://identity/connect/token 92 | * Authenticate with token: curl -H "Authorization: Bearer ey..." "https://proxy/my/url 93 | 94 | ## Copyright 95 | 96 | HAL 24000 B.V. 2018 97 | -------------------------------------------------------------------------------- /integration_test/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | echo: 5 | image: jmalloc/echo-server 6 | ports: 7 | - "8080:8080" 8 | 9 | proxy: 10 | image: ooproxy 11 | build: 12 | context: .. 13 | environment: 14 | - LISTEN_URL=0.0.0.0:8081 15 | - LISTEN_SSL_URL=0.0.0.0:4433 16 | - PROVIDER_URL=http://identity 17 | - UPSTREAM_URL=http://echo:8080 18 | - CERT_FILE=test.pfx 19 | - CERT_PASSWORD=idsrv3test 20 | - RUST_LOG=info 21 | links: 22 | - identity 23 | - echo 24 | ports: 25 | - "8081:8081" 26 | - "4433:4433" 27 | volumes: 28 | - ./test.pfx:/test.pfx 29 | depends_on: 30 | - identity 31 | - echo 32 | 33 | # Discovery: curl localhost/.well-known/openid-configuration 34 | # JWKS: curl localhost/.well-known/openid-configuration/jwks 35 | # Get token: curl -X POST -d "client_id=&client_secret=&grant_type=client_credentials" localhost/connect/token 36 | # Authenticate with token: curl -H "Authorization: Bearer ey..." "http://localhost:8081" 37 | identity: 38 | image: identityserver 39 | links: 40 | - sql 41 | depends_on: 42 | - sql 43 | ports: 44 | - "80:80" 45 | environment: 46 | # Generated test values specifically for this integration test 47 | - SigningKey=MIIKAgIBAzCCCb4GCSqGSIb3DQEHAaCCCa8EggmrMIIJpzCCBfgGCSqGSIb3DQEHAaCCBekEggXlMIIF4TCCBd0GCyqGSIb3DQEMCgECoIIE9jCCBPIwHAYKKoZIhvcNAQwBAzAOBAjnYG7CPWV2bQICB9AEggTQYxInbu3Ez6ewpVlLG/sqhwcfTK1N4qrnCW564hVkqvURvPl2/g4ObQSWnC7WBljIQpSPS45oSg99PcKLW8onKZMCOc3UY5hRyGBrVdtQGFDEDEetAiPBt33ITSBEFlMBvOPXQ57k0y/5J4gygOP7/QJ1q89kfoz3epg1ZxNwDP+xQznrWe7XlLUnitOQ8pwOHFiNsCpWPaW3NwXvqye/ue9/W2I2mldVxdod2Zyeyw0pnw1lDxnqevlLNYCx6gZFoTOZ/dLd5mh9uoDoBr80Yn0YB+3dOOxXuJacqXoar/X1n8dF3KTTNjipN2qi+erDQfuQfhhUbW1ol9oK+tP4iNQKNaMsnWGhdqNgj7l7dBOHazij8ACbA7TIIu1kYCzGILwxjUzHyPpRb1gFnC5qNjQ7RKzMqn/itMwoSruy9rcnAQ0DR9dsBH8vAsVAxOuDCULmIhzazHRi9BTvJiDhSz1WdwdjXORZcC3BZsGitKCbWWSz6lwz3jLyRraNVqUpDUMQ0Lx/iweGigXesA4DZuYzM4x5Y24PacTuaRgDpwBe5uHkewX1SXHV5Ja4lRVDR+aiasd38TZIdUYFfAQ6BMeZ/yZAEUv3cLPysXqJo1PXVKJIE3qo41nUMkb0IpOczniF+ArIWKC0zTdJa94SlCZjB72HkeU2DmzjuL1QyIzXBoOSsUBEp1WJdWgFBVguUfcIuo5M7z/qLxL7lyCeHoKTO4A+j8w2qtxxIjE5WesOA45mO+plpbvHA9/EY4I8nty7j+M1pNshapK8flgfSSuXkeEAMYw1U7D9ZFimFiQkFP7RfjEkQpNtLsQNcas+aSdPB7xg1TuvkymOvXqdBAgXmgz3rd9OWjzyt7SSAbmH9kqZmTQarLl3CD+jGDHPiAc20sHzOGy385fth2misLidkx/O9b5p2h3/cF9vOusrdXloegX4MNADYAOHKEqtvK+z/9JA+A7ArX01P5QwvmCSNCITh8x75hiKaCRDrUWxWiq7srRTjvCQQOgpIeZEzqV0YsDcIWmJJFc0gd3gJ7+hrYyLCfFBHyyv8nUYW8ph8HFGhmrE/utxDnIFUhIj2BQx1HvA4zoQhBRtYisKUuzaUaOofmHQLuVvjgy7v9JQCeIAFN1TG1lGqzsLUMwrKeQfLiPhTDmIt/rKxmCo4MnfblkeQ+6UeLStWF7oPcOVvnzEDB0Y1/Udjw4oEJxnhYNMxX2SM67vRiJBdugAddD4MQe/al86FWLGFtBWPopLjrZhwzmkI+QOLOssML8vozx2Py4ruhBjRRBXOhnAXHTnTh6Pp+iyzZ7LxzTOBA1HyBDUnW3zpScFQcdocoJ4NgQrfnq9VEqe+sMlG2bClnk5IQ70xe8i/dAnETENq9EdnbrNdyybgS+qh/PrBo34N2wNiZKiwj4yKAffEuRarH36IhSctYG+M6hCnQX3PWB/7AQ2NI6jBPkNFmlIpxugRNH/1Fyic6h1tls41zSA6nGYYep90p9K6uSpDYg2Ay2fN500JBn73tkdfAopGAP71OGy2DR4IZH4AwZOz1dyQSaI5+pre3pxNhVIpg6GjC9ecx0PG/PetaKeioXgJ3Vpp8kaWHFXnUW2npllyJHwbPTI8diStIhV/zf5gYaIRQQxgdMwEwYJKoZIhvcNAQkVMQYEBAEAAAAwXQYJKoZIhvcNAQkUMVAeTgB0AGUALQBkAGEAMwA3ADEAZAA5AGYALQBjAGYAYgA4AC0ANAA5AGQANQAtAGEAZAA4ADkALQBlADUAZQBlAGUAOAAwADEAYwBiADYANjBdBgkrBgEEAYI3EQExUB5OAE0AaQBjAHIAbwBzAG8AZgB0ACAAUwBvAGYAdAB3AGEAcgBlACAASwBlAHkAIABTAHQAbwByAGEAZwBlACAAUAByAG8AdgBpAGQAZQByMIIDpwYJKoZIhvcNAQcGoIIDmDCCA5QCAQAwggONBgkqhkiG9w0BBwEwHAYKKoZIhvcNAQwBAzAOBAgPvEt2wFv9vQICB9CAggNg5RqNZ6vQJ7cqoPHquqoy5L13lBjV1cITo5OeMtlXU9B2FAyq4XrmpRlvdEJXTjYoLIkRUCh+396ZMJoCUeDf+Dako02gS3mXJnP3fJriMSwyo0d3Xqt8MAIkKoqA1bQ6vsereBVtakCiBE3SxInMkv+tFEonOvD/mTJFYZqQq2NXJn5ard4FkE+1Pz4eEJi/51CxEp/WcBLneQ2RxAmY37ll6gOET59XQvq7jbl7gWN/IEL9P22JXNswGMuJ04vdYmER+ldnpukQb9VBRIIYcCyk8IhavE+pYx2WrLuuD0grg7V+/Kwevy9au86/ZjDoG8hiI5glndslkZbGIhO2eBFB/j0Ao/ICXVXym+pT58iaKXyJzq0hfVJ82o0EcQQ9HEprVrzpM3cJMh2bVxF3djReOvjeCu23vMqd5g7KuXXsmCNVrm8EpkwoGP6RAxlBRCJ8zP3/tBshr90L6oy1lVzJzB8HVHMUBX86OcAmggeqENl7Tq4YfG+EsOxKRs7PiI5QBMjCEBdh1B6WViEhbpdUS/yOCcYIa69QfN/CkUTdPcu5swxPDnl0yv+oSKJt+7EgEbDQmZeW3Wtp6TYbxVnLu/LK0maiTjnbRwMvIEKb5URO0hOsYUm0Iyr+EToFTFqwPAC15QUhpi86uI1ZJ6I+dZUbHyoUinupVjHvtBW2REb27myJUiTZH73iiNfoA1sLEC2zeGkTuXb2+qWrVIGZf/74t1HAbAMuQm/9gGG3YxKYZq1Px2EF22agPnDd+A9FbNT0zRqDoPcbc3sgvH9iRKHp9xeu35FZWDbzVX+kp+kFN2JEFnOfVUUoFNuklBuFLK2c8TRzsW+VLz288NoHTLhV9h/Ef7360CuOkaNpTEdo/ZsYWPZ2Ck8Z/fmH/R3KkURh2+uIRSCy/qczKVHz8LlEP1UqtI46PF9n517ULJusqtqLseP+H0H3IsADOTRzvt3BNbRvWeQm7XbZTCsByCzY0TdE+O5oLeyrLWNWAUJr3RsXwb2ip+oWMD2dF06jjiZ8NW3ct7Ed/cH4k1KLqoMxI5R5wk2kNG9cWOk6Gkk1ijLux+bxjzyddi7pBcQV3j1Z6DA2ZOiM+1BeWWvk2FhCzfuNoqY78eKCQ3nQhh1Z5vVEQuqHPdi8tFU0MDswHzAHBgUrDgMCGgQUIXg8gCWpI0kknMURpF+qmosoW14EFC3OZtPqayoz/t6Bu+J9rRVsdY3UAgIH0A== 48 | - Seed=1 49 | - PublicOrigin=http://identity 50 | - FromAddress=admin@hal24k.com 51 | - ConnectionString=server=sql;database=identity;User Id=SA;Password=_TestTest24kk42_ 52 | - ASPNETCORE_ENVIRONMENT=Development 53 | - DatabaseEncryptionKey=5k0XHn0FoF/LDZt2dfHiwMf+nLEls5Zlk377kAaJPZo= 54 | 55 | sql: 56 | image: microsoft/mssql-server-linux:2017-latest 57 | ports: 58 | - "1433:1433" 59 | environment: 60 | - ACCEPT_EULA=y 61 | - SA_PASSWORD=_TestTest24kk42_ 62 | -------------------------------------------------------------------------------- /integration_test/ooproxy.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "b67787ba-aed7-4fe4-a0f5-81f1da7ee5c1", 3 | "name": "ooproxy", 4 | "description": null, 5 | "auth": { 6 | "type": "bearer", 7 | "bearer": [ 8 | { 9 | "key": "token", 10 | "value": "{{token}}", 11 | "type": "string" 12 | } 13 | ] 14 | }, 15 | "events": [ 16 | { 17 | "listen": "prerequest", 18 | "script": { 19 | "id": "6a787da6-c1f7-4064-939e-49ce3ed89c10", 20 | "type": "text\/javascript", 21 | "exec": [ 22 | "" 23 | ] 24 | } 25 | }, 26 | { 27 | "listen": "test", 28 | "script": { 29 | "id": "8dcce3db-c180-4991-a65a-619bba0fc402", 30 | "type": "text\/javascript", 31 | "exec": [ 32 | "" 33 | ] 34 | } 35 | } 36 | ], 37 | "variables": [], 38 | "order": [ 39 | "4c0651d4-d013-4aaa-bd18-65b29670fcea", 40 | "beb18fb8-33bb-4c4a-855e-4a7324eea254", 41 | "1a887c35-7ee3-4fa9-bd37-8c9cfe8fe03c", 42 | "bcdd790a-3b1c-4a13-b6d4-9c17c34affb3", 43 | "efb7d2b7-0262-499c-b5e6-d31bac504268", 44 | "52307386-2e78-4beb-a33f-35512955e360", 45 | "05c3a390-612e-41bb-b23a-c09759d138cf" 46 | ], 47 | "folders_order": [], 48 | "folders": [], 49 | "requests": [ 50 | { 51 | "id": "05c3a390-612e-41bb-b23a-c09759d138cf", 52 | "name": "No auth", 53 | "url": "{{proxy}}\/test", 54 | "description": null, 55 | "data": null, 56 | "dataMode": null, 57 | "headerData": [], 58 | "method": "GET", 59 | "pathVariableData": [], 60 | "queryParams": [], 61 | "auth": { 62 | "type": "noauth", 63 | "noauth": [] 64 | }, 65 | "events": [ 66 | { 67 | "listen": "test", 68 | "script": { 69 | "id": "f908e11a-793c-4913-b13a-fabf2be8d9eb", 70 | "exec": [ 71 | "pm.test(\"Status code is 403\", function () {", 72 | " pm.response.to.have.status(403);", 73 | "});" 74 | ], 75 | "type": "text\/javascript" 76 | } 77 | } 78 | ], 79 | "folder": null, 80 | "preRequestScript": null, 81 | "tests": "pm.test(\"Status code is 403\", function () {\n pm.response.to.have.status(403);\n});", 82 | "currentHelper": null, 83 | "helperAttributes": null, 84 | "collectionId": "b67787ba-aed7-4fe4-a0f5-81f1da7ee5c1", 85 | "headers": "", 86 | "pathVariables": [] 87 | }, 88 | { 89 | "id": "1a887c35-7ee3-4fa9-bd37-8c9cfe8fe03c", 90 | "name": "Post", 91 | "url": "{{proxy}}\/test", 92 | "description": null, 93 | "data": [], 94 | "dataMode": "raw", 95 | "headerData": [ 96 | { 97 | "key": "Content-Type", 98 | "value": "application\/graphql", 99 | "type": "text" 100 | } 101 | ], 102 | "method": "POST", 103 | "pathVariableData": [], 104 | "queryParams": [], 105 | "auth": null, 106 | "events": [ 107 | { 108 | "listen": "test", 109 | "script": { 110 | "id": "0a86fd56-3f85-4326-867b-69caecc21385", 111 | "exec": [ 112 | "pm.test(\"Successfull request\", function () {", 113 | " pm.expect(pm.response.code).to.be.oneOf([200, 201]);", 114 | "});", 115 | "", 116 | "pm.test(\"Proxied GET request\", function () {", 117 | " pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 POST \/test\");", 118 | "});", 119 | "", 120 | "pm.test(\"Proxied body\", function () {", 121 | " pm.expect(pm.response.text()).to.include(\"bodytest\");", 122 | "});", 123 | "", 124 | "pm.test(\"Proxied header\", function () {", 125 | " pm.expect(pm.response.text()).to.include(\"Content-Type: application\/graphql\");", 126 | "});" 127 | ], 128 | "type": "text\/javascript" 129 | } 130 | } 131 | ], 132 | "folder": null, 133 | "preRequestScript": null, 134 | "tests": "pm.test(\"Successfull request\", function () {\n pm.expect(pm.response.code).to.be.oneOf([200, 201]);\n});\n\npm.test(\"Proxied GET request\", function () {\n pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 POST \/test\");\n});\n\npm.test(\"Proxied body\", function () {\n pm.expect(pm.response.text()).to.include(\"bodytest\");\n});\n\npm.test(\"Proxied header\", function () {\n pm.expect(pm.response.text()).to.include(\"Content-Type: application\/graphql\");\n});", 135 | "currentHelper": null, 136 | "helperAttributes": null, 137 | "collectionId": "b67787ba-aed7-4fe4-a0f5-81f1da7ee5c1", 138 | "rawModeData": "bodytest", 139 | "headers": "Content-Type: application\/graphql\n", 140 | "pathVariables": [] 141 | }, 142 | { 143 | "id": "4c0651d4-d013-4aaa-bd18-65b29670fcea", 144 | "name": "Authentication", 145 | "url": "{{identity}}\/connect\/token", 146 | "description": null, 147 | "data": [ 148 | { 149 | "key": "client_id", 150 | "value": "client", 151 | "type": "text" 152 | }, 153 | { 154 | "key": "client_secret", 155 | "value": "secret", 156 | "type": "text" 157 | }, 158 | { 159 | "key": "grant_type", 160 | "value": "client_credentials", 161 | "type": "text" 162 | } 163 | ], 164 | "dataMode": "params", 165 | "headerData": [], 166 | "method": "POST", 167 | "pathVariableData": [], 168 | "queryParams": [], 169 | "auth": { 170 | "type": "noauth" 171 | }, 172 | "events": [ 173 | { 174 | "listen": "test", 175 | "script": { 176 | "id": "032f8b3a-1008-4517-99a5-c8d7700e7ada", 177 | "exec": [ 178 | "pm.globals.set(\"token\", pm.response.json()[\"access_token\"]);", 179 | "", 180 | "pm.test(\"Successfull request\", function () {", 181 | " pm.expect(pm.response.code).to.be.oneOf([200, 201]);", 182 | "});" 183 | ], 184 | "type": "text\/javascript" 185 | } 186 | } 187 | ], 188 | "folder": null, 189 | "preRequestScript": null, 190 | "tests": "pm.globals.set(\"token\", pm.response.json()[\"access_token\"]);\n\npm.test(\"Successfull request\", function () {\n pm.expect(pm.response.code).to.be.oneOf([200, 201]);\n});", 191 | "currentHelper": null, 192 | "helperAttributes": null, 193 | "collectionId": "b67787ba-aed7-4fe4-a0f5-81f1da7ee5c1", 194 | "headers": "", 195 | "pathVariables": [] 196 | }, 197 | { 198 | "id": "52307386-2e78-4beb-a33f-35512955e360", 199 | "name": "Delete", 200 | "url": "{{proxy}}\/test", 201 | "description": null, 202 | "data": [], 203 | "dataMode": "raw", 204 | "headerData": [ 205 | { 206 | "key": "Content-Type", 207 | "value": "application\/graphql", 208 | "type": "text" 209 | } 210 | ], 211 | "method": "DELETE", 212 | "pathVariableData": [], 213 | "queryParams": [], 214 | "auth": null, 215 | "events": [ 216 | { 217 | "listen": "test", 218 | "script": { 219 | "id": "272bb600-80a4-491e-b88c-2794f3c6bf2d", 220 | "exec": [ 221 | "pm.test(\"Successfull request\", function () {", 222 | " pm.expect(pm.response.code).to.be.oneOf([200, 201]);", 223 | "});", 224 | "", 225 | "pm.test(\"Proxied GET request\", function () {", 226 | " pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 DELETE \/test\");", 227 | "});", 228 | "", 229 | "pm.test(\"Proxied body\", function () {", 230 | " pm.expect(pm.response.text()).to.include(\"bodytest\");", 231 | "});", 232 | "", 233 | "pm.test(\"Proxied header\", function () {", 234 | " pm.expect(pm.response.text()).to.include(\"Content-Type: application\/graphql\");", 235 | "});" 236 | ], 237 | "type": "text\/javascript" 238 | } 239 | } 240 | ], 241 | "folder": null, 242 | "preRequestScript": null, 243 | "tests": "pm.test(\"Successfull request\", function () {\n pm.expect(pm.response.code).to.be.oneOf([200, 201]);\n});\n\npm.test(\"Proxied GET request\", function () {\n pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 DELETE \/test\");\n});\n\npm.test(\"Proxied body\", function () {\n pm.expect(pm.response.text()).to.include(\"bodytest\");\n});\n\npm.test(\"Proxied header\", function () {\n pm.expect(pm.response.text()).to.include(\"Content-Type: application\/graphql\");\n});", 244 | "currentHelper": null, 245 | "helperAttributes": null, 246 | "collectionId": "b67787ba-aed7-4fe4-a0f5-81f1da7ee5c1", 247 | "rawModeData": "bodytest", 248 | "headers": "Content-Type: application\/graphql\n", 249 | "pathVariables": [] 250 | }, 251 | { 252 | "id": "bcdd790a-3b1c-4a13-b6d4-9c17c34affb3", 253 | "name": "Send File", 254 | "url": "{{proxy}}\/test", 255 | "description": null, 256 | "data": null, 257 | "dataMode": "binary", 258 | "headerData": [ 259 | { 260 | "key": "Content-Type", 261 | "name": "Content-Type", 262 | "value": "application\/x-www-form-urlencoded", 263 | "description": "", 264 | "type": "text" 265 | } 266 | ], 267 | "method": "POST", 268 | "pathVariableData": [], 269 | "queryParams": [], 270 | "auth": null, 271 | "events": [ 272 | { 273 | "listen": "test", 274 | "script": { 275 | "id": "0a86fd56-3f85-4326-867b-69caecc21385", 276 | "exec": [ 277 | "pm.test(\"Successfull request\", function () {", 278 | " pm.expect(pm.response.code).to.be.oneOf([200, 201]);", 279 | "});", 280 | "", 281 | "pm.test(\"Proxied GET request\", function () {", 282 | " pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 POST \/test\");", 283 | "});" 284 | ], 285 | "type": "text\/javascript" 286 | } 287 | } 288 | ], 289 | "folder": null, 290 | "preRequestScript": null, 291 | "tests": "pm.test(\"Successfull request\", function () {\n pm.expect(pm.response.code).to.be.oneOf([200, 201]);\n});\n\npm.test(\"Proxied GET request\", function () {\n pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 POST \/test\");\n});", 292 | "currentHelper": null, 293 | "helperAttributes": null, 294 | "collectionId": "b67787ba-aed7-4fe4-a0f5-81f1da7ee5c1", 295 | "headers": "Content-Type: application\/x-www-form-urlencoded\n", 296 | "pathVariables": [] 297 | }, 298 | { 299 | "id": "beb18fb8-33bb-4c4a-855e-4a7324eea254", 300 | "name": "Get", 301 | "url": "{{proxy}}\/test", 302 | "description": null, 303 | "data": [], 304 | "dataMode": "raw", 305 | "headerData": [ 306 | { 307 | "key": "Content-Type", 308 | "value": "application\/graphql", 309 | "type": "text" 310 | } 311 | ], 312 | "method": "GET", 313 | "pathVariableData": [], 314 | "queryParams": [], 315 | "auth": null, 316 | "events": [ 317 | { 318 | "listen": "test", 319 | "script": { 320 | "id": "290c12bd-62bc-4ae7-be86-b629811e93f1", 321 | "exec": [ 322 | "pm.test(\"Successfull request\", function () {", 323 | " pm.expect(pm.response.code).to.be.oneOf([200, 201]);", 324 | "});", 325 | "", 326 | "pm.test(\"Proxied GET request\", function () {", 327 | " pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 GET \/test\");", 328 | "});", 329 | "", 330 | "pm.test(\"Proxied body\", function () {", 331 | " pm.expect(pm.response.text()).to.include(\"bodytest\");", 332 | "});", 333 | "", 334 | "pm.test(\"Proxied header\", function () {", 335 | " pm.expect(pm.response.text()).to.include(\"Content-Type: application\/graphql\");", 336 | "});" 337 | ], 338 | "type": "text\/javascript" 339 | } 340 | } 341 | ], 342 | "folder": null, 343 | "protocolProfileBehavior": { 344 | "disableBodyPruning": true 345 | }, 346 | "preRequestScript": null, 347 | "tests": "pm.test(\"Successfull request\", function () {\n pm.expect(pm.response.code).to.be.oneOf([200, 201]);\n});\n\npm.test(\"Proxied GET request\", function () {\n pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 GET \/test\");\n});\n\npm.test(\"Proxied body\", function () {\n pm.expect(pm.response.text()).to.include(\"bodytest\");\n});\n\npm.test(\"Proxied header\", function () {\n pm.expect(pm.response.text()).to.include(\"Content-Type: application\/graphql\");\n});", 348 | "currentHelper": null, 349 | "helperAttributes": null, 350 | "collectionId": "b67787ba-aed7-4fe4-a0f5-81f1da7ee5c1", 351 | "rawModeData": "bodytest", 352 | "headers": "Content-Type: application\/graphql\n", 353 | "pathVariables": [] 354 | }, 355 | { 356 | "id": "efb7d2b7-0262-499c-b5e6-d31bac504268", 357 | "name": "Put", 358 | "url": "{{proxy}}\/test", 359 | "description": null, 360 | "data": [], 361 | "dataMode": "raw", 362 | "headerData": [ 363 | { 364 | "key": "Content-Type", 365 | "value": "application\/graphql", 366 | "type": "text" 367 | } 368 | ], 369 | "method": "PUT", 370 | "pathVariableData": [], 371 | "queryParams": [], 372 | "auth": null, 373 | "events": [ 374 | { 375 | "listen": "test", 376 | "script": { 377 | "id": "01b228a9-79df-44cd-a612-a1d47e7d8fd4", 378 | "exec": [ 379 | "pm.test(\"Successfull request\", function () {", 380 | " pm.expect(pm.response.code).to.be.oneOf([200, 201]);", 381 | "});", 382 | "", 383 | "pm.test(\"Proxied GET request\", function () {", 384 | " pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 PUT \/test\");", 385 | "});", 386 | "", 387 | "pm.test(\"Proxied body\", function () {", 388 | " pm.expect(pm.response.text()).to.include(\"bodytest\");", 389 | "});", 390 | "", 391 | "pm.test(\"Proxied header\", function () {", 392 | " pm.expect(pm.response.text()).to.include(\"Content-Type: application\/graphql\");", 393 | "});" 394 | ], 395 | "type": "text\/javascript" 396 | } 397 | } 398 | ], 399 | "folder": null, 400 | "preRequestScript": null, 401 | "tests": "pm.test(\"Successfull request\", function () {\n pm.expect(pm.response.code).to.be.oneOf([200, 201]);\n});\n\npm.test(\"Proxied GET request\", function () {\n pm.expect(pm.response.text()).to.include(\"HTTP\/1.1 PUT \/test\");\n});\n\npm.test(\"Proxied body\", function () {\n pm.expect(pm.response.text()).to.include(\"bodytest\");\n});\n\npm.test(\"Proxied header\", function () {\n pm.expect(pm.response.text()).to.include(\"Content-Type: application\/graphql\");\n});", 402 | "currentHelper": null, 403 | "helperAttributes": null, 404 | "collectionId": "b67787ba-aed7-4fe4-a0f5-81f1da7ee5c1", 405 | "rawModeData": "bodytest", 406 | "headers": "Content-Type: application\/graphql\n", 407 | "pathVariables": [] 408 | } 409 | ] 410 | } -------------------------------------------------------------------------------- /integration_test/test.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HAL24K/ooproxy/d296d850c4f5e9d764851e6b54adf5a401d7a0d9/integration_test/test.pfx -------------------------------------------------------------------------------- /ooproxy.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | "debug.allowBreakpointsEverywhere": true 9 | } 10 | } -------------------------------------------------------------------------------- /proxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HAL24K/ooproxy/d296d850c4f5e9d764851e6b54adf5a401d7a0d9/proxy.png -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | /// OOProxy - An OpenID and OAuth2 reverse proxy 2 | /// Copyright (C) 2018 HAL24000 B.V. 3 | /// 4 | /// This program is free software: you can redistribute it and/or modify 5 | /// it under the terms of the GNU General Public License as published by 6 | /// the Free Software Foundation, either version 3 of the License, or 7 | /// (at your option) any later version. 8 | /// 9 | /// This program is distributed in the hope that it will be useful, 10 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | /// GNU General Public License for more details. 13 | /// 14 | /// You should have received a copy of the GNU General Public License 15 | /// along with this program. If not, see . 16 | 17 | mod openid; 18 | mod token; 19 | 20 | use actix_web::{client, error, middleware, server, App, AsyncResponder, Body, Error, HttpMessage, HttpRequest, HttpResponse, Responder}; 21 | use bytes::Bytes; 22 | use futures::{Future, Stream, future}; 23 | use jsonwebtoken::{Algorithm, Validation}; 24 | use std::time::{Duration, Instant}; 25 | use serde::Deserialize; 26 | use log::info; 27 | use std::{cmp, hash, str, sync, collections, fmt}; 28 | use config::{FileFormat, ConfigError}; 29 | #[cfg(feature = "tls")] 30 | use native_tls::{TlsAcceptor, Identity}; 31 | #[cfg(feature = "tls")] 32 | use std::io::Read; 33 | #[cfg(not(feature = "tls"))] 34 | use log::error; 35 | use crate::error::{ErrorForbidden, ErrorInternalServerError}; 36 | use crate::client::ClientRequest; 37 | use crate::collections::HashMap; 38 | use crate::sync::{Arc, RwLock}; 39 | use crate::future::Either; 40 | use crate::token::{WrappedAlgorithm, validate_token, get_token_str, has_missing_kid}; 41 | use crate::openid::openid_connect_retrieve; 42 | 43 | /// The state of the proxy 44 | struct ProxyState { 45 | discovery_url: String, 46 | upstream_url: String, 47 | key_expiry: Option, 48 | upstream_timeout: Duration, 49 | validation_info: Arc> 50 | } 51 | 52 | /// The information/keys necessary to validate tokens, is shared among worker threads 53 | struct ValidationInfo { 54 | client_secret: Option, 55 | validation: Validation, 56 | keys: HashMap>, // Map from algorithm to key-id (kid) to the encryption key 57 | last_key_refresh: Option 58 | } 59 | 60 | #[derive(Deserialize, Debug)] 61 | /// Configuration for the actix server 62 | struct ServerConfig { 63 | listen_url: String, 64 | listen_ssl_url: Option, 65 | num_workers: Option, 66 | cert_file: Option, 67 | cert_password: Option 68 | } 69 | 70 | #[derive(Deserialize, Debug)] 71 | /// Configuration for the app state 72 | struct AppConfig { 73 | provider_url: String, 74 | upstream_url: String, 75 | key_expiry_secs: Option, 76 | upstream_timeout_secs: Option 77 | } 78 | 79 | #[derive(Deserialize, Debug)] 80 | /// Configuration for the validation of tokens 81 | struct ValidationConfig { 82 | audience: Option, 83 | client_secret: Option, 84 | subject: Option, 85 | leeway: Option 86 | } 87 | 88 | fn main() { 89 | env_logger::init(); 90 | 91 | let config: ServerConfig = get_config().expect("unable to parse ServerConfig"); 92 | 93 | let sys = actix::System::new("ooproxy"); 94 | 95 | let validation_state = get_proxy_validation_state(); 96 | 97 | let mut server = server::new(move || get_server_app(validation_state.clone())); 98 | server = server.workers(config.num_workers.unwrap_or(2)); 99 | server = server.bind(config.listen_url).expect("unable to bind to listen address"); 100 | 101 | if let (Some(listen_ssl_url), Some(cert_file)) = (config.listen_ssl_url, config.cert_file) { 102 | #[cfg(feature = "tls")] 103 | { 104 | let ssl_acceptor = get_ssl_acceptor(&cert_file, config.cert_password.as_ref().map(String::as_ref).unwrap_or("")); 105 | 106 | server = server.bind_tls(listen_ssl_url, ssl_acceptor) 107 | .expect("unable to bind to listen ssl address"); 108 | } 109 | #[cfg(not(feature = "tls"))] 110 | error!("tls is not supported in this build but options listen_ssl_url ({}) and cert_file ({}) are configured, please use a build with the 'tls' feature", listen_ssl_url, cert_file); 111 | } 112 | 113 | server.start(); 114 | 115 | info!("OOProxy - Copyright (C) 2018 HAL24000 B.V."); 116 | let _ = sys.run(); 117 | } 118 | 119 | #[cfg(feature = "tls")] 120 | /// Get an ssl acceptor, that can handle TLS for the server application 121 | fn get_ssl_acceptor(cert_file: &str, cert_password: &str) -> TlsAcceptor { 122 | let mut file = std::fs::File::open(cert_file).expect("unable to open certificate file"); 123 | let mut contents = vec![]; 124 | file.read_to_end(&mut contents).expect("unable to read certificate file"); 125 | let pkcs12 = Identity::from_pkcs12(&contents, cert_password).expect("certificate file has invalid format, needs a valid pfx file"); 126 | TlsAcceptor::builder(pkcs12).build().expect("unable to build tls") 127 | } 128 | 129 | /// Get the server app and the initial server state 130 | fn get_server_app(validation_info: Arc>) -> App { 131 | let config: AppConfig = get_config().expect("unable to parse AppConfig"); 132 | 133 | let proxy_state = ProxyState { 134 | discovery_url: config.provider_url + "/.well-known/openid-configuration", 135 | upstream_url: config.upstream_url, 136 | key_expiry: config.key_expiry_secs.map(Duration::from_secs), 137 | upstream_timeout: Duration::from_secs(config.upstream_timeout_secs.unwrap_or(3600)), 138 | validation_info: validation_info 139 | }; 140 | 141 | App::with_state(proxy_state) 142 | .middleware(middleware::Logger::default()) 143 | .default_resource(|r| r.f(handle_request)) 144 | } 145 | 146 | /// Get the initial validation state for the server app 147 | fn get_proxy_validation_state() -> Arc> { 148 | let config: ValidationConfig = get_config().expect("unable to parse ValidationConfig"); 149 | 150 | Arc::new(RwLock::new(ValidationInfo { 151 | validation: Validation { 152 | sub: config.subject, 153 | aud: config.audience.map(|a| serde_json::from_str(&a).expect("unable to parse the audience configuration as json")), 154 | leeway: config.leeway.unwrap_or(0), 155 | ..Default::default() 156 | }, 157 | keys: HashMap::>::new(), 158 | last_key_refresh: None, 159 | client_secret: config.client_secret.map(Bytes::from) 160 | })) 161 | } 162 | 163 | /// Retrieve data from the configuration file and/or environment variables 164 | fn get_config<'t, TConfig>() -> Result where TConfig: Deserialize<'t>, TConfig: fmt::Debug { 165 | let mut config = config::Config::default(); 166 | config.merge(config::File::new("settings.toml", FileFormat::Toml).required(false))? 167 | .merge(config::Environment::new())?; 168 | 169 | let result = config.try_into(); 170 | 171 | info!("reading configuration: {:?}", result); 172 | 173 | result 174 | } 175 | 176 | /// Handle a http request: 177 | /// * Sync the validation info if necessary 178 | /// * Authenticate the token 179 | /// * If everything succeeds, stream-proxy the request 180 | fn handle_request(req: &HttpRequest) -> impl Responder { 181 | let upstream_request = get_upstream_request(req); 182 | let token_str = get_token_str_from_request(req); 183 | let validation_info = &req.state().validation_info; 184 | let validation_info_sync = validation_info.clone(); 185 | let validation_info_decrypt = validation_info.clone(); 186 | 187 | sync_validation_info(&req.state().discovery_url, validation_info_sync, req.state().key_expiry, &token_str) 188 | .and_then(move |_| token_str) 189 | .and_then(move |token_str| { 190 | let state = validation_info_decrypt.read().expect("rw lock was poisoned due to earlier panic"); 191 | validate_token(&token_str, &state.client_secret, &state.keys, &state.validation) 192 | }) 193 | .and_then(move |_| stream_response(upstream_request)) 194 | .responder() 195 | } 196 | 197 | /// Synchronize the validation information if necessary 198 | fn sync_validation_info(discovery_url: &str, validation_info: Arc>, key_expiry: Option, token_str: &Result) -> impl Future { 199 | let now = Instant::now(); 200 | 201 | if needs_to_sync_validation_info(&validation_info, key_expiry, now, token_str) { 202 | info!("retrieving latest signing keys through openid"); 203 | Either::A( 204 | openid_connect_retrieve(discovery_url) 205 | .and_then(move |openid_info| { 206 | let mut state = validation_info.write().expect("rw lock was poisoned due to earlier panic"); 207 | state.validation.iss = Some(openid_info.issuer); 208 | state.validation.algorithms = openid_info.keys.keys().map(|alg| alg.0).collect(); 209 | if state.client_secret.is_some() { 210 | state.validation.algorithms.extend([Algorithm::HS256, Algorithm::HS384, Algorithm::HS512].iter()); 211 | } 212 | state.keys = openid_info.keys; 213 | state.last_key_refresh = Some(now); 214 | info!("successfully retrieved latest signing keys through openid"); 215 | Ok(()) 216 | }) 217 | ) 218 | } 219 | else { 220 | Either::B(futures::done(Ok(()))) 221 | } 222 | } 223 | 224 | /// Check if we need to synchronize the validation information (expiry or missing key-id) 225 | fn needs_to_sync_validation_info(validation_info: &Arc>, key_expiry: Option, now: Instant, token_str: &Result) -> bool { 226 | let crypto = validation_info.read().expect("rw lock was poisoned due to earlier panic"); 227 | let is_expired = match (crypto.last_key_refresh, key_expiry) { 228 | (Some(last_refresh), Some(expiry)) => now.duration_since(last_refresh) > expiry, 229 | (None, _) => true, 230 | _ => false 231 | }; 232 | let has_missing_kid = token_str.as_ref() 233 | .map(|token| has_missing_kid(token, &crypto.keys)) 234 | .unwrap_or(false); 235 | is_expired || has_missing_kid 236 | } 237 | 238 | /// Construct the upstream request, stream the body, copy the header/status, change the url to the upstream one 239 | fn get_upstream_request(req: &HttpRequest) -> Result { 240 | let upstream_url = format!( 241 | "{}{}", 242 | req.state().upstream_url, 243 | req.uri() 244 | .path_and_query() 245 | .map(|pq| pq.as_str()) 246 | .unwrap_or("") 247 | ); 248 | 249 | info!("upstream request: {}", upstream_url); 250 | 251 | let body_stream = Body::Streaming(Box::new(req.payload().from_err())); 252 | 253 | client::ClientRequest::build_from(req) 254 | .uri(upstream_url) 255 | .timeout(req.state().upstream_timeout) 256 | .body(body_stream) 257 | } 258 | 259 | /// Stream the upstream response to the client 260 | fn stream_response(req: Result) -> impl Future { 261 | futures::done(req) 262 | .and_then(|req| req.send().map_err(Error::from)) 263 | .and_then(|resp| { 264 | Ok(HttpResponse::build(resp.status()) 265 | .body(Body::Streaming(Box::new(resp.payload().from_err())))) 266 | }) 267 | } 268 | 269 | /// Retrieve the token from the authorization header 270 | fn get_token_str_from_request(req: &HttpRequest) -> Result { 271 | let header = req.headers().get("Authorization").ok_or_else(|| ErrorForbidden("authorization header not found"))?; 272 | let header_str = header.to_str().map_err(|_| ErrorInternalServerError("invalid characters in header"))?; 273 | get_token_str(header_str) 274 | } -------------------------------------------------------------------------------- /src/openid.rs: -------------------------------------------------------------------------------- 1 | /// OOProxy - An OpenID and OAuth2 reverse proxy 2 | /// Copyright (C) 2018 HAL24000 B.V. 3 | /// 4 | /// This program is free software: you can redistribute it and/or modify 5 | /// it under the terms of the GNU General Public License as published by 6 | /// the Free Software Foundation, either version 3 of the License, or 7 | /// (at your option) any later version. 8 | /// 9 | /// This program is distributed in the hope that it will be useful, 10 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | /// GNU General Public License for more details. 13 | /// 14 | /// You should have received a copy of the GNU General Public License 15 | /// along with this program. If not, see . 16 | 17 | use actix_web::{client, Error, HttpMessage}; 18 | use bytes::{Bytes, BytesMut, BufMut}; 19 | use futures; 20 | use base64; 21 | use serde_json; 22 | use futures::Future; 23 | use num::BigInt; 24 | use num::bigint::Sign; 25 | use std::{str, mem}; 26 | use std::iter::Iterator; 27 | use serde::Deserialize; 28 | use crate::collections::HashMap; 29 | use crate::error::ErrorInternalServerError; 30 | use crate::token::WrappedAlgorithm; 31 | 32 | /// The resulting information from retrieving and parsing the OpenID endpoints, contains the issuer and signing keys 33 | pub struct OpenIDInfo { 34 | pub issuer: String, 35 | pub keys: HashMap> 36 | } 37 | 38 | #[derive(Deserialize)] 39 | /// A deserialized OpenID discovery document 40 | struct OpenIDConnectDiscovery { 41 | jwks_uri: String, 42 | issuer: String, 43 | } 44 | 45 | #[derive(Deserialize)] 46 | /// A deserialized JSON web key 47 | struct JSONWebKey { 48 | alg: String, 49 | kid: Option, 50 | kty: String, 51 | #[serde(rename="use")] 52 | usage: Option, 53 | key_ops: Option>, 54 | e: Option, 55 | n: Option 56 | } 57 | 58 | #[derive(Deserialize)] 59 | /// A deserialized JSON web key set 60 | struct JSONWebKeySet { 61 | keys: Vec 62 | } 63 | 64 | /// Query the discovery and jwks endpoints for the provider and: 65 | /// 66 | /// * Retrieve the issuer identity 67 | /// * Retrieve and parse a set of signing public keys that can be used to verify jwt tokens 68 | /// 69 | /// # Arguments 70 | /// 71 | /// * `discovery_url` - The discovery url of the provider 72 | pub fn openid_connect_retrieve(discovery_url: &str) -> impl Future { 73 | openid_connect_retrieve_discovery(discovery_url) 74 | .and_then(|discovery| { 75 | openid_connect_retrieve_jwks(&discovery.jwks_uri).map(|keyset| { 76 | OpenIDInfo { issuer: discovery.issuer, keys: keyset } 77 | }) 78 | }) 79 | .map_err(|e| ErrorInternalServerError(format!("error retrieving signing keys through openid: {}", e))) 80 | } 81 | 82 | /// Retrieve the OpenID discovery document, and then parse it 83 | fn openid_connect_retrieve_discovery(discovery_url: &str) -> impl Future { 84 | futures::done(client::ClientRequest::get(discovery_url).finish()) 85 | .and_then(|req| req.send().map_err(Error::from)) 86 | .and_then(|resp| { 87 | resp.body() 88 | .map_err(Error::from) 89 | .and_then(|body| parse_discovery(&body)) 90 | }) 91 | } 92 | 93 | /// Parsing part of an OpenID Discovery document: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig 94 | /// 95 | /// # Arguments 96 | /// * `body` -> the discovery response body 97 | fn parse_discovery(body: &Bytes) -> Result { 98 | serde_json::from_slice(body).map_err(Error::from) 99 | } 100 | 101 | /// Retrieve the openid jwks uri, and decode it into a set of keys that can be used to verify signatures 102 | fn openid_connect_retrieve_jwks(jwks_uri: &str) -> impl Future>, Error = Error> { 103 | futures::done(client::ClientRequest::get(jwks_uri).finish()) 104 | .and_then(|req| req.send().map_err(Error::from)) 105 | .and_then(|resp| resp.body().map_err(Error::from)) 106 | .and_then(|body| decode_web_keyset(&body)) 107 | } 108 | 109 | /// We're: 110 | /// 111 | /// * Parsing a JSON Web Key Set document: https://tools.ietf.org/html/rfc7517 112 | /// * Filtering out the web keys we can't use 113 | /// * Parsing the signing keys 114 | /// * Putting those in a hashmap we can use to decode tokens 115 | /// * Returning a set of signing keys 116 | /// 117 | /// # Arguments 118 | /// 119 | /// * `jwt_str` - The retrieved jwk document 120 | fn decode_web_keyset(jwk_str: &Bytes) -> Result>, Error> { 121 | let key_set: JSONWebKeySet = 122 | serde_json::from_slice(jwk_str) 123 | .map_err(|e| ErrorInternalServerError(format!("failed decoding web keys: {}", e)))?; 124 | 125 | let mut key_map: HashMap> = HashMap::with_capacity(2); 126 | 127 | let mut i = ::std::i32::MIN; 128 | for (web_key, alg) in get_usable_web_keys(key_set) { 129 | let wk = decode_web_key(&web_key)?; 130 | let inner_map = key_map.entry(alg).or_insert_with(HashMap::new); 131 | inner_map.insert(web_key.kid.unwrap_or(i.to_string()), wk); 132 | i = i + 1; 133 | } 134 | 135 | Ok(key_map) 136 | } 137 | 138 | /// Filter the set of web keys so that we can retrieve the keys we can use to validate signatures 139 | fn get_usable_web_keys(key_set: JSONWebKeySet) -> impl Iterator { 140 | key_set.keys 141 | .into_iter() 142 | .filter(|web_key| web_key.kty == "RSA" && 143 | web_key.usage.as_ref().map(|us| us == "sig").unwrap_or(true) && 144 | web_key.key_ops.as_ref().map(|ko| ko.iter().any(|k| k == "verify")).unwrap_or(true)) 145 | .map(|web_key| (web_key.alg.parse::(), web_key)) 146 | .filter(|(alg, _)| alg.as_ref().map(|a| a.is_asymmetric()).unwrap_or(false)) 147 | .map(|(alg, web_key)| (web_key, alg.unwrap())) 148 | } 149 | 150 | /// The key has to go from the JWK format to the ASN.1 DER RSAPublicKey format: 151 | /// 152 | /// RSAPublicKey ::= SEQUENCE { 153 | /// modulus INTEGER, -- n 154 | /// publicExponent INTEGER -- e 155 | /// } 156 | /// 157 | /// Relevant standards: 158 | /// 159 | /// * RSAPublicKey: https://tools.ietf.org/html/rfc3447#appendix-A.1.1 160 | /// * ASN.1 DER https://www.itu.int/rec/T-REC-X.690-201508-I/en 161 | /// * JSON Web Algorithms: https://www.rfc-editor.org/rfc/rfc7518.txt 162 | /// 163 | /// # Arguments 164 | /// * `key` - The decoded JSON Web Key to convert to RSAPublicKey format 165 | fn decode_web_key(key: &JSONWebKey) -> Result { 166 | match (decode_base64urloption(&key.n), decode_base64urloption(&key.e)) { 167 | (Some(modulus), Some(exponent)) => { 168 | Ok(encode_asn1_der_rsapublickey(&modulus, &exponent)) 169 | }, 170 | _ => Err(ErrorInternalServerError("web key is missing information")) 171 | } 172 | } 173 | 174 | /// Decode a base64url-encoded string to a byte vector 175 | fn decode_base64urloption(o: &Option) -> Option> { 176 | let inner = o.as_ref()?; 177 | base64::decode_config(inner, base64::URL_SAFE).ok() 178 | } 179 | 180 | /// Encode a RSAPublicKey with ASN.1 DER 181 | /// 182 | /// # Arguments 183 | /// * `n` - Modulus, big endian unsigned encoded byte array 184 | /// * `e` - Exponent, big endian unsigned encoded byte array 185 | fn encode_asn1_der_rsapublickey(n: &[u8], e: &[u8]) -> Bytes { 186 | const CONSTRUCTED_SEQUENCE_TAG: u8 = 0x10 | 0x20; 187 | const INTEGER_TAG: u8 = 0x2; 188 | 189 | let int_buffers = 190 | [ 191 | int_be_from_unsigned_to_signed(n), 192 | int_be_from_unsigned_to_signed(e) 193 | ]; 194 | let inner_sequence_len = 195 | int_buffers.iter() 196 | .map(|buff| buff.len() + asn1_length_size(buff.len()) + 1) 197 | .sum(); 198 | let total_len = inner_sequence_len + asn1_length_size(inner_sequence_len) + 1; 199 | let mut out = BytesMut::with_capacity(total_len); 200 | out.put_u8(CONSTRUCTED_SEQUENCE_TAG); 201 | encode_asn1_length(inner_sequence_len, &mut out); 202 | for int_buffer in int_buffers.iter() { 203 | out.put_u8(INTEGER_TAG); 204 | encode_asn1_length(int_buffer.len(), &mut out); 205 | out.put_slice(int_buffer); 206 | } 207 | Bytes::from(out) 208 | } 209 | 210 | /// Encode the ASN.1 DER prefix length 211 | fn encode_asn1_length(n: usize, buff: &mut BytesMut) { 212 | if n < 128 { 213 | buff.put_u8(n as u8); 214 | } 215 | else { 216 | const LENGTH_TAG: u8 = 0x80; 217 | let num_len_bytes = (asn1_length_size(n) - 1) as u8; 218 | buff.put_u8(num_len_bytes | LENGTH_TAG); 219 | for i in (0..num_len_bytes).rev() { 220 | buff.put_u8((n >> (8 * i)) as u8); 221 | } 222 | } 223 | } 224 | 225 | /// Get the buffer size needed to encode the asn1 length 226 | fn asn1_length_size(n: usize) -> usize { 227 | if n < 128 { 228 | 1 229 | } 230 | else { 231 | 1 + mem::size_of::() - (n.leading_zeros() as usize / 8) 232 | } 233 | } 234 | 235 | // Convert an unsigned big-endian integer to a signed one 236 | fn int_be_from_unsigned_to_signed(i: &[u8]) -> Vec { 237 | BigInt::from_bytes_be(Sign::Plus, i).to_signed_bytes_be() 238 | } 239 | 240 | #[cfg(test)] 241 | mod tests { 242 | use super::*; 243 | use jsonwebtoken::Algorithm; 244 | use std::str; 245 | 246 | static DISCOVERY_DOCUMENT: &'static str = "{\"issuer\":\"http://identity\",\"jwks_uri\":\"http://identity/.well-known/openid-configuration/jwks\",\"authorization_endpoint\":\"http://identity/connect/authorize\",\"token_endpoint\":\"http://identity/connect/token\",\"userinfo_endpoint\":\"http://identity/connect/userinfo\",\"end_session_endpoint\":\"http://identity/connect/endsession\",\"check_session_iframe\":\"http://identity/connect/checksession\",\"revocation_endpoint\":\"http://identity/connect/revocation\",\"introspection_endpoint\":\"http://identity/connect/introspect\",\"frontchannel_logout_supported\":true,\"frontchannel_logout_session_supported\":true,\"backchannel_logout_supported\":true,\"backchannel_logout_session_supported\":true,\"scopes_supported\":[\"openid\",\"profile\",\"api1\",\"offline_access\"],\"claims_supported\":[\"sub\",\"name\",\"family_name\",\"given_name\",\"middle_name\",\"nickname\",\"preferred_username\",\"profile\",\"picture\",\"website\",\"gender\",\"birthdate\",\"zoneinfo\",\"locale\",\"updated_at\"],\"grant_types_supported\":[\"authorization_code\",\"client_credentials\",\"refresh_token\",\"implicit\",\"password\"],\"response_types_supported\":[\"code\",\"token\",\"id_token\",\"id_token token\",\"code id_token\",\"code token\",\"code id_token token\"],\"response_modes_supported\":[\"form_post\",\"query\",\"fragment\"],\"token_endpoint_auth_methods_supported\":[\"client_secret_basic\",\"client_secret_post\"],\"subject_types_supported\":[\"public\"],\"id_token_signing_alg_values_supported\":[\"RS256\"],\"code_challenge_methods_supported\":[\"plain\",\"S256\"]}"; 247 | static JWKS_DOCUMENT: &'static str = "{\"keys\":[{\"kty\":\"RSA\",\"use\":\"sig\",\"kid\":\"5A2FC6E95AECCD7D11A45F885FBEA9252B1851F5\",\"x5t\":\"Wi_G6VrszX0RpF-IX76pJSsYUfU\",\"e\":\"AQAB\",\"n\":\"viuRydGmSbij9PpVMEZdy29J0Ae_M883JTORRfcsKvEM1T0gdYIyX23vq86vSkmlQVOiiK--5U9HgmNm0lMojQC2KC7Gtkfh1uD7AQxDo1TBRT0BqxcBxrzyJ308AT5aiLnFVYlf4f0fvdIJZ-KAyXvAQAXLN3PwksFcYAVavGy402MzLNaqWAZ2iQ0-MD0mLfgCZItjkVbX5hvOZ9q2ZlRsw33bLttEguord12BY025yzBiZOGOZVZxEw8Ngz3gs4J23wxXpeeMUDvArPRi7se8Jev26_E8I0J77ttiuScbVDqX-lDYShsKGTDWxUcpVeqBvSk6GL-gxbPdogIokQ\",\"x5c\":[\"MIIDEjCCAfqgAwIBAgIQHkrDz62eL6FHq0bfB3HyvzANBgkqhkiG9w0BAQsFADAcMRowGAYDVQQDDBFEaW1lbnNpb25JZGVudGl0eTAeFw0xODA3MDUxNDIyMTNaFw0yODA3MDUxNDMyMTNaMBwxGjAYBgNVBAMMEURpbWVuc2lvbklkZW50aXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAviuRydGmSbij9PpVMEZdy29J0Ae/M883JTORRfcsKvEM1T0gdYIyX23vq86vSkmlQVOiiK++5U9HgmNm0lMojQC2KC7Gtkfh1uD7AQxDo1TBRT0BqxcBxrzyJ308AT5aiLnFVYlf4f0fvdIJZ+KAyXvAQAXLN3PwksFcYAVavGy402MzLNaqWAZ2iQ0+MD0mLfgCZItjkVbX5hvOZ9q2ZlRsw33bLttEguord12BY025yzBiZOGOZVZxEw8Ngz3gs4J23wxXpeeMUDvArPRi7se8Jev26/E8I0J77ttiuScbVDqX+lDYShsKGTDWxUcpVeqBvSk6GL+gxbPdogIokQIDAQABo1AwTjAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMB0GA1UdDgQWBBRq5Pqhyrrps7bwnKXudCWkBxDNZDANBgkqhkiG9w0BAQsFAAOCAQEAXdTP+pWN+T0sR1ktsSXKo0WflqYMbjV88gQYjdFF2S97W7Tbl/1NvH89II7QyPSspwgRmXtPul6DUXkzRroEv6ZHUGEBGok1Ep+xFsA8Ajs+WIdKULglf//nojsKYAvqdul3eM6Gke8HQTuvz2eQbhUQwMz9+Wu987S4UwVaxAb2hDJUVwLD9WuBHn46FvDyaxpkP/cdlR4CG8WD1B9AkcxjD/uNX19TpUuDmU6wX784OqU2maydNzvjET1k3pX472mt6jL1uLa4XokyvFELpsvUgtopiVN2h+DZruHu5pyGQCfozAJEFcFeYmX6hX78bF61wfdFMP1rsSLCYwtS+Q==\"],\"alg\":\"RS256\"}]}"; 248 | static KEY: &'static str = "MIIBCgKCAQEAviuRydGmSbij9PpVMEZdy29J0Ae/M883JTORRfcsKvEM1T0gdYIyX23vq86vSkmlQVOiiK++5U9HgmNm0lMojQC2KC7Gtkfh1uD7AQxDo1TBRT0BqxcBxrzyJ308AT5aiLnFVYlf4f0fvdIJZ+KAyXvAQAXLN3PwksFcYAVavGy402MzLNaqWAZ2iQ0+MD0mLfgCZItjkVbX5hvOZ9q2ZlRsw33bLttEguord12BY025yzBiZOGOZVZxEw8Ngz3gs4J23wxXpeeMUDvArPRi7se8Jev26/E8I0J77ttiuScbVDqX+lDYShsKGTDWxUcpVeqBvSk6GL+gxbPdogIokQIDAQAB"; 249 | 250 | #[test] 251 | fn test_discovery() { 252 | let discovery = parse_discovery(&Bytes::from(DISCOVERY_DOCUMENT)); 253 | assert!(discovery.is_ok()); 254 | let discovery_unwrapped = discovery.unwrap(); 255 | assert_eq!(discovery_unwrapped.jwks_uri, "http://identity/.well-known/openid-configuration/jwks"); 256 | assert_eq!(discovery_unwrapped.issuer, "http://identity"); 257 | } 258 | 259 | #[test] 260 | fn test_web_keyset() { 261 | let jwks = decode_web_keyset(&Bytes::from(JWKS_DOCUMENT)); 262 | assert!(jwks.is_ok()); 263 | let keys = jwks.unwrap(); 264 | 265 | assert_eq!(keys[&WrappedAlgorithm(Algorithm::RS256)].len(), 1); 266 | assert!(keys[&WrappedAlgorithm(Algorithm::RS256)].contains_key("5A2FC6E95AECCD7D11A45F885FBEA9252B1851F5")); 267 | assert_eq!(keys[&WrappedAlgorithm(Algorithm::RS256)]["5A2FC6E95AECCD7D11A45F885FBEA9252B1851F5"], base64::decode(KEY).unwrap()); 268 | } 269 | } -------------------------------------------------------------------------------- /src/token.rs: -------------------------------------------------------------------------------- 1 | /// OOProxy - An OpenID and OAuth2 reverse proxy 2 | /// Copyright (C) 2018 HAL24000 B.V. 3 | /// 4 | /// This program is free software: you can redistribute it and/or modify 5 | /// it under the terms of the GNU General Public License as published by 6 | /// the Free Software Foundation, either version 3 of the License, or 7 | /// (at your option) any later version. 8 | /// 9 | /// This program is distributed in the hope that it will be useful, 10 | /// but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | /// GNU General Public License for more details. 13 | /// 14 | /// You should have received a copy of the GNU General Public License 15 | /// along with this program. If not, see . 16 | 17 | use actix_web::Error; 18 | use bytes::Bytes; 19 | use jsonwebtoken::{decode, decode_header, Algorithm, Validation}; 20 | use serde_json::Value; 21 | use std::str; 22 | use crate::error::{ErrorForbidden, ErrorInternalServerError}; 23 | use crate::collections::HashMap; 24 | use crate::cmp::{Eq, PartialEq}; 25 | use crate::hash::{Hash, Hasher}; 26 | use crate::str::FromStr; 27 | 28 | #[derive(Clone, Copy)] 29 | /// A wrapper around the token algorithm that adds hashing, eq, fromstr parsing, and methods that determine wheter it's a symmetric or asymmetric algorithm 30 | pub struct WrappedAlgorithm(pub Algorithm); 31 | 32 | impl WrappedAlgorithm { 33 | pub fn is_symmetric(self) -> bool { 34 | self.0 == Algorithm::HS256 || 35 | self.0 == Algorithm::HS384 || 36 | self.0 == Algorithm::HS512 37 | } 38 | 39 | pub fn is_asymmetric(self) -> bool { 40 | !self.is_symmetric() 41 | } 42 | } 43 | 44 | impl PartialEq for WrappedAlgorithm { 45 | fn eq(&self, other: &WrappedAlgorithm) -> bool { 46 | self.0 == other.0 47 | } 48 | } 49 | 50 | impl Eq for WrappedAlgorithm {} 51 | 52 | impl Hash for WrappedAlgorithm { 53 | fn hash(&self, state: &mut H) { 54 | (self.0 as i32).hash(state); 55 | } 56 | } 57 | 58 | impl FromStr for WrappedAlgorithm { 59 | type Err = Error; 60 | 61 | fn from_str(s: &str) -> Result { 62 | match s { 63 | "RS512" => Ok(Algorithm::RS512), 64 | "RS256" => Ok(Algorithm::RS256), 65 | "RS384" => Ok(Algorithm::RS384), 66 | "HS512" => Ok(Algorithm::HS512), 67 | "HS256" => Ok(Algorithm::HS256), 68 | "HS384" => Ok(Algorithm::HS384), 69 | _ => Err(ErrorInternalServerError("unable to parse algorithm")) 70 | }.map(WrappedAlgorithm) 71 | } 72 | } 73 | 74 | /// Validate a jwt token with the available signing keys 75 | /// 76 | /// # Arguments 77 | /// 78 | /// * `token_str` - The jwt token 79 | /// * `secret` - The client secret, if relevant 80 | /// * `keys` - The set of assymmetric signing keys 81 | pub fn validate_token(token_str: &str, secret: &Option, keys: &HashMap>, validation: &Validation) -> Result<(), Error> { 82 | let header = decode_header(&token_str).map_err(|e| ErrorForbidden(format!("unable to decode token header: {}", e)))?; 83 | if WrappedAlgorithm(header.alg).is_symmetric() { 84 | validate_token_symmetric(token_str, secret, validation) 85 | } 86 | else { 87 | validate_token_asymmetric(token_str, header.alg, keys, validation, &header.kid) 88 | } 89 | } 90 | 91 | /// Retrieve the jwt token from the authorization header 92 | /// 93 | /// # Arguments 94 | /// 95 | /// * `header_str` -> The contents of the authorization header 96 | pub fn get_token_str(header_str: &str) -> Result { 97 | match (header_str.get(0..7), header_str.get(7..)) { 98 | (Some("Bearer "), Some(token)) => Ok(token.to_string()), 99 | _ => Err(ErrorForbidden("no bearer token in authorization header")) 100 | } 101 | } 102 | 103 | /// Check if we're missing a signing key, by decoding the token 104 | /// 105 | /// # Arguments 106 | /// 107 | /// * `token_str` - The jwt token to check 108 | /// * `keys` - The available signing keys 109 | pub fn has_missing_kid(token_str: &str, keys: &HashMap>) -> bool { 110 | decode_header(token_str) 111 | .ok() 112 | .and_then(|header| { 113 | let wrapped_alg = WrappedAlgorithm(header.alg); 114 | if wrapped_alg.is_asymmetric() { 115 | header.kid 116 | .and_then(|id| keys.get(&wrapped_alg).map(|inner_map| !inner_map.contains_key(&id))) 117 | } 118 | else { 119 | Some(false) 120 | } 121 | }).unwrap_or(false) 122 | } 123 | 124 | /// Validate the token with a symmetric key (the client secret) 125 | fn validate_token_symmetric(token_str: &str, secret: &Option, validation: &Validation) -> Result<(), Error> { 126 | let inner_secret = secret.as_ref().ok_or_else(|| ErrorInternalServerError("client secret not configured, symmetric token decryption not possible"))?; 127 | validate_token_with_key(token_str, &inner_secret, validation) 128 | } 129 | 130 | /// Validate the token with a asymetric (RSA) key 131 | fn validate_token_asymmetric(token_str: &str, alg: Algorithm, keys: &HashMap>, validation: &Validation, kid: &Option) -> Result<(), Error> { 132 | let key_map = keys.get(&WrappedAlgorithm(alg)).ok_or_else(|| ErrorForbidden("no key available for token algorithm"))?; 133 | if let Some(id) = kid { // Decode with the provided key id 134 | let key = key_map.get(id).ok_or_else(|| ErrorForbidden("unknown key id"))?; 135 | validate_token_with_key(&token_str, &key, validation) 136 | } 137 | else { // Try to decode with all keys 138 | for key in key_map.values() { 139 | if validate_token_with_key(&token_str, &key, validation).is_ok() { 140 | return Ok(()) 141 | } 142 | } 143 | Err(ErrorForbidden("unable to validate token with available signing keys")) 144 | } 145 | } 146 | 147 | /// Validate the token a key, either symmetric or assymetric 148 | fn validate_token_with_key(token_str: &str, key: &Bytes, validation: &Validation) -> Result<(), Error> { 149 | decode::(&token_str, key, &validation).map_err(|e| ErrorForbidden(format!("error validating token: {}", e)))?; 150 | Ok(()) 151 | } 152 | 153 | #[cfg(test)] 154 | mod tests { 155 | use super::*; 156 | use base64; 157 | use serde_json::Value; 158 | 159 | static TOKEN: &'static str = "eyJhbGciOiJSUzI1NiIsImtpZCI6IjVBMkZDNkU5NUFFQ0NEN0QxMUE0NUY4ODVGQkVBOTI1MkIxODUxRjUiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJXaV9HNlZyc3pYMFJwRi1JWDc2cEpTc1lVZlUifQ.eyJuYmYiOjE1MzYyMzMyMjYsImV4cCI6MTUzNjIzNjgyNiwiaXNzIjoiaHR0cDovL2lkZW50aXR5IiwiYXVkIjpbImh0dHA6Ly9pZGVudGl0eS9yZXNvdXJjZXMiLCJhcGkxIl0sImNsaWVudF9pZCI6ImNsaWVudCIsInNjb3BlIjpbImFwaTEiXX0.n8_d8DrscYy8h0pEtlispSjqeVyJLIIQdsB-FeSTG9xiszDBNtBD3l_pzdVwrPpga5aDhTbz6vkzzqiU3YkwOYie4S7rvOre0jjFQ3-DnWlhYYf4ii54k40T9mH_AJV1pYR9SxEefCp78PYbpHNqEG2p5v8cFj0lDDcdTMglaRKkTOX43SdxRXr-Ww8WRjpEsF1tMwOhaK1LJolNR-waf9NXbfzssNdmYEzQ-gpVuEe6aJuMsfWuJ3LO2KzxnJnSw53DXGCTDRV16qNv9vAaDWNpFvSbwghLEo4JQCdX8bMRX2ysW2YGwBno-8nOkMEzfi6SKJ-5zDebOQhSKQ_86w"; 160 | static INVALID_TOKEN: &'static str = "eyJhbGciOiJSUzI1NiIsImtpZCI6IjVBMkZDNkU5NUFFQ0NEN0QxMUE0NUY4ODVGQkVBOTI1MkIxODUxRjUiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJXaV9HNlZyc3pYMFJwRi1JWDc2cEpTc1lVZlUifQ.eyJuYmYiOjE1MzYyMzMyMjYsImV4cCI6MTUzNjIzNjgyNiwiaXNzIjoiaHR0cDovL2lkZW50aXR5IiwiYXVkIjpbImh0dHA6Ly9pZGVudGl0eS9yZXNvdXJjZXMiLCJhcGkxIl0sImNsaWVudF9pZCI6ImNsaWVudCIsInNjb3BlIjpbImFwaTEiXX0.n8_d8DrscYy8h0pEtlispSjqeVyJLIIQdsB-FeSTG9xiszDBNtBD3l_pzdVwrPpga5aDhTbz6vkzzqiU3YkwOYie4S7rvOre0jjFQ3-DnWlhYYf4ii54k40T9mH_AJV1pYR9SxEefCp78PYbpHNqEG2p5v8cFj0lDDcdTMglaRKkTOX43SdxRXr-Ww8WRjpEsF1tMwOhaK1LJolNR-waf9NXbfzssNdmYEzQ-gpVuEe6aJuMsfWuJ3LO2KzxnJnSw53DXGCTDRV16qNv9vAaDWNpFvSbwghLEo4JQCdX8bMRX2ysW2YGwBno-8nOkMEzfi6SKJ-5zDebOEhSKQ_86w"; 161 | static KID: &'static str = "5A2FC6E95AECCD7D11A45F885FBEA9252B1851F5"; 162 | static KEY: &'static str = "MIIBCgKCAQEAviuRydGmSbij9PpVMEZdy29J0Ae/M883JTORRfcsKvEM1T0gdYIyX23vq86vSkmlQVOiiK++5U9HgmNm0lMojQC2KC7Gtkfh1uD7AQxDo1TBRT0BqxcBxrzyJ308AT5aiLnFVYlf4f0fvdIJZ+KAyXvAQAXLN3PwksFcYAVavGy402MzLNaqWAZ2iQ0+MD0mLfgCZItjkVbX5hvOZ9q2ZlRsw33bLttEguord12BY025yzBiZOGOZVZxEw8Ngz3gs4J23wxXpeeMUDvArPRi7se8Jev26/E8I0J77ttiuScbVDqX+lDYShsKGTDWxUcpVeqBvSk6GL+gxbPdogIokQIDAQAB"; 163 | 164 | #[test] 165 | fn test_token_decode() { 166 | let mut key_map: HashMap = HashMap::new(); 167 | key_map.insert(KID.to_string(), Bytes::from(base64::decode(KEY).unwrap())); 168 | let mut keys: HashMap> = HashMap::new(); 169 | keys.insert(WrappedAlgorithm(Algorithm::RS256), key_map); 170 | 171 | let validation = Validation { 172 | // Token can be expired, we don't want to make the test time-dependent 173 | validate_exp: false, 174 | validate_iat: false, 175 | validate_nbf: false, 176 | leeway: 0, 177 | aud: Some( 178 | Value::Array( 179 | vec![ 180 | Value::String("http://identity/resources".to_string()), 181 | Value::String("api1".to_string())])), 182 | iss: Some("http://identity".to_string()), 183 | sub: None, 184 | algorithms: vec![Algorithm::RS256] 185 | }; 186 | let validated = validate_token(TOKEN, &None, &keys, &validation); 187 | println!("{:?}", validated); 188 | assert!(validated.is_ok()); 189 | 190 | let not_validated = validate_token(INVALID_TOKEN, &None, &keys, &validation); 191 | assert!(not_validated.is_err()); 192 | } 193 | } --------------------------------------------------------------------------------