Skip to content

Commit

Permalink
Fix for working against an Aqua on-prem version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ukhanskyi committed Oct 13, 2024
1 parent 941d996 commit d7e1822
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/connectors/aqua/lib/aqua_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def get_token(auth_url, username, password)

if auth_response.code == 200
auth_json = JSON.parse(auth_response.body)
token = auth_json.dig("data", "token")
token = if cloud? # working against cloud.aquasec URL prefix
auth_json.dig("data", "token")
else
auth_json["token"]
end

print_error "Login failed: No token received" unless token
else
Expand Down

0 comments on commit d7e1822

Please sign in to comment.