Unexpected 'Forbidden' scenarios When Accessing OCI Object Storage with Signed URLs in Java
I've looked through the documentation and I'm still confused about I've been banging my head against this for hours... I'm trying to generate a signed URL to access a private object in OCI Object Storage using the OCI Java SDK (version 2.11.0). I've set up the bucket's policy to allow access via signed URLs, but when I attempt to use the generated URL, I get a '403 Forbidden' behavior. Here's the code I'm using to generate the signed URL: ```java import com.oracle.bmc.objectstorage.ObjectStorageClient; import com.oracle.bmc.objectstorage.model.CreatePreauthenticatedRequestDetails; import com.oracle.bmc.objectstorage.model.PreauthenticatedRequestSummary; import com.oracle.bmc.auth.SimpleAuthenticationDetailsProvider; import com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider; import java.time.OffsetDateTime; public class SignedUrlExample { public static void main(String[] args) { AbstractAuthenticationDetailsProvider provider = SimpleAuthenticationDetailsProvider.builder() .tenantId("<YOUR_TENANT_ID>") .userId("<YOUR_USER_ID>") .fingerprint("<YOUR_FINGERPRINT>") .privateKeySupplier(() -> new FileInputStream("<YOUR_PRIVATE_KEY_PATH>")) .passPhrase("<YOUR_KEY_PASSPHRASE>") .build(); ObjectStorageClient client = ObjectStorageClient.builder().build(provider); CreatePreauthenticatedRequestDetails requestDetails = CreatePreauthenticatedRequestDetails.builder() .name("test-request") .accessType(CreatePreauthenticatedRequestDetails.AccessType.ObjectRead) .timeExpires(OffsetDateTime.now().plusDays(1)) .build(); String namespaceName = "<YOUR_NAMESPACE>"; String bucketName = "<YOUR_BUCKET_NAME>"; PreauthenticatedRequestSummary response = client.createPreauthenticatedRequest(namespaceName, bucketName, requestDetails); System.out.println("Signed URL: " + response.getAccessUri()); } } ``` I've double-checked that the bucket name and namespace are correct. The pre-authenticated request seems to be created successfully, and I can see the generated URL. However, when I try to access the URL directly in a browser or with an HTTP client, it returns a '403 Forbidden'. I've also ensured that the user's policy includes `allow objectstorage to manage object in compartment <COMPARTMENT_NAME>` and `allow objectstorage:preauthenticated-requests to read in compartment <COMPARTMENT_NAME>`. I've even tried regenerating the signed URL multiple times and clearing my browser cache, but the scenario continues. What could be going wrong? Any insights or suggestions would be greatly appreciated! I'm working on a web app that needs to handle this. What am I doing wrong? This is my first time working with Java latest. The stack includes Java and several other technologies. Cheers for any assistance!