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

Initialize-TssSdkClient does not properly enclose rule names with spaces. #395

Open
jagrock opened this issue Feb 6, 2024 · 0 comments
Open
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@jagrock
Copy link

jagrock commented Feb 6, 2024

Verified issue does not already exist?

Yes

What error did you receive

Initialize-TssSdkClient does not properly enclose rule names with spaces.

Unrecognized command or argument 'XXXXX'

Please run the command using -Verbose

Initialize-TssSdkClient -SecretServer $urlSS -RuleName $tssRule -ConfigPath $tssConfigPath -OnboardingKey $tssOBK -Force -Verbose
VERBOSE: Command invocation: Initialize-TssSdkClient -SecretServer:https://####.secretservercloud.com -RuleName:### XXXXX -ConfigPath:C:\TEMP\tss_ps -OnboardingKey:zzzz -Force:True -Verbose:True
VERBOSE: arguments for tss init: remove --confirm --key-directory C:\TEMP\tss_ps --config-directory C:\TEMP\tss_ps
VERBOSE: SDK Client raw output: Your configuration settings have been removed.

VERBOSE: SDK Client configuration has been removed
VERBOSE: arguments for tss init: init --url https://####.secretservercloud.com --rule-name ### XXXXX --onboarding-key zzzz --key-directory C:\TEMP\tss_ps --config-directory C:\TEMP\tss_ps
VERBOSE: SDK Client raw output: Specify --help for a list of available options and commands.
Unrecognized command or argument 'XXXXX'

Provide a test case or steps to reproduce

Initialize-TssSdkClient with a rule name that has a space.

$RullNameSpace_DoesNotWork = 'Rule Name'
$RullNameSpace_IncludeQuotesInValue = '"Rule Name"'

Will not work:
Initialize-TssSdkClient -SecretServer $urlSS -RuleName $RullNameSpace_DoesNotWork -ConfigPath $tssConfigPath -OnboardingKey $tssOBK

Will Work:
Initialize-TssSdkClient -SecretServer $urlSS -RuleName $RullNameSpace_IncludeQuotesInValue -ConfigPath $tssConfigPath -OnboardingKey $tssOBK

Expected behavior

When the cmdlet is building out the arguments for calling tss.exe it should properly quote values with spaces or other characters that may require a space.

What Edition of Secret Server?

Cloud Subscription

What version of Secret Server

Current GA release

What PowerShell host was used when producing this error

VS Code (integrated terminal)

PowerShell Host Version

Name Value


PSVersion 7.4.0
PSEdition Core
GitCommitId 7.4.0
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

@jagrock jagrock added bug Something isn't working triage needed new issues that are still in state of triage labels Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage needed new issues that are still in state of triage
Projects
None yet
Development

No branches or pull requests

1 participant