diff --git a/.github/ISSUE_TEMPLATE/bug-reports-for-the-cli-client.md b/.github/ISSUE_TEMPLATE/bug-reports-for-the-cli-client.md index 6bd6c8d7..65475fc8 100644 --- a/.github/ISSUE_TEMPLATE/bug-reports-for-the-cli-client.md +++ b/.github/ISSUE_TEMPLATE/bug-reports-for-the-cli-client.md @@ -1,6 +1,6 @@ --- name: 🐞 Bug reports for the CLI client -about: Found something wrong with tsh? Report them here +about: Found something wrong with skysh? Report them here title: 'CLI: ' labels: C-bug, D-cli assignees: '' @@ -14,8 +14,8 @@ assignees: '' Steps to reproduce the behavior: **Expected behavior** diff --git a/.github/ISSUE_TEMPLATE/bug-reports-for-the-database-server.md b/.github/ISSUE_TEMPLATE/bug-reports-for-the-database-server.md index 71493b69..4776d752 100644 --- a/.github/ISSUE_TEMPLATE/bug-reports-for-the-database-server.md +++ b/.github/ISSUE_TEMPLATE/bug-reports-for-the-database-server.md @@ -14,8 +14,8 @@ assignees: '' Steps to reproduce the behavior: **Expected behavior** diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fa74a02..66ce889a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: name: Release env: - RELEASE_SDB: sdb + RELEASE_SDB: skyd RELEASE_SKYSH: skysh RELEASE_BENCH: sky-bench RELEASE_DIR: artifacts @@ -107,7 +107,7 @@ jobs: mv ./target/${{ env.LINUX_TARGET }}/release/${{ env.RELEASE_SDB }} ./dist mv ./target/${{ env.LINUX_TARGET }}/release/${{ env.RELEASE_SKYSH }} ./dist mv ./target/${{ env.LINUX_TARGET }}/release/${{ env.RELEASE_BENCH }} ./dist - zip ./${{ env.RELEASE_DIR}}/sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX64_NAME }}.zip ./dist/skysh ./dist/sdb ./dist/sky-bench -j + zip ./${{ env.RELEASE_DIR}}/sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX64_NAME }}.zip ./dist/skysh ./dist/skyd ./dist/sky-bench -j - name: Create Build (Windows) if: matrix.build == 'windows' @@ -116,7 +116,7 @@ jobs: mv ./target/release/${{ env.RELEASE_SDB }}.exe ./dist mv ./target/release/${{ env.RELEASE_SKYSH }}.exe ./dist mv ./target/release/${{ env.RELEASE_BENCH }}.exe ./dist - 7z a -tzip ./${{ env.RELEASE_DIR }}/sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS64_NAME }}.zip ./dist/* + 7z a -tzip ./${{ env.RELEASE_DIR }}/sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS64_NAME }}.zip ./dist/* - name: Create Build (MacOS) if: matrix.build == 'macos' @@ -124,7 +124,7 @@ jobs: mv ./target/release/${{ env.RELEASE_SDB }} ./dist mv ./target/release/${{ env.RELEASE_SKYSH }} ./dist mv ./target/release/${{ env.RELEASE_BENCH }} ./dist - zip ./${{ env.RELEASE_DIR }}/sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS64_NAME }}.zip ./dist/skysh ./dist/sdb ./dist/sky-bench -j + zip ./${{ env.RELEASE_DIR }}/sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS64_NAME }}.zip ./dist/skysh ./dist/skyd ./dist/sky-bench -j - name: Upload binaries uses: actions/upload-artifact@v1 @@ -175,9 +175,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.TDBB }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./linux/sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX64_NAME }}.zip + asset_path: ./linux/sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX64_NAME }}.zip asset_content_type: application/octet-stream - asset_name: sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX64_NAME }}.zip + asset_name: sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX64_NAME }}.zip - name: Release Windows bundle uses: actions/upload-release-asset@v1 @@ -185,9 +185,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.TDBB }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./windows/sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS64_NAME }}.zip + asset_path: ./windows/sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS64_NAME }}.zip asset_content_type: application/octet-stream - asset_name: sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS64_NAME }}.zip + asset_name: sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS64_NAME }}.zip - name: Release MacOS bundle uses: actions/upload-release-asset@v1 @@ -195,6 +195,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.TDBB }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./macos/sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS64_NAME }}.zip + asset_path: ./macos/sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS64_NAME }}.zip asset_content_type: application/octet-stream - asset_name: sdb-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS64_NAME }}.zip \ No newline at end of file + asset_name: sky-bundle-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS64_NAME }}.zip \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 48ef5c3f..9213f07b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All changes in this project will be noted in this file. +## Version 0.5.1 [2021-03-17] + +> No breaking changes + +* Built-in TLS/SSL support +* Custom host/port settings in `sky-bench` +* Mock keys can be created with `sky-bench` +* Security patch for VE/S/00001 +* Escaping for spaces in `skysh` +* `tdb` is now called `skyd` (short for 'Skytable Daemon') + ## Version 0.5.0 [2020-11-19] > This release introduces breaking changes! diff --git a/Cargo.lock b/Cargo.lock index df831555..e6f14cc7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -312,7 +312,7 @@ checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" [[package]] name = "libsky" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bytes", "lazy_static", @@ -413,15 +413,15 @@ checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" [[package]] name = "openssl" -version = "0.10.32" +version = "0.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" +checksum = "a61075b62a23fef5a29815de7536d940aa35ce96d18ce0cc5076272db678a577" dependencies = [ "bitflags", "cfg-if", "foreign-types", - "lazy_static", "libc", + "once_cell", "openssl-sys", ] @@ -436,9 +436,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.60" +version = "0.9.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" +checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f" dependencies = [ "autocfg", "cc", @@ -598,14 +598,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.3" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] @@ -626,31 +625,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "sdb" -version = "0.5.0" -dependencies = [ - "bincode", - "bytes", - "chrono", - "clap", - "env_logger", - "futures", - "jemallocator", - "lazy_static", - "libsky", - "log", - "openssl", - "parking_lot", - "regex", - "serde", - "serde_derive", - "sky_macros", - "tokio", - "tokio-openssl", - "toml", -] - [[package]] name = "serde" version = "1.0.124" @@ -693,7 +667,7 @@ dependencies = [ [[package]] name = "sky-bench" -version = "0.5.0" +version = "0.5.1" dependencies = [ "clap", "devtimer", @@ -705,7 +679,7 @@ dependencies = [ [[package]] name = "sky_macros" -version = "0.5.0" +version = "0.5.1" dependencies = [ "proc-macro2", "quote", @@ -713,9 +687,34 @@ dependencies = [ "syn", ] +[[package]] +name = "skyd" +version = "0.5.1" +dependencies = [ + "bincode", + "bytes", + "chrono", + "clap", + "env_logger", + "futures", + "jemallocator", + "lazy_static", + "libsky", + "log", + "openssl", + "parking_lot", + "regex", + "serde", + "serde_derive", + "sky_macros", + "tokio", + "tokio-openssl", + "toml", +] + [[package]] name = "skysh" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bytes", "clap", @@ -758,9 +757,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd9bc7ccc2688b3344c2f48b9b546648b25ce0b20fc717ee7fa7981a8ca9717" +checksum = "3fd9d1e9976102a03c542daa2eff1b43f9d72306342f3f8b3ed5fb8908195d6f" dependencies = [ "proc-macro2", "quote", @@ -785,15 +784,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "thread_local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] - [[package]] name = "time" version = "0.1.44" diff --git a/Dockerfile b/Dockerfile index 275d44e4..9862c6ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ FROM debian:stable -COPY target/release/sdb /usr/local/bin +COPY target/release/skyd /usr/local/bin -CMD ["sdb", "-h", "0.0.0.0", "-p", "2003"] +CMD ["skyd", "-h", "0.0.0.0", "-p", "2003"] EXPOSE 2003/tcp diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 9ae622db..f920aeb8 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "skysh" -version = "0.5.0" +version = "0.5.1" authors = ["Sayan Nandan "] edition = "2018" @@ -10,8 +10,8 @@ edition = "2018" libsky = {path = "../libsky"} tokio = {version = "1.3.0", features = ["full"]} bytes = "1.0.1" -regex = "1.4.3" +regex = "1.4.5" lazy_static = "1.4.0" clap = {version = "2.33.3", features=["yaml"]} -openssl = { version = "0.10.32", features = ["vendored"] } +openssl = { version = "0.10.33", features = ["vendored"] } tokio-openssl = "0.6.1" \ No newline at end of file diff --git a/examples/config-files/template.toml b/examples/config-files/template.toml index 6a7287b7..cbec0255 100644 --- a/examples/config-files/template.toml +++ b/examples/config-files/template.toml @@ -12,7 +12,7 @@ port = 2003 # The port to which you want sdb to bind to # Set `noart` to true if you want to disable terminal artwork noart = false -# This key is *OPTIONAL*, but will be required post 0.5.1 +# This key is *OPTIONAL* [bgsave] # Run `BGSAVE` `every` seconds. For example, setting this to 60 will cause BGSAVE to run # after every 2 minutes @@ -23,3 +23,10 @@ every = 120 [snapshot] every = 3600 # Make a snapshot after every 1 hour (60min * 60sec= 3600secs) atmost = 4 # Keep the 4 most recent snapshots + +# This key is *OPTIONAL*, used for TLS/SSL config +[ssl] +key = "/path/to/keyfile.pem" +chain = "/path/to/chain.pem" +port = 2004 +only = true # optional to enable SSL-only requests \ No newline at end of file diff --git a/libsky/Cargo.toml b/libsky/Cargo.toml index 3fa55186..26864435 100644 --- a/libsky/Cargo.toml +++ b/libsky/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libsky" -version = "0.5.0" +version = "0.5.1" authors = ["Sayan Nandan "] edition = "2018" @@ -10,4 +10,4 @@ edition = "2018" lazy_static = "1.4.0" bytes = "1.0.1" termcolor = "1.1.2" -regex = "1.4.3" \ No newline at end of file +regex = "1.4.5" \ No newline at end of file diff --git a/server/Cargo.toml b/server/Cargo.toml index bbffd3ad..4902558e 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "sdb" -version = "0.5.0" +name = "skyd" +version = "0.5.1" authors = ["Sayan Nandan "] edition = "2018" @@ -21,10 +21,10 @@ clap = {version = "2.33.3", features=["yaml"]} env_logger = "0.8.3" log = "0.4.14" chrono = "0.4.19" -regex = "1.4.3" +regex = "1.4.5" sky_macros = {path="../sky-macros"} tokio-openssl = "0.6.1" -openssl = { version = "0.10", features = ["vendored"] } +openssl = { version = "0.10.33", features = ["vendored"] } [target.'cfg(not(target_env = "msvc"))'.dependencies] jemallocator = "0.3.2" diff --git a/server/src/config/mod.rs b/server/src/config/mod.rs index 1722ca19..6544455d 100644 --- a/server/src/config/mod.rs +++ b/server/src/config/mod.rs @@ -714,7 +714,14 @@ mod tests { false, BGSave::default(), SnapshotConfig::Enabled(SnapshotPref::new(3600, 4)), - PortConfig::default() // TODO: Update the template + PortConfig::new_secure_only( + DEFAULT_IPV4, + SslOpts::new( + "/path/to/keyfile.pem".into(), + "/path/to/chain.pem".into(), + 2004 + ) + ) ) ); } diff --git a/sky-bench/Cargo.toml b/sky-bench/Cargo.toml index 30264379..3c934adc 100644 --- a/sky-bench/Cargo.toml +++ b/sky-bench/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sky-bench" -version = "0.5.0" +version = "0.5.1" authors = ["Sayan Nandan "] edition = "2018" diff --git a/sky-macros/Cargo.toml b/sky-macros/Cargo.toml index c2e2bedc..8a7df68b 100644 --- a/sky-macros/Cargo.toml +++ b/sky-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sky_macros" -version = "0.5.0" +version = "0.5.1" authors = ["Sayan Nandan "] edition = "2018" @@ -10,7 +10,7 @@ edition = "2018" proc-macro = true [dependencies] -syn = {version = "1.0.63", features = ["full"]} +syn = {version = "1.0.64", features = ["full"]} quote = "1.0.9" rand = "0.8.3" proc-macro2 = "1.0.24"