diff --git a/osquery/.gitignore b/osquery/.gitignore new file mode 100644 index 00000000..5d8f489f --- /dev/null +++ b/osquery/.gitignore @@ -0,0 +1,3 @@ +inventory.dev.yml +*.retry +telemetry.yaml diff --git a/osquery/ansible-role-requirements.yml b/osquery/ansible-role-requirements.yml index 8df1329c..41168eda 100644 --- a/osquery/ansible-role-requirements.yml +++ b/osquery/ansible-role-requirements.yml @@ -9,7 +9,7 @@ version: master - name: osquery scm: git - src: https://github.com/juju4/ansible-osquery + src: https://github.com/kloud-pro/ansible-osquery version: master - name: redis scm: git @@ -27,3 +27,11 @@ scm: git src: https://git.openstack.org/openstack/openstack-ansible-galera_server version: master +- name: apt_package_pinning + scm: git + src: https://git.openstack.org/openstack/openstack-ansible-apt_package_pinning + version: master +- name: plugins + scm: git + src: https://git.openstack.org/openstack/openstack-ansible-plugins + version: master diff --git a/osquery/assets/architecture-osquery.png b/osquery/assets/architecture-osquery.png new file mode 100644 index 00000000..97cac59d Binary files /dev/null and b/osquery/assets/architecture-osquery.png differ diff --git a/osquery/assets/overview-osquery.png b/osquery/assets/overview-osquery.png new file mode 100644 index 00000000..85455404 Binary files /dev/null and b/osquery/assets/overview-osquery.png differ diff --git a/osquery/bootstrap-embedded-ansible.sh b/osquery/bootstrap-embedded-ansible.sh new file mode 100755 index 00000000..a119de4c --- /dev/null +++ b/osquery/bootstrap-embedded-ansible.sh @@ -0,0 +1,129 @@ +#!/usr/bin/env bash +# Copyright 2018, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +export OPTS=() +export ANSIBLE_EMBED_HOME="${HOME}/ansible25" +OPTS+=('ANSIBLE_EMBED_HOME') + +source /etc/os-release +if [[ ! -e "${ANSIBLE_EMBED_HOME}/bin/ansible" ]]; then + if [ ${VERSION_ID} = "14.04" ]; then + apt-get update + apt-get -y install python-virtualenv + echo "done installing python-virtualenv" + else + apt-get update + apt-get -y install python3-virtualenv python-virtualenv + echo "done installing python-virtualenv python3-virtualenv" + fi + + if [[ -e "${HOME}/.pip" ]]; then + echo "..................moving .pip out of place to boostrap" + mv ${HOME}/.pip ${HOME}/.off-pip + fi + + if [[ -f "/usr/bin/python2" ]]; then + virtualenv --python="/usr/bin/python2" "${ANSIBLE_EMBED_HOME}" + elif [[ -f "/usr/bin/python3" ]]; then + virtualenv --python="/usr/bin/python3" "${ANSIBLE_EMBED_HOME}" + else + virtualenv "${ANSIBLE_EMBED_HOME}" + fi + + eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade --force pip" + eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade ansible==2.5.5.0 --isolated" + eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade jmespath --isolated" + echo "Ansible can be found here: ${ANSIBLE_EMBED_HOME}/bin" + + if [[ -e "${HOME}/.off-pip" ]]; then + mv ${HOME}/off-pip ${HOME}/.pip + echo "..................moving .pip back in to place" + fi +fi + +if [[ ! -d "${ANSIBLE_EMBED_HOME}/repositories/ansible-config_template" ]]; then + mkdir -p "${ANSIBLE_EMBED_HOME}/repositories" + git clone https://git.openstack.org/openstack/ansible-config_template "${ANSIBLE_EMBED_HOME}/repositories/ansible-config_template" + pushd "${ANSIBLE_EMBED_HOME}/repositories/ansible-config_template" + git checkout a5c9d97e18683f0fdf9769d94ba174c72e2d093c # HEAD of master from 20-06-18 + popd +fi + +if [[ ! -d "${ANSIBLE_EMBED_HOME}/repositories/openstack_ansible_plugins" ]]; then + mkdir -p "${ANSIBLE_EMBED_HOME}/repositories" + git clone https://git.openstack.org/openstack/openstack-ansible-plugins "${ANSIBLE_EMBED_HOME}/repositories/openstack-ansible-plugins" + pushd "${ANSIBLE_EMBED_HOME}/repositories/openstack-ansible-plugins" + git checkout cef7946b3b3b3e4d02406c228741985a94b72cff # HEAD of master from 20-06-18 + popd +fi + +if [[ ! -d "${ANSIBLE_EMBED_HOME}/repositories/roles/systemd_service" ]]; then + mkdir -p "${ANSIBLE_EMBED_HOME}/repositories" + git clone https://git.openstack.org/openstack/ansible-role-systemd_service "${ANSIBLE_EMBED_HOME}/repositories/roles/systemd_service" + pushd "${ANSIBLE_EMBED_HOME}/repositories/roles/systemd_service" + git checkout 02f5ff1c0e073af53bed2141a045e608162970ea # HEAD of master from 20-06-18 + popd +fi + +if [[ -f "/etc/openstack_deploy/openstack_inventory.json" ]]; then + if [[ ! -f "${ANSIBLE_EMBED_HOME}/inventory/openstack_inventory.sh" ]]; then + mkdir -p "${ANSIBLE_EMBED_HOME}/inventory" + cat > "${ANSIBLE_EMBED_HOME}/inventory/openstack_inventory.sh" < /etc/openstack_deploy/fleet_user_vars.yml + echo "mariadb_root_password: $(openssl rand -base64 16)" >> /etc/openstack_deploy/fleet_user_vars.yml + + Install master/data Fleet nodes on the elastic-logstash containers, deploy logstash, deploy Kibana, and then deploy all of the service beats. .. code-block:: bashG cd /opt/openstack-ansible-ops/osquery - ansible-playbook site.yml $USER_VARS + ansible-playbook site.yml -e@/etc/openstack_deploy/fleet_user_vars.yml * The `openstack-ansible` command can be used if the version of ansible on the @@ -172,7 +179,7 @@ Architecture | Data flow This diagram outlines the data flow from within an Elastic-Stack deployment. -.. image:: assets/place-holder.svg +.. image:: assets/architecture-osquery.png :scale: 50 % :alt: Kolide & Osquery Data Flow Diagram :align: center @@ -180,8 +187,9 @@ This diagram outlines the data flow from within an Elastic-Stack deployment. TODO ---- The following is a list of open items. - - [ ] Test Redhat familly Operating Systems - - [ ] missing mariadb cluster (should all work needs additional vars) + - [x] Test Redhat familly Operating Systems + - [x] missing mariadb cluster (should all work needs additional vars) - [ ] use haproxy instead of the kolide fleet server ip - [ ] add/update tags + - [ ] convert to roles - [ ] add testing diff --git a/osquery/registerSSLcerts.yml b/osquery/registerSSLcerts.yml new file mode 100644 index 00000000..61f0c409 --- /dev/null +++ b/osquery/registerSSLcerts.yml @@ -0,0 +1,73 @@ +--- +# Copyright 2018, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Install Kolide Fleet + hosts: "fleet" + become: true + + vars_files: + - vars/variables.yml + + environment: "{{ deployment_environment_variables | default({}) }}" + + gather_facts: "{{ osa_gather_facts | default(True) }}" + + pre_tasks: + - name: Store ssl cert + slurp: + src: "{{ kolide_fleet_ssl_cert }}" + register: _kolide_fleet_ssl_cert + + - name: Store ssl ca cert + slurp: + src: "{{ kolide_fleet_ssl_ca_cert }}" + register: _kolide_fleet_ssl_ca_cert + when: kolide_fleet_user_ssl_ca_cert is defined + + - name: Register a fact for the cert and key + set_fact: + kolide_fleet_ssl_cert_fact: "{{ _kolide_fleet_ssl_cert.content }}" + + - name: Register a fact for the cert and key + set_fact: + kolide_fleet_ssl_ca_cert_fact: "{{ _kolide_fleet_ssl_ca_cert.content }}" + when: kolide_fleet_user_ssl_ca_cert is defined + + - name: Distribute self signed ssl cert + copy: + dest: "{{ kolide_fleet_ssl_cert }}" + content: "{{ hostvars[groups['fleet'][0]]['kolide_fleet_ssl_cert_fact'] | b64decode }}" + mode: "0640" + + - name: Distribute self signed CA ssl cert + copy: + dest: "{{ kolide_fleet_ca_ssl_cert }}" + content: "{{ hostvars[groups['fleet'][0]]['kolide_fleet_ssl_ca_cert_fact'] | b64decode }}" + mode: "0640" + when: kolide_fleet_user_ssl_ca_cert is defined + + - name: retrieve Enrollment Token + command: /usr/local/bin/fleetctl get enroll-secret + register: _enrollment_token + + - name: Set kolide fleet enrollment token fact + set_fact: + kolide_fleet_enroll_secret: "{{ _enrollment_token.stdout }}" + + - name: write enroll secret + copy: + dest: "{{ osquery_enroll_secret_dir }}" + content: "{{ hostvars[groups['fleet'][0]]['kolide_fleet_enroll_secret'] }}" + mode: "0640" diff --git a/osquery/roles/fleet/defaults/main.yml b/osquery/roles/fleet/defaults/main.yml new file mode 100644 index 00000000..258562bf --- /dev/null +++ b/osquery/roles/fleet/defaults/main.yml @@ -0,0 +1,41 @@ +# Kolide Fleet vars +kolide_fleet_db_name: fleet +kolide_fleet_db_user: fleet + +#kolide_fleet_db_password: fleetSecrete + +kolide_fleet_port: "443" +kolide_fleet_address: "0.0.0.0:{{ kolide_fleet_port }}" +kolide_fleet_version: "2.0.0-rc5" +kolide_fleet_url: "https://github.com/kolide/fleet/releases/download" + +kolide_fleet_admin_email: admin@openstack.org +#kolide_fleet_admin_password: AdminSecrete + +kolide_fleet_ssl_cert: /etc/ssl/certs/fleet.cert +kolide_fleet_ssl_key: /etc/ssl/private/fleet.key +kolide_fleet_ssl_pem: /etc/ssl/private/fleet.pem +kolide_fleet_ssl_ca_cert: /etc/ssl/certs/fleet-ca.pem +kolide_fleet_ssl_self_signed_subject: "/C=US/ST=Texas/L=San Antonio/O=IT/CN={{ ansible_host }}/subjectAltName=IP.1={{ ansible_host }}/subjectAltName=IP.2=localhost" + +kolide_fleet_ssl_protocol: "{{ ssl_protocol | default('ALL -SSLv2 -SSLv3') }}" +kolide_fleet_ssl_cipher_suite: "{{ ssl_cipher_suite | default('ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS') }}" + +#kolide_fleet_osquery_enroll_secret: "{{ kolide_fleet_enroll_secret }}" + + +# MariaDB/Gallera Variables +mariadb_bind_address: "0.0.0.0" +mariadb_root_remote: 1 +mariadb_root_user: root +#mariadb_root_password: fleetSecrete +mariadb_databases: + - name: "{{ kolide_fleet_db_name }}" + +mariadb_users: + - name: "{{ kolide_fleet_db_user }}" + password: "{{ kolide_fleet_db_password }}" + priv: " {{ kolide_fleet_db_name }}.*:ALL" + host: "%" + +galera_root_password: "{{ mariadb_root_password }}" diff --git a/osquery/roles/fleet/tasks/createFleetDB.yml b/osquery/roles/fleet/tasks/createFleetDB.yml new file mode 100644 index 00000000..fcb7d94e --- /dev/null +++ b/osquery/roles/fleet/tasks/createFleetDB.yml @@ -0,0 +1,43 @@ +--- +# Copyright 2018, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Create DB for service + mysql_db: + login_user: "{{ mariadb_root_user }}" + login_password: "{{ mariadb_root_password }}" + login_host: "{{ mariadb_login_host | default('localhost') }}" + name: "{{ kolide_fleet_db_name }}" + state: "present" + delegate_to: "{{ groups['mariadb'][0] }}" + no_log: False + tags: + - fleet_db_install + +- name: Grant access to the DB for the service + mysql_user: + login_user: "{{ mariadb_root_user }}" + login_password: "{{ mariadb_root_password }}" + login_host: "{{ mariadb_login_host | default('localhost') }}" + name: "{{ kolide_fleet_db_user }}" + password: "{{ kolide_fleet_db_password }}" + host: "{{ item }}" + state: "present" + priv: "{{ kolide_fleet_db_name }}.*:ALL" + append_privs: "{{ kolide_fleet_db_append_privs | default(omit) }}" + delegate_to: "{{ groups['mariadb'][0] }}" + with_items: "{{ grant_list | default(['localhost', '%']) }}" + no_log: False + tags: + - fleet_db_install diff --git a/osquery/fleetConfig.yml b/osquery/roles/fleet/tasks/fleetConfig.yml similarity index 100% rename from osquery/fleetConfig.yml rename to osquery/roles/fleet/tasks/fleetConfig.yml diff --git a/osquery/fleetGetEnrollmentToken.yml b/osquery/roles/fleet/tasks/fleetGetEnrollmentToken.yml similarity index 100% rename from osquery/fleetGetEnrollmentToken.yml rename to osquery/roles/fleet/tasks/fleetGetEnrollmentToken.yml diff --git a/osquery/fleetMigrateDB.yml b/osquery/roles/fleet/tasks/fleetMigrateDB.yml similarity index 100% rename from osquery/fleetMigrateDB.yml rename to osquery/roles/fleet/tasks/fleetMigrateDB.yml diff --git a/osquery/fleetRegisterAdmin.yml b/osquery/roles/fleet/tasks/fleetRegisterAdmin.yml similarity index 100% rename from osquery/fleetRegisterAdmin.yml rename to osquery/roles/fleet/tasks/fleetRegisterAdmin.yml diff --git a/osquery/fleetRequirements.yml b/osquery/roles/fleet/tasks/fleetRequirements.yml similarity index 84% rename from osquery/fleetRequirements.yml rename to osquery/roles/fleet/tasks/fleetRequirements.yml index 9eb0f038..dcce00cc 100644 --- a/osquery/fleetRequirements.yml +++ b/osquery/roles/fleet/tasks/fleetRequirements.yml @@ -13,13 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -#- name: Install prerequisites -# apt: name= {{item}} update_cache=yes -# with_items: -# - apt-transport-https -# - ca-certificates -# - curl -# - software-properties-common - name: Run the systemd service role include_role: name: redis diff --git a/osquery/fleetSSL.yml b/osquery/roles/fleet/tasks/fleetSSL.yml similarity index 100% rename from osquery/fleetSSL.yml rename to osquery/roles/fleet/tasks/fleetSSL.yml diff --git a/osquery/fleetSSLdistribute.yml b/osquery/roles/fleet/tasks/fleetSSLdistribute.yml similarity index 100% rename from osquery/fleetSSLdistribute.yml rename to osquery/roles/fleet/tasks/fleetSSLdistribute.yml diff --git a/osquery/fleetSSLkeyCreate.yml b/osquery/roles/fleet/tasks/fleetSSLkeyCreate.yml similarity index 100% rename from osquery/fleetSSLkeyCreate.yml rename to osquery/roles/fleet/tasks/fleetSSLkeyCreate.yml diff --git a/osquery/fleetSSLselfSigned.yml b/osquery/roles/fleet/tasks/fleetSSLselfSigned.yml similarity index 100% rename from osquery/fleetSSLselfSigned.yml rename to osquery/roles/fleet/tasks/fleetSSLselfSigned.yml diff --git a/osquery/fleetSSLstore.yml b/osquery/roles/fleet/tasks/fleetSSLstore.yml similarity index 100% rename from osquery/fleetSSLstore.yml rename to osquery/roles/fleet/tasks/fleetSSLstore.yml diff --git a/osquery/fleetSSLuserProvided.yml b/osquery/roles/fleet/tasks/fleetSSLuserProvided.yml similarity index 100% rename from osquery/fleetSSLuserProvided.yml rename to osquery/roles/fleet/tasks/fleetSSLuserProvided.yml diff --git a/osquery/fleetServerInstall.yml b/osquery/roles/fleet/tasks/fleetServerInstall.yml similarity index 100% rename from osquery/fleetServerInstall.yml rename to osquery/roles/fleet/tasks/fleetServerInstall.yml diff --git a/osquery/fleetService.yml b/osquery/roles/fleet/tasks/fleetService.yml similarity index 100% rename from osquery/fleetService.yml rename to osquery/roles/fleet/tasks/fleetService.yml diff --git a/osquery/fleetStartService.yml b/osquery/roles/fleet/tasks/fleetStartService.yml similarity index 100% rename from osquery/fleetStartService.yml rename to osquery/roles/fleet/tasks/fleetStartService.yml diff --git a/osquery/roles/fleet/tasks/main.yml b/osquery/roles/fleet/tasks/main.yml new file mode 100644 index 00000000..3407f628 --- /dev/null +++ b/osquery/roles/fleet/tasks/main.yml @@ -0,0 +1,33 @@ +--- +# install SSL certs +- include_tasks: createFleetDB.yml + +# install SSL certs +- include_tasks: fleetSSL.yml + +# install software requirements +- include_tasks: fleetRequirements.yml + +# install kolide fleet server +- include_tasks: fleetServerInstall.yml + +# drop the configuration +- include_tasks: fleetConfig.yml + +# add files for systemd +- include_tasks: fleetService.yml + when: + - ansible_service_mgr == "systemd" + +# migrate the database +- include_tasks: fleetMigrateDB.yml + run_once: true + +# start fleet via systemd +- include_tasks: fleetStartService.yml + +# configure kolide fleet & set admin account +- include_tasks: fleetRegisterAdmin.yml + +# retrieve and set enrollment token +- include_tasks: fleetGetEnrollmentToken.yml diff --git a/osquery/templates/fleet_config.yml.j2 b/osquery/roles/fleet/templates/fleet_config.yml.j2 similarity index 100% rename from osquery/templates/fleet_config.yml.j2 rename to osquery/roles/fleet/templates/fleet_config.yml.j2 diff --git a/osquery/templates/fleet_initd.yml.j2 b/osquery/roles/fleet/templates/fleet_initd.yml.j2 similarity index 100% rename from osquery/templates/fleet_initd.yml.j2 rename to osquery/roles/fleet/templates/fleet_initd.yml.j2 diff --git a/osquery/templates/fleet_service.yml.j2 b/osquery/roles/fleet/templates/fleet_service.yml.j2 similarity index 100% rename from osquery/templates/fleet_service.yml.j2 rename to osquery/roles/fleet/templates/fleet_service.yml.j2 diff --git a/osquery/templates/redis_initd.yml.j2 b/osquery/roles/fleet/templates/redis_initd.yml.j2 similarity index 100% rename from osquery/templates/redis_initd.yml.j2 rename to osquery/roles/fleet/templates/redis_initd.yml.j2 diff --git a/osquery/templates/redis_service.yml.j2 b/osquery/roles/fleet/templates/redis_service.yml.j2 similarity index 100% rename from osquery/templates/redis_service.yml.j2 rename to osquery/roles/fleet/templates/redis_service.yml.j2 diff --git a/osquery/roles/fleet/vars/main.yml b/osquery/roles/fleet/vars/main.yml new file mode 100644 index 00000000..af066239 --- /dev/null +++ b/osquery/roles/fleet/vars/main.yml @@ -0,0 +1,38 @@ +# Kolide Fleet vars +kolide_fleet_db_name: fleet +kolide_fleet_db_user: fleet +#kolide_fleet_db_password: fleetSecrete + +kolide_fleet_port: "443" +kolide_fleet_address: "0.0.0.0:{{ kolide_fleet_port }}" +kolide_fleet_version: "2.0.0-rc5" +kolide_fleet_url: "https://github.com/kolide/fleet/releases/download" + +kolide_fleet_admin_email: admin@openstack.org +#kolide_fleet_admin_password: AdminSecrete + +kolide_fleet_ssl_cert: /etc/ssl/certs/fleet.cert +kolide_fleet_ssl_key: /etc/ssl/private/fleet.key +kolide_fleet_ssl_pem: /etc/ssl/private/fleet.pem +kolide_fleet_ssl_ca_cert: /etc/ssl/certs/fleet-ca.pem +kolide_fleet_ssl_self_signed_subject: "/C=US/ST=Texas/L=San Antonio/O=IT/CN={{ ansible_host }}/subjectAltName=IP.1={{ ansible_host }}/subjectAltName=IP.2=localhost" + +kolide_fleet_ssl_protocol: "{{ ssl_protocol | default('ALL -SSLv2 -SSLv3') }}" +kolide_fleet_ssl_cipher_suite: "{{ ssl_cipher_suite | default('ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS') }}" + +#kolide_fleet_osquery_enroll_secret: "{{ kolide_fleet_enroll_secret }}" +# MariaDB/Gallera Variables +#mariadb_root_password: fleetSecrete +mariadb_bind_address: "0.0.0.0" +mariadb_root_remote: 1 +mariadb_root_user: root +mariadb_databases: + - name: "{{ kolide_fleet_db_name }}" + +mariadb_users: + - name: "{{ kolide_fleet_db_user }}" + password: "{{ kolide_fleet_db_password }}" + priv: " {{ kolide_fleet_db_name }}.*:ALL" + host: "%" + +galera_root_password: "{{ mariadb_root_password }}" diff --git a/osquery/site-fleet.yml b/osquery/site-fleet.yml new file mode 100644 index 00000000..d933d118 --- /dev/null +++ b/osquery/site-fleet.yml @@ -0,0 +1,15 @@ +--- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- import_playbook: installDB.yml +- import_playbook: installKolideFleet.yml diff --git a/osquery/site-osquery.yml b/osquery/site-osquery.yml new file mode 100644 index 00000000..da0743c0 --- /dev/null +++ b/osquery/site-osquery.yml @@ -0,0 +1,15 @@ +--- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- import_playbook: registerSSLcerts.yml +- import_playbook: installOSquery.yml diff --git a/osquery/site.yml b/osquery/site.yml index b92fa751..5720aa83 100644 --- a/osquery/site.yml +++ b/osquery/site.yml @@ -13,6 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -- import_playbook: installMariaDB.yml -- import_playbook: installKolideFleet.yml -- import_playbook: installOsquery.yml +- import_playbook: site-fleet.yml +- import_playbook: site-osquery.yml diff --git a/osquery/vars/variables.yml b/osquery/vars/variables.yml index 814248a2..00976ebd 100644 --- a/osquery/vars/variables.yml +++ b/osquery/vars/variables.yml @@ -1,32 +1,17 @@ +mariadb_root_user: root + +# kolide_fleet_enable: true -kolide_fleet_cluster: false - -# Kolide Fleet vars -kolide_fleet_db_name: fleet -kolide_fleet_db_user: fleet -kolide_fleet_db_password: fleetSecrete - -kolide_fleet_port: "443" -kolide_fleet_address: "0.0.0.0:{{ kolide_fleet_port }}" -kolide_fleet_version: "2.0.0-rc3" -kolide_fleet_url: "https://github.com/kolide/fleet/releases/download" - -kolide_fleet_admin_email: admin@openstack.org -#kolide_fleet_admin_password: AdminSecrete kolide_fleet_ssl_cert: /etc/ssl/certs/fleet.cert kolide_fleet_ssl_key: /etc/ssl/private/fleet.key kolide_fleet_ssl_pem: /etc/ssl/private/fleet.pem kolide_fleet_ssl_ca_cert: /etc/ssl/certs/fleet-ca.pem -kolide_fleet_ssl_self_signed_subject: "/C=US/ST=Texas/L=San Antonio/O=IT/CN={{ external_lb_vip_address }}/subjectAltName=IP.1={{ external_lb_vip_address }}/subjectAltName=IP.2={{ ansible_host }}}/subjectAltName=IP.3=localhost" - -kolide_fleet_ssl_protocol: "{{ ssl_protocol | default('ALL -SSLv2 -SSLv3') }}" -kolide_fleet_ssl_cipher_suite: "{{ ssl_cipher_suite | default('ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS') }}" - -#kolide_fleet_osquery_enroll_secret: "{{ kolide_fleet_enroll_secret }}" +kolide_fleet_ssl_self_signed_subject: "/C=US/ST=Texas/L=San Antonio/O=IT/CN={{ ansible_host }}/subjectAltName=IP.1={{ ansible_host }}/subjectAltName=IP.2=localhost" # Osquery vars osquery_enroll_secret_dir: /etc/osquery/osquery_enroll_secret +osquery_debug_packages_install: false osquery_debug_packages_install: false @@ -53,16 +38,3 @@ osquery_flags: - "--logger_tls_endpoint=/api/v1/osquery/log" - "--logger_tls_period=10" - "--enroll_secret_path={{ osquery_enroll_secret_dir }}" - -# MariaDB/Gallera Variables -#mariadb_root_password: fleetSecrete -mariadb_bind_address: "0.0.0.0" -mariadb_root_remote: 1 -mariadb_databases: - - name: "{{ kolide_fleet_db_name }}" - -mariadb_users: - - name: "{{ kolide_fleet_db_user }}" - password: "{{ kolide_fleet_db_password }}" - priv: " {{ kolide_fleet_db_name }}.*:ALL" - host: "%"