Skip to content

[Storage] SAS PoC #2798

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vincenttran-msft
Copy link
Member

No description provided.

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Jul 16, 2025
@@ -83,6 +83,32 @@ impl BlobClient {
})
}

pub fn new_no_credential(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to expose a way to construct a credential-less handwritten abstraction of the clients.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Make this from_blob_url
  • Should take a full Blob URL, no container_name or blob_name input
  • Parse those elements out, pass along to generated layer
  • For now, endpoint can still have query parameters

@@ -102,6 +102,35 @@ impl BlobClient {
})
}

pub fn new_no_credential(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GEN CODE SUPPORT: Credential-less new() that also doesn't call endpoint.set_query(None) and clobbers all query params.

Comment on lines +802 to +810
// let mut path = String::from("{containerName}/{blobName}");
// path = path.replace("{blobName}", &self.blob_name);
// path = path.replace("{containerName}", &self.container_name);
// url = url.join(&path)?;
{
let mut path_segments = url.path_segments_mut().expect("Cannot be base");
path_segments.push(&self.container_name);
path_segments.push(&self.blob_name);
}
Copy link
Member Author

@vincenttran-msft vincenttran-msft Jul 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sample of the refactor on per-method -- need to use path_segments_mut() to append the path segments rather than using join() (which also was clobbering everything but the base)

Copy link

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure_storage_blob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant