Skip to content

Is it possible to somehow define Slack request signature verfiying in Smithy? #3150

@x1a0

Description

@x1a0

I am very new to Smithy and want to create a service that will receive requests from Slack.
Slack supports request verifying: https://api.slack.com/authentication/verifying-requests-from-slack.
In short, it needs 2 values from HTTP header, plus the whole HTTP body, as input, to calculate the signature.

I wonder is it possible to define this as some sort of Smithy trait. So I can have something like:

@slackSig
@http(method: "POST", uri: "/slack/event")
operation SlackEvent {
    input: SlackEventInput
}

Then the Rust code generator generates some Rust trait that I could implement, to have the actual Slack signature verifying logic. In the end, an instance of the verifier is created and attached to the service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    serverRust server SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions