2017-10-04 18:41:45 +03:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
Vagrant.configure("2") do |config|
|
|
|
|
|
|
|
|
# Use Windows 10 as a base box.
|
|
|
|
config.vm.box = "senglin/win-10-enterprise-vs2015community"
|
|
|
|
config.vm.box_version = "1.0.0"
|
|
|
|
|
|
|
|
|
|
|
|
# Install dependencies needed for yubioath-desktop development.
|
|
|
|
# config.vm.provision "file", source: "qt-installer-noninteractive.qs", destination: "C:\Users\vagrant\qt-installer-noninteractive.qs"
|
|
|
|
config.vm.provision "shell", path: "provision.bat"
|
|
|
|
|
|
|
|
# Sync repository to /vagrant
|
|
|
|
config.vm.synced_folder '../..', '/vagrant'
|
|
|
|
|
|
|
|
config.vm.communicator = "winrm"
|
|
|
|
|
|
|
|
# VirtualBox configuration
|
|
|
|
config.vm.provider "virtualbox" do |vb|
|
2017-11-23 14:42:23 +03:00
|
|
|
vb.name = "yubioath-desktop:windows"
|
2017-10-04 18:41:45 +03:00
|
|
|
|
|
|
|
# Enable GUI
|
|
|
|
vb.gui = true
|
|
|
|
# Set memory
|
|
|
|
vb.memory = 2048
|
|
|
|
# Enable shared clipboard
|
|
|
|
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
|
|
|
# Enable drag-n-drop
|
|
|
|
vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
|
|
|
|
end
|
|
|
|
|
|
|
|
# This will connect the YubiKey to the VM when re-inserted.
|
|
|
|
# This filter uses VirtualBox as provider.
|
|
|
|
# Modify the paramters as needed depending on the device.
|
|
|
|
|
|
|
|
FILTER_NAME="YubiKey"
|
|
|
|
MANUFACTURER="Yubico"
|
|
|
|
VENDOR_ID="0x1050"
|
|
|
|
PRODUCT_ID="0x0407"
|
|
|
|
PRODUCT="Yubikey 4 OTP+U2F+CCID"
|
|
|
|
|
|
|
|
config.vm.provider "virtualbox" do |vb|
|
|
|
|
vb.customize ['modifyvm', :id, '--usb', 'on']
|
|
|
|
vb.customize ['usbfilter', 'add', '0',
|
|
|
|
'--target', :id,
|
|
|
|
'--name', FILTER_NAME,
|
|
|
|
'--manufacturer', MANUFACTURER,
|
|
|
|
'--vendorid', VENDOR_ID,
|
|
|
|
'--productid', PRODUCT_ID,
|
|
|
|
'--product', PRODUCT]
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|