Outbox Servers handling submissions MUST accept a valid object that isn't a subtype of Activity

Description

This test checks that an ActivityPub Outbox accepts submission of an ActivityPub Object that is not an Activity, e.g. a Note, which it should then wrap in a Create activity.

Table of Contents

Identifiers

Use these identifiers to refer to this Test.

URI

urn:uuid:77748b50-f58c-49e7-8986-98e520b0e890

slug

This slug is memorable, but it is not guaranteed to be globally unique like a URI.

outbox-post-must-accept-non-activity-object

Input

This describes the input that each test run will use to select test targets.

input.outbox

the url to the Outbox handling an Activity POST request

required
true
type
xsd:anyUri
range
https://www.w3.org/ns/activitystreams#outbox

input.outbox as json
{
  "help": "the url to the Outbox handling an Activity POST request",
  "required": true,
  "type": "xsd:anyUri",
  "rangeIncludes": [
    "https://www.w3.org/ns/activitystreams#outbox"
  ]
}

input.authorization

proof of authorization. This will be included in the HTTP Authorization header for the POST outbox request

required
false
type
xsd:string, https://activitypub-testing.socialweb.coop/ns/HiddenInTestResults
range
https://www.rfc-editor.org/rfc/rfc9110#field.authorization.value

input.authorization as json
{
  "help": "proof of authorization. This will be included in the HTTP Authorization header for the POST outbox request",
  "required": false,
  "type": [
    "xsd:string",
    "https://activitypub-testing.socialweb.coop/ns/HiddenInTestResults"
  ],
  "rangeIncludes": [
    "https://www.rfc-editor.org/rfc/rfc9110#field.authorization.value"
  ]
}

input.submission

the object to send to the outbox.

required
false

input.submission as json
{
  "help": "the object to send to the outbox.",
  "required": false,
  "default": "{ \"type\": \"Note\", \"@context\": [\"https://www.w3.org/ns/activitystreams\"] }"
}

input.time

amount of time allowed to run test, as IETF RFC3339 dur-time time duration. This is meant to configure the limit for how long this test will wait for network requests.

required
true
type
rfc3339:dur-time, TimeLimit
constraints
[
  {
    "content": " MUST be an [RFC3339 `dur-time`](https://datatracker.ietf.org/doc/html/rfc3339#appendix-A)",
    "mediaType": "test/markdown"
  }
]

input.time as json
{
  "help": "amount of time allowed to run test, as IETF RFC3339 dur-time time duration. This is meant to configure the limit for how long this test will wait for network requests.",
  "required": true,
  "default": "T5S",
  "type": [
    "rfc3339:dur-time",
    "TimeLimit"
  ],
  "constraints": [
    {
      "content": " MUST be an [RFC3339 `dur-time`](https://datatracker.ietf.org/doc/html/rfc3339#appendix-A)",
      "mediaType": "test/markdown"
    }
  ]
}

Input as JSON
{
  "outbox": {
    "help": "the url to the Outbox handling an Activity POST request",
    "required": true,
    "type": "xsd:anyUri",
    "rangeIncludes": [
      "https://www.w3.org/ns/activitystreams#outbox"
    ]
  },
  "authorization": {
    "help": "proof of authorization. This will be included in the HTTP Authorization header for the POST outbox request",
    "required": false,
    "type": [
      "xsd:string",
      "https://activitypub-testing.socialweb.coop/ns/HiddenInTestResults"
    ],
    "rangeIncludes": [
      "https://www.rfc-editor.org/rfc/rfc9110#field.authorization.value"
    ]
  },
  "submission": {
    "help": "the object to send to the outbox.",
    "required": false,
    "default": "{ \"type\": \"Note\", \"@context\": [\"https://www.w3.org/ns/activitystreams\"] }"
  },
  "time": {
    "help": "amount of time allowed to run test, as IETF RFC3339 dur-time time duration. This is meant to configure the limit for how long this test will wait for network requests.",
    "required": true,
    "default": "T5S",
    "type": [
      "rfc3339:dur-time",
      "TimeLimit"
    ],
    "constraints": [
      {
        "content": " MUST be an [RFC3339 `dur-time`](https://datatracker.ietf.org/doc/html/rfc3339#appendix-A)",
        "mediaType": "test/markdown"
      }
    ]
  }
}

Requirement Mapping

This Test has been derived from these specified requirements.

  • urn:uuid:b7b352f2-906b-492d-b64d-20bab5c2ea73

    content
    The server MUST accept a valid [ActivityStreams] object that isn't a subtype of Activity in the POST request to the outbox.
    origin
    {
      "source": "https://www.w3.org/TR/activitypub/",
      "section": {
        "id": "https://www.w3.org/TR/activitypub/#object-without-create",
        "name": "Object creation without a Create Activity",
        "branch": [
          6,
          2,
          1
        ]
      },
      "selector": {
        "type": "TextQuoteSelector",
        "prefix": "For client to server posting, it is possible to submit an object for creation without a surrounding activity.\n",
        "exact": "The server MUST accept a valid [ActivityStreams] object that isn't a subtype of Activity in the POST request to the outbox.\n",
        "suffix": "The server then MUST attach this object as the object of a Create Activity.\n"
      }
    }
    JSON
    {
      "id": "urn:uuid:b7b352f2-906b-492d-b64d-20bab5c2ea73",
      "uuid": "b7b352f2-906b-492d-b64d-20bab5c2ea73",
      "type": "Behavior",
      "content": "The server MUST accept a valid [ActivityStreams] object that isn't a subtype of Activity in the POST request to the outbox.\n",
      "tag": [
        {
          "name": "ActivityPubServer",
          "id": "https://socialweb.coop/tag/ActivityPubServer"
        }
      ],
      "context": [
        "https://www.w3.org/TR/activitypub/",
        {
          "name": "6.2 Create Activity",
          "id": "https://www.w3.org/TR/activitypub/#create-activity-outbox"
        },
        {
          "name": "6.2.1 Object creation without a Create Activity",
          "id": "https://www.w3.org/TR/activitypub/#object-without-create"
        }
      ],
      "origin": {
        "source": "https://www.w3.org/TR/activitypub/",
        "section": {
          "id": "https://www.w3.org/TR/activitypub/#object-without-create",
          "name": "Object creation without a Create Activity",
          "branch": [
            6,
            2,
            1
          ]
        },
        "selector": {
          "type": "TextQuoteSelector",
          "prefix": "For client to server posting, it is possible to submit an object for creation without a surrounding activity.\n",
          "exact": "The server MUST accept a valid [ActivityStreams] object that isn't a subtype of Activity in the POST request to the outbox.\n",
          "suffix": "The server then MUST attach this object as the object of a Create Activity.\n"
        }
      },
      "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://socialweb.coop/ns/testing/context.json"
      ]
    }

Part of

This test is part of the following Test Suites:

JSON

Test Case as JSON
{
  "description": "This test checks that an ActivityPub Outbox accepts submission of an ActivityPub Object that is not an Activity, e.g. a Note, which it should then wrap in a Create activity.",
  "failedCases": [],
  "inapplicableCases": [],
  "input": {
    "outbox": {
      "help": "the url to the Outbox handling an Activity POST request",
      "required": true,
      "type": "xsd:anyUri",
      "rangeIncludes": [
        "https://www.w3.org/ns/activitystreams#outbox"
      ]
    },
    "authorization": {
      "help": "proof of authorization. This will be included in the HTTP Authorization header for the POST outbox request",
      "required": false,
      "type": [
        "xsd:string",
        "https://activitypub-testing.socialweb.coop/ns/HiddenInTestResults"
      ],
      "rangeIncludes": [
        "https://www.rfc-editor.org/rfc/rfc9110#field.authorization.value"
      ]
    },
    "submission": {
      "help": "the object to send to the outbox.",
      "required": false,
      "default": "{ \"type\": \"Note\", \"@context\": [\"https://www.w3.org/ns/activitystreams\"] }"
    },
    "time": {
      "help": "amount of time allowed to run test, as IETF RFC3339 dur-time time duration. This is meant to configure the limit for how long this test will wait for network requests.",
      "required": true,
      "default": "T5S",
      "type": [
        "rfc3339:dur-time",
        "TimeLimit"
      ],
      "constraints": [
        {
          "content": " MUST be an [RFC3339 `dur-time`](https://datatracker.ietf.org/doc/html/rfc3339#appendix-A)",
          "mediaType": "test/markdown"
        }
      ]
    }
  },
  "name": "Outbox Servers handling submissions MUST accept a valid object that isn't a subtype of Activity",
  "passedCases": [],
  "slug": "outbox-post-must-accept-non-activity-object",
  "uuid": "77748b50-f58c-49e7-8986-98e520b0e890",
  "isPartOf": [
    "https://socialweb.coop/activitypub/test-cases/"
  ],
  "requirementReference": [
    {
      "id": "urn:uuid:b7b352f2-906b-492d-b64d-20bab5c2ea73",
      "url": "https://socialweb.coop/activitypub/behaviors/b7b352f2-906b-492d-b64d-20bab5c2ea73"
    }
  ]
}