Indent uses webhooks to notify your application when an event happens. Webhooks are particularly useful for asynchronous events like when a someone approves an access request, someone's time-based access grant expires, or a suspicious access pattern is identified.
First, you’ll need to create your space:
Then connect to Slack to handle the access requests.
To deploy the Custom Webhook connector in your AWS account:
curl https://codeload.github.com/indentapis/indent-js/tar.gz/master | \ tar -xz --strip=2 indent-js-master/examples/serverless-aws-dynamo-webhook cd serverless-dynamo-webhook # Modify `serverless.yml` file to have appropriate groups configured npm install && \ INDENT_WEBHOOK_SECRET="wk0SECRET" \ npx serverless deploy
This will take a minute to run the first time as Serverless sets up the resources in the AWS Acount. You should see an output similar to below:
Serverless: Bundling with Webpack... Time: 1790ms Built at: 05/28/2020 10:40:29 PM Asset Size Chunks Chunk Names index.js 87.6 KiB 0 [emitted] index index.js.map 447 KiB 0 [emitted] [dev] index Entrypoint index = index.js index.js.map [0] ./node_modules/crypto-js/core.js 22.8 KiB {0} [built] [1] ./node_modules/crypto-js/cipher-core.js 29 KiB {0} [built] [2] ./node_modules/axios/lib/utils.js 8.61 KiB {0} [built] [3] ./node_modules/crypto-js/evpkdf.js 3.9 KiB {0} [built] [4] ./node_modules/crypto-js/enc-base64.js 3.99 KiB {0} [built] [5] ./node_modules/crypto-js/md5.js 9.2 KiB {0} [built] [6] ./node_modules/crypto-js/x64-core.js 8.68 KiB {0} [built] [7] ./node_modules/crypto-js/sha1.js 3.97 KiB {0} [built] [8] ./node_modules/crypto-js/hmac.js 3.89 KiB {0} [built] [11] ./node_modules/crypto-js/index.js 1.55 KiB {0} [built] [12] ./node_modules/crypto-js/sha256.js 5.41 KiB {0} [built] [28] ./index.ts 3.9 KiB {0} [built] [53] ./node_modules/axios/index.js 40 bytes {0} [built] [54] ./node_modules/axios/lib/axios.js 1.39 KiB {0} [built] [81] ./node_modules/@indent/webhook/esm/index.js + 1 modules 12.6 KiB {0} [built] | ./node_modules/@indent/webhook/esm/index.js 2.56 KiB [built] | ./node_modules/tslib/tslib.es6.js 10 KiB [built] + 67 hidden modules Serverless: Packaging service... Serverless: Uploading CloudFormation file to S3... Serverless: Uploading artifacts... Serverless: Uploading service indent-dynamo-webhook.zip file to S3 (161.64 KB)... Serverless: Validating template... Serverless: Updating Stack... Serverless: Checking Stack update progress... .............. Serverless: Stack update finished... Service Information service: indent-dynamo-webhook stage: dev region: us-west-2 stack: indent-dynamo-webhook-dev resources: 12 api keys: None endpoints: POST - https://2k3xn01jd20.execute-api.us-west-2.amazonaws.com/dev/webhook functions: webhook: indent-dynamo-webhook-dev-webhook layers: None
Once you’ve deployed this webhook, update the URL
in your App Config and you should start to see events flow into your webhook!