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

Onyx 9442 integration #2387

Merged
merged 3 commits into from
Oct 13, 2021
Merged

Onyx 9442 integration #2387

merged 3 commits into from
Oct 13, 2021

Conversation

Avi-Eyal
Copy link
Contributor

@Avi-Eyal Avi-Eyal commented Oct 13, 2021

What does this PR do?

  • Merging GCP security fix into master

What ticket does this PR close?

ONYX-9442

Checklists

Change log

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR, and/or there is a follow-on issue to update docs, or
  • This PR does not require updating any documentation

API Changes

  • The OpenAPI spec has been updated to meet new API changes (or an issue has been opened), or
  • The changes in this PR do not affect the Conjur API

@Avi-Eyal Avi-Eyal requested a review from a team October 13, 2021 15:28
@Avi-Eyal Avi-Eyal requested a review from a team as a code owner October 13, 2021 15:28
sh ./get_tokens_to_files.sh "$gcp_func_url" "$token_prefix" || exit 1
cd -
local decoded_gcf_token_payload=$(_get_gcp_token_payload "../ci/authn-gcp/tokens/gcf_token_valid")
local decoded_gcf_token_payload=$(_get_gcp_token_payload "../ci/test_suites/authenticators_gcp/tokens/gcf_token_valid")
Copy link

Choose a reason for hiding this comment

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

Declare and assign separately to avoid masking return values.

local gce_instance_name="$(echo "$decoded_gce_token_payload" | jq -r '.google.compute_engine.instance_name')"
local gce_service_account_id="$(echo "$decoded_gce_token_payload" | jq -r '.sub')"
local gce_service_account_email="$(echo "$decoded_gce_token_payload" | jq -r '.email')"
local gce_project_id="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.google.compute_engine.project_id')"
Copy link

Choose a reason for hiding this comment

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

Declare and assign separately to avoid masking return values.

local gce_service_account_id="$(echo "$decoded_gce_token_payload" | jq -r '.sub')"
local gce_service_account_email="$(echo "$decoded_gce_token_payload" | jq -r '.email')"
local gce_project_id="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.google.compute_engine.project_id')"
local gce_instance_name="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.google.compute_engine.instance_name')"
Copy link

Choose a reason for hiding this comment

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

Declare and assign separately to avoid masking return values.

local gce_project_id="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.google.compute_engine.project_id')"
local gce_instance_name="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.google.compute_engine.instance_name')"
local gce_service_account_id="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.sub')"
local gce_service_account_email="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.email')"
Copy link

Choose a reason for hiding this comment

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

Declare and assign separately to avoid masking return values.

local gce_service_account_email="$(echo "$decoded_gce_token_payload" | jq -r '.email')"
local gce_project_id="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.google.compute_engine.project_id')"
local gce_instance_name="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.google.compute_engine.instance_name')"
local gce_service_account_id="$(echo "$DECODED_GCP_TOKEN_PAYLOAD" | jq -r '.sub')"
Copy link

Choose a reason for hiding this comment

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

Declare and assign separately to avoid masking return values.

@codeclimate
Copy link

codeclimate bot commented Oct 13, 2021

Code Climate has analyzed commit 6208483 and detected 6 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 1
Bug Risk 5

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 90.8% (0.0% change).

View more on Code Climate.

Copy link
Contributor

@sashaCher sashaCher left a comment

Choose a reason for hiding this comment

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

LGTM

@sashaCher sashaCher merged commit 47a0422 into master Oct 13, 2021
@sashaCher sashaCher deleted the onyx-9442-integration branch October 13, 2021 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants