import React, { Component, PropTypes } from 'react'; import Button from 'components/buttons/Button'; import Icon from 'components/icons/Icon'; import InputField from 'components/forms/fields/InputField'; import { renderFlash } from 'redux/nodes/notifications/actions'; import { copyText } from './helpers'; import certificate from '../../../../assets/images/osquery-certificate.svg'; const baseClass = 'add-host-modal'; class AddHostModal extends Component { static propTypes = { dispatch: PropTypes.func, onFetchCertificate: PropTypes.func, onReturnToApp: PropTypes.func, osqueryEnrollSecret: PropTypes.string, }; constructor (props) { super(props); this.state = { revealSecret: false }; } onCopySecret = (elementClass) => { return (evt) => { evt.preventDefault(); const { dispatch } = this.props; if (copyText(elementClass)) { dispatch(renderFlash('success', 'Text copied to clipboard')); } else { this.setState({ revealSecret: true }); dispatch(renderFlash('error', 'Text not copied. Use CMD + C to copy text')); } }; } toggleSecret = (evt) => { const { revealSecret } = this.state; evt.preventDefault(); this.setState({ revealSecret: !revealSecret }); return false; } render () { const { onCopySecret, toggleSecret } = this; const { revealSecret } = this.state; const { onFetchCertificate, onReturnToApp, osqueryEnrollSecret } = this.props; return (
Follow the instructions below to add hosts to your Kolide Instance.
In order to install osquery on a client you will need the items below:
Osquery requires the same TLS certificate that Kolide is using in order to authenticate. You can fetch the certificate below:
When prompted, enter the provided secret code into osqueryd: {revealSecret ? 'Hide' : 'Reveal'} Secret