-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support for Google Application Default Credentials #8394
Support for Google Application Default Credentials #8394
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
.../repository-gcs/src/main/java/org/opensearch/repositories/gcs/GoogleCloudStorageService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming it works (see comment below), this needs at the very least tests, please.
.../repository-gcs/src/main/java/org/opensearch/repositories/gcs/GoogleCloudStorageService.java
Outdated
Show resolved
Hide resolved
Thanks for creating this pull request - I'll take another look after tests have been added. |
This PR is stalled because it has been open for 30 days with no activity. Remove stalled label or comment or this will be closed in 7 days. |
❌ Gradle check result for a10ffa5: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: fahadshamiinsta <[email protected]>
❌ Gradle check result for 736b2f2: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Signed-off-by: fahadshamiinsta <[email protected]>
❌ Gradle check result for ae2f832: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❕ Gradle check result for 21a2ffb: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
@dblock please have another look: |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-8394-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4c283a7c79b20e73ccf3378124893451197b85a3
# Push it to GitHub
git push --set-upstream origin backport/backport-8394-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
@fahadshamiinsta you will need to manually backport this if you want it in the next 2.x release (2.12) |
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]> (cherry picked from commit 4c283a7)
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]> (cherry picked from commit 4c283a7)
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]> (cherry picked from commit 4c283a7)
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]> (cherry picked from commit 4c283a7)
* fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]> (cherry picked from commit 4c283a7) Co-authored-by: Fahad Shami <[email protected]>
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]> (cherry picked from commit 4c283a7)
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]> (cherry picked from commit 4c283a7)
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]>
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]>
…t#8394) * fixed conflicts Signed-off-by: fahadshamiinsta <[email protected]> * applying spotless Java check Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to test helper method Signed-off-by: fahadshamiinsta <[email protected]> * added a comment to GoogleApplicationDefaultCredentials class with document reference Signed-off-by: fahadshamiinsta <[email protected]> * to rerun gradle checks Signed-off-by: fahadshamiinsta <[email protected]> * increasing coverage by adding another test Signed-off-by: fahadshamiinsta <[email protected]> * test name change Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * force push to rerun ci Signed-off-by: fahadshamiinsta <[email protected]> * pushing to trigger ci checks Signed-off-by: fahadshamiinsta <[email protected]> --------- Signed-off-by: fahadshamiinsta <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
This change provides the support for Application Default Credentials for the repository-gcs plugin to support the snapshot api requests.
The solution uses the existent google auth library. The google client is instantiated being wrapped in a doPrivileged block i.e using SocketAccess class to avoid Access Denied errors and to connect to google cloud services.
Related Issues
Resolves #8375
Check List
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.