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

Fix connector can use subfield of ARN #2320

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Conversation

b4sjoo
Copy link
Collaborator

@b4sjoo b4sjoo commented Apr 15, 2024

Description

Filter out any key string which tries to imitate the subfield of the ARN in the credential map. UT has added.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 09:31 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 09:31 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 09:31 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 09:31 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 09:31 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 09:31 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 10:20 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 10:20 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 10:20 — with GitHub Actions Inactive
jngz-es
jngz-es previously approved these changes Apr 15, 2024
@b4sjoo b4sjoo dismissed stale reviews from mingshl and jngz-es via 87f513b April 15, 2024 17:37
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 17:37 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 17:37 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 17:37 — with GitHub Actions Inactive
Signed-off-by: Sicheng Song <[email protected]>
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 17:40 — with GitHub Actions Failure
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 17:40 — with GitHub Actions Error
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 17:40 — with GitHub Actions Error
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 17:40 — with GitHub Actions Error
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 17:40 — with GitHub Actions Failure
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 17:40 — with GitHub Actions Error
@b4sjoo b4sjoo merged commit 650d312 into opensearch-project:main Apr 15, 2024
4 of 10 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-2320-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 650d312b05a3ab7a6d14abd78e8026c6d70e7ad9
# Push it to GitHub
git push --set-upstream origin backport/backport-2320-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-2320-to-2.x.

b4sjoo added a commit to b4sjoo/ml-commons that referenced this pull request Apr 15, 2024
…credential from AWS (opensearch-project#2320)

* Fix connector can use subfield of secrectArn to bypass extraction of credential from AWS

Signed-off-by: Sicheng Song <[email protected]>

* Forbid all kinds of ARN subfield

Signed-off-by: Sicheng Song <[email protected]>

* Adjust annotation

Signed-off-by: Sicheng Song <[email protected]>

---------

Signed-off-by: Sicheng Song <[email protected]>
b4sjoo added a commit that referenced this pull request Apr 15, 2024
…credential from AWS (#2320) (#2321)

* Fix connector can use subfield of secrectArn to bypass extraction of credential from AWS



* Forbid all kinds of ARN subfield



* Adjust annotation



---------

Signed-off-by: Sicheng Song <[email protected]>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.13 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.13 2.13
# Navigate to the new working tree
cd .worktrees/backport-2.13
# Create a new branch
git switch --create backport/backport-2320-to-2.13
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 650d312b05a3ab7a6d14abd78e8026c6d70e7ad9
# Push it to GitHub
git push --set-upstream origin backport/backport-2320-to-2.13
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.13

Then, create a pull request where the base branch is 2.13 and the compare/head branch is backport/backport-2320-to-2.13.

b4sjoo added a commit to b4sjoo/ml-commons that referenced this pull request Apr 15, 2024
…credential from AWS (opensearch-project#2320) (opensearch-project#2321)

* Fix connector can use subfield of secrectArn to bypass extraction of credential from AWS

* Forbid all kinds of ARN subfield

* Adjust annotation

---------

Signed-off-by: Sicheng Song <[email protected]>
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env April 15, 2024 18:08 — with GitHub Actions Inactive
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 18:08 — with GitHub Actions Error
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 18:08 — with GitHub Actions Error
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 18:08 — with GitHub Actions Error
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 18:08 — with GitHub Actions Failure
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env April 15, 2024 18:08 — with GitHub Actions Error
@b4sjoo b4sjoo changed the title Fix connector can use subfield of secrectArn to bypass extraction of credential from AWS Fix connector can use subfield of ARN to bypass extraction of credential from AWS Apr 15, 2024
@b4sjoo b4sjoo changed the title Fix connector can use subfield of ARN to bypass extraction of credential from AWS Fix connector can use subfield of ARN Apr 15, 2024
zane-neo pushed a commit to zane-neo/ml-commons that referenced this pull request Apr 22, 2024
…credential from AWS (opensearch-project#2320) (opensearch-project#2321)

* Fix connector can use subfield of secrectArn to bypass extraction of credential from AWS



* Forbid all kinds of ARN subfield



* Adjust annotation



---------

Signed-off-by: Sicheng Song <[email protected]>
@mingshl mingshl added enhancement New feature or request v2.14.0 labels Apr 30, 2024
dhrubo-os pushed a commit to dhrubo-os/ml-commons that referenced this pull request May 17, 2024
…credential from AWS (opensearch-project#2320) (opensearch-project#2321)

* Fix connector can use subfield of secrectArn to bypass extraction of credential from AWS



* Forbid all kinds of ARN subfield



* Adjust annotation



---------

Signed-off-by: Sicheng Song <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants