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 Local User (Add/Set/Remove) #190

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

CedricMoreau
Copy link

No description provided.

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."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an email

[Parameter (Mandatory = $false)]
[switch]$status,
[Parameter (Mandatory = $false, ParameterSetName = "local")]
[string]$password,
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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,
Copy link
Contributor

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why

Copy link
Contributor

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" {
Copy link
Contributor

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" {
Copy link
Contributor

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" {
Copy link
Contributor

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" {
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use AfterEach ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants