From 00176e26dad9f93a2348eeb8914fb047fadaea83 Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Sat, 2 Apr 2022 21:02:05 +0200 Subject: [PATCH] Bump to version 0.2.8 --- admin/auth/go.mod | 12 ++++++------ admin/handlers/go.mod | 2 +- admin/sessions/go.mod | 8 ++++---- carves/go.mod | 2 +- deploy/docker/README.md | 18 +++++++++++------- deploy/docker/env.example | 2 +- go.mod | 34 +++++++++++++++++----------------- logging/go.mod | 12 ++++++------ osctrl-api.yaml | 2 +- tls/handlers/go.mod | 12 ++++++------ types/go.mod | 4 ++-- users/go.mod | 2 +- version/version.go | 2 +- 13 files changed, 58 insertions(+), 54 deletions(-) diff --git a/admin/auth/go.mod b/admin/auth/go.mod index d3e1edc0..50be3b92 100644 --- a/admin/auth/go.mod +++ b/admin/auth/go.mod @@ -15,9 +15,9 @@ replace github.com/jmpsec/osctrl/types => ../../types replace github.com/jmpsec/osctrl/users => ../../users require ( - github.com/jmpsec/osctrl/admin/sessions v0.2.7 - github.com/jmpsec/osctrl/settings v0.2.7 - github.com/jmpsec/osctrl/users v0.2.7 + github.com/jmpsec/osctrl/admin/sessions v0.2.8 + github.com/jmpsec/osctrl/settings v0.2.8 + github.com/jmpsec/osctrl/users v0.2.8 ) require ( @@ -26,9 +26,9 @@ require ( github.com/gorilla/sessions v1.2.1 // indirect github.com/jinzhu/gorm v1.9.16 // indirect github.com/jinzhu/inflection v1.0.0 // indirect - github.com/jmpsec/osctrl/nodes v0.2.7 // indirect - github.com/jmpsec/osctrl/queries v0.2.7 // indirect - github.com/jmpsec/osctrl/types v0.2.7 // indirect + github.com/jmpsec/osctrl/nodes v0.2.8 // indirect + github.com/jmpsec/osctrl/queries v0.2.8 // indirect + github.com/jmpsec/osctrl/types v0.2.8 // indirect github.com/lib/pq v1.1.1 // indirect golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect ) diff --git a/admin/handlers/go.mod b/admin/handlers/go.mod index ea24464f..246d8658 100644 --- a/admin/handlers/go.mod +++ b/admin/handlers/go.mod @@ -37,7 +37,7 @@ require ( github.com/jmpsec/osctrl/logging v0.0.0-20220120232002-31ecf3b9f264 github.com/jmpsec/osctrl/metrics v0.0.0-20220120232002-31ecf3b9f264 github.com/jmpsec/osctrl/nodes v0.0.0-20220120232002-31ecf3b9f264 - github.com/jmpsec/osctrl/queries v0.2.7 + github.com/jmpsec/osctrl/queries v0.2.8 github.com/jmpsec/osctrl/settings v0.0.0-20220120232002-31ecf3b9f264 github.com/jmpsec/osctrl/tags v0.0.0-20220120232002-31ecf3b9f264 github.com/jmpsec/osctrl/types v0.0.0-20220120232002-31ecf3b9f264 diff --git a/admin/sessions/go.mod b/admin/sessions/go.mod index 2856d845..35cb7142 100644 --- a/admin/sessions/go.mod +++ b/admin/sessions/go.mod @@ -14,10 +14,10 @@ require ( github.com/gorilla/securecookie v1.1.1 github.com/gorilla/sessions v1.2.1 github.com/jinzhu/gorm v1.9.16 - github.com/jmpsec/osctrl/nodes v0.2.7 // indirect - github.com/jmpsec/osctrl/queries v0.2.7 // indirect - github.com/jmpsec/osctrl/types v0.2.7 // indirect - github.com/jmpsec/osctrl/users v0.2.7 + github.com/jmpsec/osctrl/nodes v0.2.8 // indirect + github.com/jmpsec/osctrl/queries v0.2.8 // indirect + github.com/jmpsec/osctrl/types v0.2.8 // indirect + github.com/jmpsec/osctrl/users v0.2.8 ) require ( diff --git a/carves/go.mod b/carves/go.mod index 0770c58b..15ef1cdd 100644 --- a/carves/go.mod +++ b/carves/go.mod @@ -11,7 +11,7 @@ replace github.com/jmpsec/osctrl/types => ../types require ( github.com/jinzhu/gorm v1.9.16 github.com/jmpsec/osctrl/nodes v0.0.0-20220120232002-31ecf3b9f264 // indirect - github.com/jmpsec/osctrl/queries v0.2.7 // indirect + github.com/jmpsec/osctrl/queries v0.2.8 // indirect github.com/jmpsec/osctrl/types v0.0.0-20220120232002-31ecf3b9f264 ) diff --git a/deploy/docker/README.md b/deploy/docker/README.md index 88df3549..08884742 100644 --- a/deploy/docker/README.md +++ b/deploy/docker/README.md @@ -1,4 +1,5 @@ # Running osctrl with Docker + You can use Docker to run **osctrl** using the `docker-compose.yml` that ties all the components together. There a couple of manual steps that are required before having a fully functional deployment: @@ -6,6 +7,7 @@ There a couple of manual steps that are required before having a fully functiona 2. Generate JWT secret for API tokens ## Generate TLS/SSL termination certificate and private key + Follow these steps to generate a self-signed certificate that is going to be used for the osctrl deployment: 1. `cp conf/tls/openssl.cnf.example conf/tls/openssl.cnf` @@ -14,12 +16,14 @@ Follow these steps to generate a self-signed certificate that is going to be use 4. `openssl req -x509 -new -nodes -keyout conf/tls/tls.key -out conf/tls/tls.crt -config conf/tls/openssl.cnf` ## Generate JWT secret + You can generate a random enough JWT secret to be used with the `osctrl-api` and `osctrl-admin` components using one of the following commands: 1. `uuidgen | shasum -a 256 | awk '{print $1}'` 1. `vim .env` and set `JWT_SECRET` ## Set .env + 1. `cp .env.example .env` 1. `vim .env` and set: 1. osctrl @@ -36,7 +40,7 @@ You can generate a random enough JWT secret to be used with the `osctrl-api` and 1. `POSTGRES_DB_NAME` - define the name of the database for osctrl 1. `POSTGRES_DB_USERNAME` - define the username to conenct to osctrl database 1. `POSTGRES_DB_PASSWORD` - define the password to conenct to osctrl database - 1. + 1. 1. Save and exit 1. `docker-compose build` 1. Build Docker images @@ -44,18 +48,21 @@ You can generate a random enough JWT secret to be used with the `osctrl-api` and 1. Spin up Osctrl Docker stack ## Login into osctrl + 1. Open a browser to `https://127.0.0.1:8443/login` 1. Login 1. Enter `` for username 1. Enter `` for password - ## References + ### osctrl + * [What is osctrl?](https://osctrl.net/) -* [osctrl-api](https://app.swaggerhub.com/apis-docs/jmpsec/osctrl-api/0.2.7#/) +* [osctrl-api](https://app.swaggerhub.com/apis-docs/jmpsec/osctrl-api/0.2.8#/) ### Docker + * [How to create new users in a Docker container?](https://net2.com/how-to-create-new-users-in-docker-container/) * [Is mkdir -p totally safe when creating folder already exists](https://unix.stackexchange.com/questions/242995/is-mkdir-p-totally-safe-when-creating-folder-already-exists) * [Meaning of ampersand (&) in docker-compose.yml file](https://stackoverflow.com/questions/45805380/meaning-of-ampersand-in-docker-compose-yml-file) @@ -64,10 +71,7 @@ You can generate a random enough JWT secret to be used with the `osctrl-api` and * [Advanced Dockerfiles: Faster Builds and Smaller Images Using BuildKit and Multistage Builds](https://www.docker.com/blog/advanced-dockerfiles-faster-builds-and-smaller-images-using-buildkit-and-multistage-builds/) * [Using openssl to get the certificate from a server](https://stackoverflow.com/questions/7885785/using-openssl-to-get-the-certificate-from-a-server) * [Osquery flags](https://osquery.readthedocs.io/en/stable/installation/cli-flags/) -* []() -* []() -* []() -* []() ### mkcert + * [mkcert is a simple tool for making locally-trusted development certificates](https://github.com/FiloSottile/mkcert) diff --git a/deploy/docker/env.example b/deploy/docker/env.example index 3e8f83f6..3966662a 100644 --- a/deploy/docker/env.example +++ b/deploy/docker/env.example @@ -1,4 +1,4 @@ -OSCTRL_VERSION=0.2.7 +OSCTRL_VERSION=0.2.8 OSQUERY_VERSION=5.2.2 NGINX_VERSION=1.21.1-alpine POSTGRES_VERSION=10-alpine diff --git a/go.mod b/go.mod index c869703f..fa818b1e 100644 --- a/go.mod +++ b/go.mod @@ -44,23 +44,23 @@ require ( github.com/crewjam/saml v0.4.6 github.com/golang-jwt/jwt/v4 v4.2.0 github.com/gorilla/mux v1.8.0 - github.com/jmpsec/osctrl/admin/handlers v0.2.7 - github.com/jmpsec/osctrl/admin/sessions v0.2.7 - github.com/jmpsec/osctrl/backend v0.2.7 - github.com/jmpsec/osctrl/cache v0.2.7 - github.com/jmpsec/osctrl/carves v0.2.7 - github.com/jmpsec/osctrl/environments v0.2.7 - github.com/jmpsec/osctrl/logging v0.2.7 - github.com/jmpsec/osctrl/metrics v0.2.7 - github.com/jmpsec/osctrl/nodes v0.2.7 - github.com/jmpsec/osctrl/queries v0.2.7 - github.com/jmpsec/osctrl/settings v0.2.7 - github.com/jmpsec/osctrl/tags v0.2.7 - github.com/jmpsec/osctrl/tls/handlers v0.2.7 - github.com/jmpsec/osctrl/types v0.2.7 - github.com/jmpsec/osctrl/users v0.2.7 - github.com/jmpsec/osctrl/utils v0.2.7 - github.com/jmpsec/osctrl/version v0.2.7 + github.com/jmpsec/osctrl/admin/handlers v0.2.8 + github.com/jmpsec/osctrl/admin/sessions v0.2.8 + github.com/jmpsec/osctrl/backend v0.2.8 + github.com/jmpsec/osctrl/cache v0.2.8 + github.com/jmpsec/osctrl/carves v0.2.8 + github.com/jmpsec/osctrl/environments v0.2.8 + github.com/jmpsec/osctrl/logging v0.2.8 + github.com/jmpsec/osctrl/metrics v0.2.8 + github.com/jmpsec/osctrl/nodes v0.2.8 + github.com/jmpsec/osctrl/queries v0.2.8 + github.com/jmpsec/osctrl/settings v0.2.8 + github.com/jmpsec/osctrl/tags v0.2.8 + github.com/jmpsec/osctrl/tls/handlers v0.2.8 + github.com/jmpsec/osctrl/types v0.2.8 + github.com/jmpsec/osctrl/users v0.2.8 + github.com/jmpsec/osctrl/utils v0.2.8 + github.com/jmpsec/osctrl/version v0.2.8 github.com/olekukonko/tablewriter v0.0.5 github.com/spf13/viper v1.10.1 github.com/urfave/cli/v2 v2.3.0 diff --git a/logging/go.mod b/logging/go.mod index 5a6f5c17..f9a45255 100644 --- a/logging/go.mod +++ b/logging/go.mod @@ -16,12 +16,12 @@ replace github.com/jmpsec/osctrl/utils => ../utils require ( github.com/jinzhu/gorm v1.9.16 - github.com/jmpsec/osctrl/backend v0.2.7 - github.com/jmpsec/osctrl/nodes v0.2.7 - github.com/jmpsec/osctrl/queries v0.2.7 - github.com/jmpsec/osctrl/settings v0.2.7 - github.com/jmpsec/osctrl/types v0.2.7 - github.com/jmpsec/osctrl/utils v0.2.7 + github.com/jmpsec/osctrl/backend v0.2.8 + github.com/jmpsec/osctrl/nodes v0.2.8 + github.com/jmpsec/osctrl/queries v0.2.8 + github.com/jmpsec/osctrl/settings v0.2.8 + github.com/jmpsec/osctrl/types v0.2.8 + github.com/jmpsec/osctrl/utils v0.2.8 github.com/rs/zerolog v1.26.1 github.com/spf13/viper v1.10.1 ) diff --git a/osctrl-api.yaml b/osctrl-api.yaml index 12809625..9ca8dd38 100644 --- a/osctrl-api.yaml +++ b/osctrl-api.yaml @@ -7,7 +7,7 @@ servers: info: title: osctrl-api description: 'This the API for osctrl, a fast and efficient osquery management solution.' - version: 0.2.7 + version: 0.2.8 externalDocs: description: osctrl documentation (https://osctrl.net) url: https://osctrl.net diff --git a/tls/handlers/go.mod b/tls/handlers/go.mod index 2592ae16..32055777 100644 --- a/tls/handlers/go.mod +++ b/tls/handlers/go.mod @@ -28,17 +28,17 @@ replace github.com/jmpsec/osctrl/tls/handlers => ../handlers require ( github.com/gorilla/mux v1.8.0 - github.com/jmpsec/osctrl/backend v0.2.7 // indirect + github.com/jmpsec/osctrl/backend v0.2.8 // indirect github.com/jmpsec/osctrl/carves v0.0.0-20220120232002-31ecf3b9f264 github.com/jmpsec/osctrl/environments v0.0.0-20220120232002-31ecf3b9f264 github.com/jmpsec/osctrl/logging v0.0.0-20220120232002-31ecf3b9f264 github.com/jmpsec/osctrl/metrics v0.0.0-20220120232002-31ecf3b9f264 - github.com/jmpsec/osctrl/nodes v0.2.7 - github.com/jmpsec/osctrl/queries v0.2.7 - github.com/jmpsec/osctrl/settings v0.2.7 + github.com/jmpsec/osctrl/nodes v0.2.8 + github.com/jmpsec/osctrl/queries v0.2.8 + github.com/jmpsec/osctrl/settings v0.2.8 github.com/jmpsec/osctrl/tags v0.0.0-20220120232002-31ecf3b9f264 - github.com/jmpsec/osctrl/types v0.2.7 - github.com/jmpsec/osctrl/utils v0.2.7 + github.com/jmpsec/osctrl/types v0.2.8 + github.com/jmpsec/osctrl/utils v0.2.8 github.com/segmentio/ksuid v1.0.4 github.com/stretchr/testify v1.7.0 ) diff --git a/types/go.mod b/types/go.mod index 2546dd54..db19db5e 100644 --- a/types/go.mod +++ b/types/go.mod @@ -6,10 +6,10 @@ replace github.com/jmpsec/osctrl/nodes => ../nodes replace github.com/jmpsec/osctrl/queries => ../queries -require github.com/jmpsec/osctrl/queries v0.2.7 +require github.com/jmpsec/osctrl/queries v0.2.8 require ( github.com/jinzhu/gorm v1.9.16 // indirect github.com/jinzhu/inflection v1.0.0 // indirect - github.com/jmpsec/osctrl/nodes v0.2.7 // indirect + github.com/jmpsec/osctrl/nodes v0.2.8 // indirect ) diff --git a/users/go.mod b/users/go.mod index bc3d27c7..5fa39ba9 100644 --- a/users/go.mod +++ b/users/go.mod @@ -18,6 +18,6 @@ require ( require ( github.com/jinzhu/inflection v1.0.0 // indirect github.com/jmpsec/osctrl/nodes v0.0.0-20220120232002-31ecf3b9f264 // indirect - github.com/jmpsec/osctrl/queries v0.2.7 // indirect + github.com/jmpsec/osctrl/queries v0.2.8 // indirect github.com/lib/pq v1.10.4 // indirect ) diff --git a/version/version.go b/version/version.go index d34522a0..06414a56 100644 --- a/version/version.go +++ b/version/version.go @@ -2,5 +2,5 @@ package version const ( // OsctrlVersion to have the version for all components - OsctrlVersion string = "0.2.7" + OsctrlVersion string = "0.2.8" )