Remove IMDS v1 Fallback from oci-java-sdk
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 243
- Forks
- 171
- Avg merge
- 30m
- Merged PRs (30d)
- 4
Description
This issue tracks the removal of fallback to IMDS v1 endpoints and the introduction of retry logic for IMDS v2 in oci-java-sdk
IMDS (Instance Metadata Service) endpoints provide region information and metadata for Instance Principal, Resource Principal, and etc. To ensure the security and functionality of this feature, IMDS v1 fallback will be removed from all SDKs. After this change, if the IMDS v2 endpoint is unavailable, there will be no fallback to IMDS v1. Applications relying on v1 fallback must update accordingly to avoid service disruptions.
Changes Implemented
Remove Fallback to IMDS v1:
- The SDK will no longer attempt to access IMDS v1 if IMDS v2 requests fail.
Retry Mechanism for IMDS v2 in Auth. A retry strategy has been introduced with:
- 8 retry attempts
- Exponential backoff with Jitter between attempts
- details: {link to retry code}
This change will take effect starting from the version 3.55.0
Impact on Users
Users relying on IMDS v1 or using a version older than 3.55.0 must upgrade to the latest SDK version. Failure to do so may result in disruptions if IMDS v2 encounters issues, as the new versions will no longer fall back to v1.
Action Required
- Review the new retry logic to ensure expected behavior.
- Upgrade to the latest SDK version to remove reliance on IMDS v1.
- Test integrations to confirm seamless operation with the new IMDS v2 behavior.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java around the linked retry logic. Review how IMDS v2 requests and failures are handled, then verify that v1 fallback is absent and the documented eight-attempt exponential-backoff-with-jitter behavior is covered; the payload names no tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100