oracle / oracle/oci-java-sdk

Remove IMDS v1 Fallback from oci-java-sdk

Open
#647 0 comments 0 reactions 0 assignees View on GitHub

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:

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.