Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove unnecessary HTTP restriction on using Crypto API #716

Open
@olitomlinson

Description

When trying to use the JS SDK (when in HTTP mode) the encrypt and decrypt methods are blocked, by throwing the following exception :

'crypto.decrypt' is not available using the HTTP APIs

Please remove these checks so that it does not unexpectedly block these methods.

https://github.com/dapr/js-sdk/blame/26e8be8931aed2404e0e382b6c61264d1b64f0de/src/implementation/Client/HTTPClient/crypto.ts#L33

https://github.com/dapr/js-sdk/blame/26e8be8931aed2404e0e382b6c61264d1b64f0de/src/implementation/Client/HTTPClient/crypto.ts#L42

The docs say

While both HTTP and gRPC are supported in the alpha release, using the gRPC APIs with the supported Dapr SDKs is the recommended approach for cryptography.

This recommendation is only important for payloads of significant size (buffering vs streaming), therefor this hard constraint in the SDK is not accurate and overly-restrictive, and presents another unexpected hurdle to developers who just want to make progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /