Active IQ Unified Manager Discussions
Active IQ Unified Manager Discussions
Hello,
Ilike to use a pattern for some credentials.
The pattern would be:
??-testsrv?
But once I fetch them from within a command:
$mysrv = "as-testsrv2"
$mycreds = Get-WfaCredentials -Host $mysrv -ErrorAction stop
Invoke-NaSsh -Name $mysrv -Command $(ls -la) -Credential $mycreds
--> I get a permission denied.
--> If I put
as-testsrv2
directly into the credentials list it works fine.
Can anybody help here?
Thanks!
Solved! See The Solution
Hey,
my version is 3.0
found the problem, there was another pattern which was conflicting with that pattern.
For me that solves the problem,
but I think a better error message would be feasible
or a check for potential conflicts when a credential entry is added.
Greets Thorsten
Do you have a credential not Exact but Pattern like *testsrv* ?
---------------------------------------------------------------------------------
@THORSTEN_KRAUSE wrote:Hello,
Ilike to use a pattern for some credentials.
The pattern would be:
??-testsrv?
But once I fetch them from within a command:
$mysrv = "as-testsrv2"
$mycreds = Get-WfaCredentials -Host $mysrv -ErrorAction stop
Invoke-NaSsh -Name $mysrv -Command $(ls -la) -Credential $mycreds
--> I get a permission denied.
--> If I put
as-testsrv2
directly into the credentials list it works fine.
Can anybody help here?
Thanks!
Using * will work here but star will match other patters as well which you may not want.
Save the pattern as : [a-z]{2}-testsrv[0-9]{1}
You can have a Test Command to check if your Credentials are actually working or not. Below WFA PoSH code can be of great help to see if your pattern can actually get you the desired credemtials.
### Begin ###
param
(
[parameter(Mandatory=$true, HelpMessage="Host Name")]
[string]$Host
)
$cd=Get-WfaCredentials $Host
if(!$cd)
{
get-WfaLogger -info -Message "Not found"
}
else
{
$pass=ConvertFromSecureToPlain -SecurePassword $cd.Password
Get-WfaLogger -info -Message $cd.UserName
Get-WfaLogger -info -Message $pass
}
##End ##
sinhaa
Hi,
thanks for your help.
Seems the pattern function doesn't work at all.
I just tried it:
have a server called "test" --> using "Exact" --> fetching with your script works
changing just from "Exact" to "Pattern" --> error 500
also trying "Pattern" with tes* doesn't work.
Does that work for you?
They all work well Thorsten., can you try again in a freshly opened browser.
Select: Type: Other
Match: pattern
Server: tes*
Give username and Password
Now in the command testing code try get credentials for "test". Does it not work?
unfortunately still not working for me, completely closed all instances of Firefox 34.0 and started new one:
12:40:11.707 INFO [test credential fetching] ### Command 'test credential fetching' ###
12:40:54.312 ERROR [test credential fetching] Could not get credentials for test. Cause: The remote server returned an error: (500) Internal Server Error.. The remote server returned an error: (500) Internal Server Error.
12:40:56.091 ERROR [test credential fetching] Command failed for Workflow 'test_ cred fetch' with error : Could not get credentials for test. Cause: The remote server returned an error: (500) Internal Server Error.. The remote server returned an error: (500) Internal Server Error.
12:40:56.138 INFO [test credential fetching] ***** Workflow Execution Failed *****
woaah!!.. Thats very strange. Can you provide the following details?
sinhaa
Hey,
my version is 3.0
found the problem, there was another pattern which was conflicting with that pattern.
For me that solves the problem,
but I think a better error message would be feasible
or a check for potential conflicts when a credential entry is added.
Greets Thorsten