Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#50,818 0 comentarios 2 reacciones 2 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@weidongxu-microsoft ya está trabajando en esto.

Desde el 15/10/2026.

  • #50819 de @copilot-swe-agent — cerrado sin fusionar

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
Java
Estrellas
2.6k
Forks
2.2k
Merge medio
1 d 22 h
PR fusionados (30 d)
213

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/azure-sdk-for-java

Todos los issues de Azure/azure-sdk-for-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.