Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add powershell user management with argon2 password hashing #658

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

awakecoding
Copy link
Contributor

Add PowerShell user management cmdlets with argon2 password hashing. Here's my set of commands to bootstrap a localhost HTTP configuration with user "admin" and password "yolo123!" for local development:

$ConfigPath = Join-Path (Get-Location) 'config'
$Env:DGATEWAY_CONFIG_PATH="$ConfigPath"
$WebAppPath = Join-Path (Get-Location) 'webapp'
$Env:DGATEWAY_WEBAPP_PATH="$ConfigPath"
New-Item $ConfigPath -ItemType Directory -ErrorAction SilentlyContinue

.\powershell\build.ps1
pwsh.exe
Import-Module .\powershell\DevolutionsGateway
$Hostname = "localhost"
$Username = "admin"
$Password = "yolo123!"
$HttpListener = New-DGatewayListener 'http://*:7171' 'http://*:7171'
$WebApp = New-DGatewayWebAppConfig -Enabled $true -Authentication Custom
$ConfigParams = @{
  Hostname = $Hostname
  Listeners = @($HttpListener)
  WebApp = $WebApp
}
Set-DGatewayConfig @ConfigParams
New-DGatewayProvisionerKeyPair -Force
Set-DGatewayUser -Username $Username -Password $Password
exit

cd ./webapp/web && npm install && ng build && cd ../..

cargo run

@thenextman
Copy link
Member

I've tested it on my branch and it works well 👍

@CBenoit CBenoit merged commit 7157ad6 into master Jan 20, 2024
16 checks passed
@CBenoit CBenoit deleted the powershell-user-management branch January 20, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants