 
 
     describe "from a remote service", ->
-        it.skip "must check if server is authoritative", (done) ->
-
-        it.skip "must reject remote posts without <actor/>", (done) ->
+        it "must reject posts from non-authoritative services", (done) ->
+            publishEl = server.makePublishIq "buddycloud.voyager.sf", "buddycloud.example.org",
+                "publish-B-12", "/user/picard@enterprise.sf/posts",
+                author: "sisko@ds9.sf", content: "Test post B12"
+            publishEl.up().up().up().c("actor", xmlns: NS.BUDDYCLOUD_V1).t("sisko@ds9.sf")
+
+            server.doTest publishEl, "got-iq-publish-B-12", done, testErrorIq "modify", "bad-request"
+
+        it "must reject remote posts with no or invalid <actor/>", (done) ->
+            discoId = null
+
+            async.series [(cb) ->
+                # No actor
+                publishEl = server.makePublishIq "buddycloud.ds9.sf", "buddycloud.example.org",
+                    "publish-B-13", "/user/picard@enterprise.sf/posts",
+                    author: "sisko@ds9.sf", content: "Test post B13"
+
+                server.doTest publishEl, "got-iq-publish-B-13", cb, testErrorIq "modify", "bad-request"
+
+            , (cb) ->
+                # Invalid actor: correct server name
+                publishEl = server.makePublishIq "buddycloud.ds9.sf", "buddycloud.example.org",
+                    "publish-B-14", "/user/picard@enterprise.sf/posts",
+                    author: "sisko@ds9.sf", content: "Test post B14"
+                publishEl.up().up().up().c("actor", xmlns: NS.BUDDYCLOUD_V1).t("buddycloud.ds9.sf")
+
+                server.doTest publishEl, "got-iq-publish-B-14", cb, testErrorIq "modify", "bad-request"
+
+            , (cb) ->
+                # Invalid actor: incorrect server name
+                publishEl = server.makePublishIq "buddycloud.ds9.sf", "buddycloud.example.org",
+                    "publish-B-15", "/user/picard@enterprise.sf/posts",
+                    author: "sisko@ds9.sf", content: "Test post B15"
+                publishEl.up().up().up().c("actor", xmlns: NS.BUDDYCLOUD_V1).t("buddycloud.voyager.sf")
+
+                # This will also do a disco#items to buddycloud.voyager.sf, so tell the server how to respond to it
+                server.disco.items["buddycloud.voyager.sf"] = []
+                server.doTest publishEl, "got-iq-publish-B-15", cb, testErrorIq "modify", "bad-request"
+
+            ], (err) ->
+                # Cleanup first
+                delete server.disco.items["buddycloud.voyager.sf"]
+                done err
+
+        it "must use <actor/> for the post author", (done) ->
+            async.series [(cb) ->
+                publishEl = server.makePublishIq "buddycloud.ds9.sf", "buddycloud.example.org",
+                    "publish-B-16", "/user/picard@enterprise.sf/posts",
+                    author_uri: "acct:odo@ds9.sf", content: "Test post B16", id: "test-B-16"
+                publishEl.up().up().up().c("actor", xmlns: NS.BUDDYCLOUD_V1).t("sisko@ds9.sf")
+
+                server.doTest publishEl, "got-iq-publish-B-16", cb, testPublishResultIq
+
+            , (cb) ->
+                iq = server.makePubsubGetIq("picard@enterprise.sf", "buddycloud.example.org", "publish-B-17")
+                    .c("items", node: "/user/picard@enterprise.sf/posts")
+                    .c("item", id: "test-B-16")
+
+                server.doTest iq, "got-iq-publish-B-17", cb, (iq) ->
+                    iq.attrs.should.have.property "type", "result"
+                    entryEl = iq.getChild("pubsub", NS.PUBSUB)
+                        ?.getChild("items")
+                        ?.getChild("item")
+                        ?.getChild("entry", NS.ATOM)
+                    should.exist entryEl, "missing element: <entry/>"
+                    atom = server.parseAtom entryEl
+                    atom.should.have.property "author_uri", "acct:sisko@ds9.sf"
+            ], done
 
         it "must check for permissions of remote posters", (done) ->
             async.series [(cb) ->

                    should.exist tsEl, "missing element: <deleted-entry/>"
                    testTombstone tsEl, "test-F-9"
            ], done

        it "should be notified to subscribers", (done) ->
            async.series [(cb) ->

                "publish-D-4", "/user/picard@enterprise.sf/posts",
                content: "Test reply D4", id: "test-D-4", in_reply_to: "missing-post"

            server.doTest publishEl, "got-iq-publish-D-4", done, testErrorIq "modify", "not-acceptable"


    describe "an update", ->
