Skip to content

KeyWrapAlgorithm models a near-closed set as an open string #36

Description

@sideeffffect

Severity: low · Category: design (judgment call)

Evidence

  • src/optypes/KeyWrapAlgorithm.scala:10-20opaque type KeyWrapAlgorithm = String with only Rsa = "RSA" / Aes = "AES" constants; forwarded unchecked at src/internal/CryptoCapabilityImpl.scala:20.

Problem
A typo ("rsa", "RSA-OAEP") is silently accepted and fails only at the sidecar. The doc comment intentionally allows other component-supported strings, so the open set is partly by design — flagging for a decision.

Suggested fix
Either leave as-is (documented open set — acceptable) or switch to an enum of the algorithms Dapr's crypto building block documents, with an escape hatch if arbitrary strings are still needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlowLow importance

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions