Skip to content

Commit

Permalink
feat(svc-account-playbook): Fixes aruba tests due to service-account …
Browse files Browse the repository at this point in the history
…auth changes

Closes VC-32061
  • Loading branch information
rvelaVenafi committed Mar 28, 2024
1 parent 81294fe commit 26dbd7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions aruba/features/step_definitions/my_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@
json_string = extract_json_from_output(@previous_command_output)
JSON.parse(json_string)
if property === "application"
@application = unescape_text(normalize_json(@previous_command_output, "application")).tr('"', '')
@application = unescape_text(normalize_json(json_string, "application")).tr('"', '')
elsif property === "expires"
@expires = unescape_text(normalize_json(@previous_command_output, "expires_ISO8601")).tr('"', '')
@expires = unescape_text(normalize_json(json_string, "expires_ISO8601")).tr('"', '')
elsif property === "scope"
@scope = unescape_text(normalize_json(@previous_command_output, "scope")).tr('"', '')
@scope = unescape_text(normalize_json(json_string, "scope")).tr('"', '')
elsif property === "refresh_until"
@refresh_until = unescape_text(normalize_json(@previous_command_output, "refresh_until")).tr('"', '')
@refresh_until = unescape_text(normalize_json(json_string, "refresh_until")).tr('"', '')
Integer(@refresh_until)
else
fail(ArgumentError.new("Cant determine property type for #{property}"))
Expand Down
2 changes: 2 additions & 0 deletions cmd/vcert/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ func buildConfigFirefly(flags *commandFlags) (*vcert.Config, error) {
ConnectorType: endpoint.ConnectorTypeFirefly,
BaseUrl: flags.url,
Credentials: &endpoint.Authentication{
User: flags.userName,
Password: flags.password,
AccessToken: flags.token,
ClientId: flags.clientId,
ClientSecret: flags.clientSecret,
Expand Down
4 changes: 2 additions & 2 deletions cmd/vcert/envVars.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ var (
{
EnvVarName: vcertClientSecret,
Destination: &flags.clientSecret,
FlagName: "--client-id",
FlagName: "--client-secret",
},
{
EnvVarName: vcertClientID,
Destination: &flags.clientId,
FlagName: "--client-secret",
FlagName: "--client-id",
},
{
EnvVarName: vcertDeviceURL,
Expand Down

0 comments on commit 26dbd7c

Please sign in to comment.