Skip to content

Commit

Permalink
Merge pull request #253 from jmpsec/bump-0-2-8
Browse files Browse the repository at this point in the history
Bump to version 0.2.8
  • Loading branch information
javuto authored Apr 2, 2022
2 parents 0f9fb6a + 00176e2 commit cd92a5e
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 54 deletions.
12 changes: 6 additions & 6 deletions admin/auth/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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
)
2 changes: 1 addition & 1 deletion admin/handlers/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions admin/sessions/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion carves/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
18 changes: 11 additions & 7 deletions deploy/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# 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:

1. Generate TLS/SSL termination certificate and private key
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`
Expand All @@ -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
Expand All @@ -36,26 +40,29 @@ 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
1. `docker-compose up`
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 `<OSCTRL_USER>` for username
1. Enter `<OSCTRL_PASS>` 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)
Expand All @@ -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)
2 changes: 1 addition & 1 deletion deploy/docker/env.example
Original file line number Diff line number Diff line change
@@ -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
Expand Down
34 changes: 17 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions logging/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion osctrl-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions tls/handlers/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
4 changes: 2 additions & 2 deletions types/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 1 addition & 1 deletion users/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

0 comments on commit cd92a5e

Please sign in to comment.