-
Notifications
You must be signed in to change notification settings - Fork 2.1k
STG100 - Blob Principal Bound Identity SAS #46282
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
STG100 - Blob Principal Bound Identity SAS #46282
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
….com/Azure/azure-sdk-for-java into stg100/blobPrincipalBoundIdentitySas
...e-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.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.
Pull Request Overview
This PR implements Delegated User Object ID for SAS functionality, enabling SAS tokens to be bound to specific Entra ID users for enhanced security. The feature ensures that SAS tokens can only be used when accompanied by valid tokens issued to the specified user.
- Adds
delegatedUserObjectId
field to core SAS classes and string-to-sign logic - Implements comprehensive tests covering both positive and negative scenarios
- Updates asset tags for the new test assets
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
StorageCommonTestUtils.java | Added helper method to extract OID from JWT tokens |
CommonSasQueryParameters.java | Added field and getter for delegated user object ID |
Constants.java | Added SAS parameter constant for delegated user object ID |
SasClientTests.java | Added comprehensive tests for delegated object ID functionality |
SasAsyncClientTests.java | Added async test variants for delegated object ID functionality |
BlobTestBase.java | Improved retry logic for live tests |
BlobServiceSasSignatureValues.java | Added delegated user object ID field and methods |
BlobSasImplUtil.java | Integrated delegated user object ID into SAS generation and signing |
assets.json | Updated asset tag for new test resources |
...common/src/test-shared/java/com/azure/storage/common/test/shared/StorageCommonTestUtils.java
Outdated
Show resolved
Hide resolved
...ge/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java
Outdated
Show resolved
Hide resolved
sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Looks good. Just had one question/suggestion.
...e-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobSasImplUtil.java
Show resolved
Hide resolved
….com/Azure/azure-sdk-for-java into stg100/blobPrincipalBoundIdentitySas
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.
Looks good! 🚢
🔐 New Feature: Delegated User Object ID for SAS
This PR adds support for binding a SAS (Shared Access Signature) to a specific Entra ID user via a new field:
delegatedUserObjectId
. This ensures that the SAS can only be used in conjunction with a token issued to the specified user.📦 Key Code Changes
New Field Added
delegatedUserObjectId
added to:BlobServiceSasSignatureValues
BlobSasImplUtil
CommonSasQueryParameters
Constants.UrlConstants
asSAS_DELEGATED_USER_OBJECT_ID
SAS String Construction
delegatedUserObjectId
is now included in the SAS string-to-sign logic and query parameters.Asset Tag Update
assets.json
.🧪 Tests Added
New test cases validate the behavior of SAS with
delegatedUserObjectId
:🛠️ Utilities
getOidFromToken
inStorageCommonTestUtils
to extract the object ID from a token.