Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Design] Support External Evaluation Policy (Invoke) in management SDKs

Đang mở
#50,818 0 bình luận 2 reaction 2 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@weidongxu-microsoft đang làm issue này rồi.

Từ ngày 15/10/2026.

  • #50819 của @copilot-swe-agent — đã đóng, không merge

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Summary

Design support for Azure Policy External Evaluation ("Invoke") in Java management SDKs.

The SDK should handle the following flow:

  1. Detect 403 RequestDisallowedByPolicy with missingPolicyTokenDetails.
  2. Call acquirePolicyToken using the original request URI, method, and payload.
  3. Add the returned token to x-ms-policy-external-evaluations.
  4. Replay the original operation once.

Cross-language context and service clarifications are tracked in:
https://github.com/Azure/azure-sdk/issues/10081

An initial Java prototype is available at:
https://github.com/Azure/azure-sdk-for-java/pull/49701

Byte-for-byte payload requirement

For an operation with request-body byte sequence B, the following must use the same serialized bytes:

  1. The original ARM operation body.
  2. acquirePolicyToken.operation.content.
  3. The replayed ARM operation body.

Logical JSON equality is insufficient. Deserializing and reserializing the payload may change property ordering, whitespace, escaping, number formatting, null handling, or encoding and invalidate the token's content binding.

The implementation should retain the final serialized request content and reuse it without modification for token acquisition and replay. Bodyless operations such as DELETE should preserve the service-defined empty/null content behavior.

Design goals

  • Work across management libraries without service-specific changes.
  • Support PUT, PATCH, POST, and DELETE operations.
  • Preserve the exact serialized request content without unnecessary overhead.
  • Prevent recursive acquire/replay loops.
  • Surface policy-evaluation and token-acquisition failures clearly.
  • Define tracing, logging, and token-redaction behavior.
  • Decide whether support is default-enabled or explicitly configured.

Expected outcome

Please propose the Java-specific architecture and public API, preferably with a prototype covering:

  • successful 403 → acquirePolicyToken → replay;
  • verification that the original, token-acquisition, and replay payloads are byte-for-byte identical;
  • prevention of payload reserialization;
  • bodyless operations;
  • token-acquisition failure or policy denial;
  • replay-loop prevention;
  • synchronous and asynchronous APIs;
  • integration with the management client pipeline.

The prototype is for design validation and does not need to be production-ready.

Ngôn ngữ chính
Java
Star
2.6k
Fork
2.2k
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
231

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/azure-sdk-for-java

Tất cả issue của Azure/azure-sdk-for-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.