This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your OneTimeSecret Username and API key from https://onetimesecret.com/account#apikey-tab | |
$apiUsername = "[email protected]" | |
$apiPassword = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
# Invoke-RestMethod is a little "tempermental" with Basic Authentication - the "-Credential" parameter specifically | |
# See https://stackoverflow.com/questions/24672760/powershells-invoke-restmethod-equivalent-of-curl-u-basic-authentication - thanks Borek Bernard | |
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $apiUsername,$apiPassword))) | |
# Specify parameters for random password generation - in this case, a Time to Live in seconds (7 days) | |
$Body = @{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create an alias for ykman pointing the install location | |
set-alias ykman "$env:programfiles\Yubico\YubiKey Manager\ykman.exe" | |
# Get the Yubikey's serial number with ykman | |
# Not required but will be used to import into Duo later (to test) | |
$serialNumber = ykman info | where { $_ -like "Serial number:*" } | | |
%{ $_ -replace "Serial number: ",""} | |
# Generate a random 40 character hex secret | |
# See https://codegolf.stackexchange.com/questions/58442/generate-random-uuid - thanks Forty3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create an alias for ykman pointing the the install location | |
set-alias ykman "$env:programfiles\Yubico\YubiKey Manager\ykman.exe" | |
# Provide an opportunity to insert the yubikey before continuing | |
Read-Host -Prompt "Ensure Yubikey is inserted then press Enter to continue" | |
# Add a new line for formatting/tidiness | |
write-host " " | |
# Run ykman to generate the static password on the Yubikey (in slot 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ad_client] | |
;https://duo.com/docs/authproxy-reference#ad_client | |
;https://help.duo.com/s/article/2121?language=en_US | |
;https://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/ | |
; I am binding on port 389 (no encryption) - #neverinproduction - use 636 (LDAPS) instead | |
host=ldap.forumsys.com | |
auth_type=plain | |
service_account_username=read-only-admin | |
service_account_password=password | |
bind_dn=cn=read-only-admin,dc=example,dc=com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Setup] | |
; Basic information | |
AppName = Computer Maintenance | |
AppVerName = Computer Maintenance 0.0.1 | |
AppPublisher = Neil Sabol | |
AppVersion = 0.0.1 | |
Compression = lzma | |
SolidCompression = yes | |
PrivilegesRequired = admin | |
; Choose a benign directory to "install" even though we are not really |
NewerOlder