-
Notifications
You must be signed in to change notification settings - Fork 33
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 Local User (Add/Set/Remove) #190
base: master
Are you sure you want to change the base?
Conversation
throw "Element specified does not contain a fortitoken property." | ||
} | ||
if ( -not ( $argument | get-member -name email-to -Membertype Properties)) { | ||
throw "Element specified does not contain a email-to property." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an email
PowerFGT/Public/cmdb/user/local.ps1
Outdated
[Parameter (Mandatory = $false)] | ||
[switch]$status, | ||
[Parameter (Mandatory = $false, ParameterSetName = "local")] | ||
[string]$password, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use passwd ?
add SecureString ?
Add Local User object name FGT, password MyFGT and enable it | ||
|
||
.EXAMPLE | ||
Add-FGTUserLocal -Name FGT -password MyFGT -status -two_factor email -two_factor_authentication email -email_to powerfgt@fgt.power |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a .EXAMPLE with (forti)token ?
|
||
$uri = "api/v2/cmdb/user/local" | ||
|
||
$Local_User = new-Object -TypeName PSObject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only $local ? (New-Object :p)
[string]$tacacs_server, | ||
[Parameter (Mandatory = $false)] | ||
[ValidateSet("fortitoken", "email", "sms", "disable", "fortitoken-cloud")] | ||
[string]$two_factor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't be merge with two_factor_authentication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid duplicate entry...
$userlocal.'two-factor' | Should -Be "disable" | ||
} | ||
|
||
It "Add userlocal $pester_userlocal MFA" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MFA by E-mail ?
$userlocal = Add-FGTUserLocal -Name $pester_userlocal -password $pester_userlocalpassword | ||
} | ||
|
||
It "Change status userlocal" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User Local
|
||
Describe "Configure User Local" { | ||
|
||
Context "local" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
$userlocal.'two-factor' | Should -Be "disable" | ||
} | ||
|
||
It "Change MFA" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable MFA ?
$userlocal.'two-factor' | Should -Be "email" | ||
} | ||
|
||
AfterAll { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use AfterEach ?
No description provided.