Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell ObjectScale 1.3 Administration Guide

Configure Webhook Destination for S3 Notifications

Set up the destination configuration for the WebHooks server that will receive the bucket event notifications.

Prerequisites

You must have configured:

  • an IAM user with an Access Key and Secret.
  • the destination configuration of the webhooks server. The URN for the destination configuration is a required field in the bucket notification configuration.

About this task

Using a Linux workstation with kubectl and s3curl.pl, and that has access to ObjectScale on this k8s cluster:

Steps

  1. List the objectscale-gateway service endpoint.
    kubectl -n <NAMESPACE_NAME> get svc objectscale-gateway
  2. Set an environment variable for the DCM endpoint.
    DCM_ENDPOINT=<OBJECTSCALE_GATEWAY_IP>
  3. Set your user Access Key and Secret that you created during the s3curl setup.
    ACCESS_KEY=<ACCESS_KEY>
    SECRET=<SECRET_KEY>
  4. Calculate the signature for the request to add a new WebHook destination configuration.
    NL=$'\n'
    RESOURCE=/destconf/webhook/
    DATEVAL="`date -u ${adj} +'%a, %d %b %Y %H:%M:%S %z'`"
    STRING_TO_SIGN="PUT${NL}${NL}application/xml;charset=utf-8${NL}${DATEVAL}${NL}${RESOURCE}"
    SIGNATURE=`/bin/echo -n "$STRING_TO_SIGN" | openssl sha1 -hmac ${SECRET} -binary | base64`
  5. Add a new WebHook destination configuration to DCM passing the WebhookConfig XML in the request payload.
    CREATE_WEBHOOK_OUTPUT=$(curl -v -H "Date: ${DATEVAL}" -H "Authorization: AWS ${ACCESS_KEY}:${SIGNATURE}" -H "Content-Type: application/xml;charset=utf-8" -d @<PATH_TO_WEBHOOK_CONFIG_XML_FILE> -X PUT https://${DCM_ENDPOINT}:<GATEWAY_PORT>/destconf/webhook/)
  6. Review the reply from the request.
    The reply should look like:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Webhook>
      <Urn>urn:objectscale:webhook::24069e07-2b7a-4dc4-98ef-ee7d4017cf96:MyWebhook2</Urn>
      <WebhookConfig>
        <AuthToken>token</AuthToken>
        <BackupLimit>100000</BackupLimit>
        <Comment>optional comment</Comment>
        <Endpoint>http://10.247.102.238:3000/hook</Endpoint>
        <Name>MyWebhook2</Name>
      </WebhookConfig>
    </Webhook>
  7. Save the Urn of the WebHook configuration created in 5.

    When creating the bucket notification configuration(s) in GUID-7D76E1D7-8EC6-4A89-9252-250134D94530#GUID-7D76E1D7-8EC6-4A89-9252-250134D94530__GUID-F278F817-36A9-41A1-A144-B8D31920D0D7, use the value from $WEBHOOK_URN in the <Topic></Topic> of the desired TopicConfiguration.

    WEBHOOK_URN=$(echo $CREATE_WEBHOOK_OUTPUT | xmllint -format - | grep Urn | sed 's/<Urn>\(.*\)<\/Urn>/\1/g' | sed -e 's/^[ \t]*//')
  8. Optional: Review the WebHook destination configuration:

    Use the ${DCM_ENDPOINT} value from 2.

    s3curl.pl --ord --debug --id=${ACCESS_KEY} --key=${SECRET} -- https://${DCM_ENDPOINT}:<GATEWAY_PORT>/destconf/webhook/${WEBHOOK_URN}
  9. Optional: If/when you need to remove a WebHook destination configuration, delete a webhook configuration by:

    Use the ${DCM_ENDPOINT} value from 2.

    s3curl.pl --ord --debug --id=${ACCESS_KEY} --key=${SECRET} --delete -- https://${DCM_ENDPOINT}:<GATEWAY_PORT>/destconf/webhook/${WEBHOOK_URN}

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\