New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activitypub Interoperability with Hubzilla #228

Closed
git-marijus opened this Issue Jan 21, 2018 · 9 comments

Comments

Projects
None yet
4 participants
@git-marijus

git-marijus commented Jan 21, 2018

From hubzilla (https://project.hubzilla.org) i can successfully communicate with mastodon. When i try to connect to a peertube member though, i get a status 403 when posting a valid follow request to https://peertube.drycat.fr/accounts/motesting/inbox

EDIT: here is the message data:

{
  "@context":[
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1"
  ],
  "id":"https://hub.somaton.com/follow/635",
  "type":"Follow",
  "actor":{
    "type":"Person",
    "id":"https://hub.somaton.com/channel/mario",
    "preferredUsername":"mario",
    "name":"Mario Vavti",
    "icon":{
      "type":"Image",
      "mediaType":"image/jpeg",
      "url":"https://hub.somaton.com/photo/profile/l/2",
      "height":300,
      "width":300
    },
    "url":{
      "type":"Link",
      "mediaType":"text/html",
      "href":"https://hub.somaton.com/channel/mario"
    },
    "inbox":"https://hub.somaton.com/inbox/mario",
    "outbox":"https://hub.somaton.com/outbox/mario",
    "followers":"https://hub.somaton.com/followers/mario",
    "following":"https://hub.somaton.com/following/mario",
    "endpoints":{
      "sharedInbox":"https://hub.somaton.com/inbox"
    },
    "publicKey":{
      "id":"https://hub.somaton.com/channel/mario/public_key_pem",
      "owner":"https://hub.somaton.com/channel/mario",
      "publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAx5BzchvOd4s6374TV2Ha\nHdVXftaHH5t7IIQzPWpuO/38NGBqBLlkx/beyY+e92MV71N71F/4Hb0jysSqki30\npjrHFQrJJe/VJpqkuaGF7OpQ4MzG9FVeaQ/bN381jAqy6c4+NW6++itFJdUvgrrG\nTK4Q8oQC/DH3M2rcvAowlS4/IBjKWZPh8Mh/FfwoxFHifNSOIIikzKdE+MKpkkUQ\n8DR0rvAhMf9HIRFQxRvHRn1W/xrtzMf364uTkyt16uXtKsGeA5P4KBThBS4vFi9w\n86cdWTsze9Xcfws9c+I116Cb5Qj6elFGhLSkRZbh9GGv4Exp1e091vDMtykVP2vW\nYtjzzLNGfrV16Io1g+nbV+szBRFJfHLNaax//p42RMR+vc4w/sOO5L5sYX8gsbPq\nOow9of9GeZ7i/VhHVLBuOtyVVgo3xRzT81dtpPSu7t+hlvuaKvBGp5RUmb/n0fLz\nFjDu7DNC/LOPBfhzbmI6yTM5SCCPw6myw4F3GfXxGyOU5ZWpxH1MfFZQ56pkBpjE\ni6gmlziAK2j3vJbzX5Xzo1v6EL5TTPKD4fExhk0DYEY2LkTPW6UMixTuGz0lQObk\nuPobWWWoPhr3La3g23SQl0pNFOBF9eRBQevDROvilTafMtQYxTmouH9iGe/xWpVI\nxJ4u2u4z0gC8p2qclK/u2RECAwEAAQ==\n-----END PUBLIC KEY-----\n"
    },
    "nomadicLocations":[
      {
        "id":"https://hub.somaton.com/locs/mario",
        "type":"nomadicLocation",
        "locationAddress":"acct:mario@hub.somaton.com",
        "locationPrimary":true,
        "locationDeleted":false
      }
    ]
  },
  "object":"https://peertube.drycat.fr/account/motesting",
  "to":[
    "https://peertube.drycat.fr/account/motesting"
  ],
  "signature":{
    "@context":[
      "https://www.w3.org/ns/activitystreams",
      "https://w3id.org/security/v1"
    ],
    "type":"RsaSignature2017",
    "nonce":"15fd31a563297291cbdb0923666ffa23bf5960a7b9100067b41dad124e01feaa",
    "creator":"https://hub.somaton.com/channel/mario/public_key_pem",
    "created":"2018-01-21T08:42:01Z",
    "signatureValue":"G8TfEK+c1+y5F4pZX1WKIVSlsOKNGR5DKj9rbY5kq+HtQd+W2ZgB+GMvxjck9f5lC2lbrfL9hpoprotMdQfldpBWcbrrnx4QJicxjD+D8fWctWCzl2o7d3On901N+gv33M6OAhfbiPmvUZUmNbxfERw8B28b7Sr1IuDZJbuAGmLxL2rXhqZ4PnTe6PvYUEU26bC7EIsobZhFXg0VKTjwOyIaHphAE4sOdmorv1+KkuntTWFtmTTgy5vxXmMvWP8qxqS3LBRLsyO8JaW6VsI/p6cVHqrfpybJaFDvBWXGHuqCW+LjGapqcKv4WFYUxFVLdGTYHiE8UvJvEtoBWZI2WQvJv5erSrbKaJUTlrXrSiU1+tj1VmaaEgTL2BPJbjjTYS/UKRIq9WRxr0TOW0AkwuLy6n6mYPHRPFwUpylZb/h7yWM/63BR6akFgxXLqNL0jZhz8SG7sKlDx2RWLGI1bC/qW/fOmQZ54Rs8i7NY1tSET5DHtoN+lu3ZOgOg7+QTvfaVMD7nJqhxsn39TYRt1REPSeT43Ygtu4juGxC47qbI0Jc6zj8t/xZtMiTYb2z9GIciGVlwoCwDjWawGc0jAHUk9f8L9aU7WZ9qT0dghWk3rVKM7XJ3rcLmaAwt7bJhSBg4gEDfp/rZ3Skk8lIJ8SlLwCKIs00X44Oc4x2iSdw="
  }
}
@DeadSuperHero

This comment has been minimized.

DeadSuperHero commented Mar 20, 2018

+1 for this, I would love to be able to follow PeerTube channels from my Hubzilla installation!

@mrjive

This comment has been minimized.

mrjive commented Mar 21, 2018

+1 that would be awesome!

@Chocobozzz

This comment has been minimized.

Owner

Chocobozzz commented Mar 26, 2018

@git-marijus Could you try to follow root@peertube2.cpy.re? I tried to improve our ActivityPub implementation.

@git-marijus

This comment has been minimized.

git-marijus commented Mar 27, 2018

Thanks!
I followed you and according to my log peertube accepted the follow request this time:

2018-03-27T18:03:31Z:LOG_INFO::pubcrawl.php:506:pubcrawl_queue_message: URL: https://peertube2.cpy.re/accounts/root/inbox
2018-03-27T18:03:31Z:LOG_INFO::pubcrawl.php:507:pubcrawl_queue_message: DATA: {
  "@context":[
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    "https://hub.somaton.com/apschema/v1.2"
  ],
  "id":"https://hub.somaton.com/follow/991",
  "type":"Follow",
  "actor":{
    "type":"Person",
    "id":"https://hub.somaton.com/channel/mario",
    "preferredUsername":"mario",
    "name":"Mario Vavti",
    "icon":{
      "type":"Image",
      "mediaType":"image/jpeg",
      "url":"https://hub.somaton.com/photo/profile/l/2",
      "height":300,
      "width":300
    },
    "url":{
      "type":"Link",
      "mediaType":"text/html",
      "href":"https://hub.somaton.com/channel/mario"
    },
    "inbox":"https://hub.somaton.com/inbox/mario",
    "outbox":"https://hub.somaton.com/outbox/mario",
    "followers":"https://hub.somaton.com/followers/mario",
    "following":"https://hub.somaton.com/following/mario",
    "endpoints":{
      "sharedInbox":"https://hub.somaton.com/inbox"
    },
    "publicKey":{
      "id":"https://hub.somaton.com/channel/mario/public_key_pem",
      "owner":"https://hub.somaton.com/channel/mario",
      "publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAx5BzchvOd4s6374TV2Ha\nHdVXftaHH5t7IIQzPWpuO/38NGBqBLlkx/beyY+e92MV71N71F/4Hb0jysSqki30\npjrHFQrJJe/VJpqkuaGF7OpQ4MzG9FVeaQ/bN381jAqy6c4+NW6++itFJdUvgrrG\nTK4Q8oQC/DH3M2rcvAowlS4/IBjKWZPh8Mh/FfwoxFHifNSOIIikzKdE+MKpkkUQ\n8DR0rvAhMf9HIRFQxRvHRn1W/xrtzMf364uTkyt16uXtKsGeA5P4KBThBS4vFi9w\n86cdWTsze9Xcfws9c+I116Cb5Qj6elFGhLSkRZbh9GGv4Exp1e091vDMtykVP2vW\nYtjzzLNGfrV16Io1g+nbV+szBRFJfHLNaax//p42RMR+vc4w/sOO5L5sYX8gsbPq\nOow9of9GeZ7i/VhHVLBuOtyVVgo3xRzT81dtpPSu7t+hlvuaKvBGp5RUmb/n0fLz\nFjDu7DNC/LOPBfhzbmI6yTM5SCCPw6myw4F3GfXxGyOU5ZWpxH1MfFZQ56pkBpjE\ni6gmlziAK2j3vJbzX5Xzo1v6EL5TTPKD4fExhk0DYEY2LkTPW6UMixTuGz0lQObk\nuPobWWWoPhr3La3g23SQl0pNFOBF9eRBQevDROvilTafMtQYxTmouH9iGe/xWpVI\nxJ4u2u4z0gC8p2qclK/u2RECAwEAAQ==\n-----END PUBLIC KEY-----\n"
    },
    "nomadicLocations":[
      {
        "id":"https://hub.somaton.com/locs/mario",
        "type":"nomadicLocation",
        "locationAddress":"acct:mario@hub.somaton.com",
        "locationPrimary":true,
        "locationDeleted":false
      }
    ]
  },
  "object":"https://peertube2.cpy.re/account/root",
  "to":[
    "https://peertube2.cpy.re/account/root"
  ],
  "signature":{
    "@context":[
      "https://www.w3.org/ns/activitystreams",
      "https://w3id.org/security/v1"
    ],
    "type":"RsaSignature2017",
    "nonce":"8aa4e3e0bfcd813bfe56fda639916723d46c57d5f0158a27f44c1dabe352e0d4",
    "creator":"https://hub.somaton.com/channel/mario/public_key_pem",
    "created":"2018-03-27T06:03:31Z",
    "signatureValue":"vdjI2bEfdkQOIdCjkYse4sj7ulbYIXqI7x6TCnTpXhk2LQU2rgzJsoEKT/SX4F8o0pqc1M8wKZh7Rx2qRlMTFLDCjKLKMqm9csRH7NcgfxRfHmnUgVNkjbjSEv4FmckV4bR5QAI/ANS4TF76onrV33cR/in63G1PdKiDvES39yiWoIwRmGpEjp3ek1OOH6U18PLHF35zY8ZWs7GiR7ejDcBnSQI89WOxa0v3oWYb4OSgTUJ96Ker3Q7mdkAd3/2bJjXSbUQtbo8XftMSQ7ZbGwhLkxtv3IEx2ZcQlliP+x+m2TmPffacljW2GOjvR/lpEPLGIVJol3FiJax/dBYhTkHw2K+QGt90U1C+/XcfDQcaz7SchR6AMkDNuBtcGEkEsj2fmJ6ULwJmW9nl7ci1W3oL7vZGdIrcdT3ghnn/AIac3EMDpt1nfWEJKfNx9qGXmXSYE5oxSah7zffr0EVA38dliB/7I0NzXXUV3t7Z3CSJK68BCTaNjyl7lGgFE8uWb0MHHjCUBFVF1FUgZz/kIWgCEfauQXXUOWcmCXJRNLFvmrdLFCzcEP3iIGAMbqFXnqootAoLo8m0WlXt7YFhPIszr/6T5DaRRVojLBNcPrIWnBz9fQNWO8xWAC0tp1oXNlZSioQNXCJfdh2/GXyiaCgkaZT9UT/MyUcwErTDbVo="
  }
}
2018-03-27T18:03:31Z:LOG_INFO::pubcrawl.php:516:pubcrawl_queue_message: queue: 87a062adc29732b34d148bcec19a68f56ccc99241002ed6f87adf6f27e405421 https://peertube2.cpy.re/accounts/root/inbox
2018-03-27T18:03:31Z:LOG_DEBUG::Master.php:26:Release: Master: release: Array
(
    [0] => Deliver
    [1] => 87a062adc29732b34d148bcec19a68f56ccc99241002ed6f87adf6f27e405421
)

2018-03-27T18:03:31Z:LOG_INFO::Deliver.php:16:run: deliver: invoked: Array
(
    [0] => Deliver
    [1] => 87a062adc29732b34d148bcec19a68f56ccc99241002ed6f87adf6f27e405421
)

2018-03-27T18:03:32Z:LOG_INFO:5e974d181f27ea0491153701df0eaab6:pubcrawl.php:269:pubcrawl_is_as_request: Accept: application/activity+json, application/ld+json
2018-03-27T18:03:32Z:LOG_INFO:5e974d181f27ea0491153701df0eaab6:pubcrawl.php:350:pubcrawl_channel_mod_init: channel: {"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1","https://hub.somaton.com/apschema/v1.2"],"type":"Person","id":"https://hub.somaton.com/channel/mario","preferredUsername":"mario","name":"Mario Vavti","icon":{"type":"Image","mediaType":"image/jpeg","url":"https://hub.somaton.com/photo/profile/l/2","height":300,"width":300},"url":{"type":"Link","mediaType":"text/html","href":"https://hub.somaton.com/channel/mario"},"inbox":"https://hub.somaton.com/inbox/mario","outbox":"https://hub.somaton.com/outbox/mario","followers":"https://hub.somaton.com/followers/mario","following":"https://hub.somaton.com/following/mario","endpoints":{"sharedInbox":"https://hub.somaton.com/inbox"},"publicKey":{"id":"https://hub.somaton.com/channel/mario/public_key_pem","owner":"https://hub.somaton.com/channel/mario","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAx5BzchvOd4s6374TV2Ha\nHdVXftaHH5t7IIQzPWpuO/38NGBqBLlkx/beyY+e92MV71N71F/4Hb0jysSqki30\npjrHFQrJJe/VJpqkuaGF7OpQ4MzG9FVeaQ/bN381jAqy6c4+NW6++itFJdUvgrrG\nTK4Q8oQC/DH3M2rcvAowlS4/IBjKWZPh8Mh/FfwoxFHifNSOIIikzKdE+MKpkkUQ\n8DR0rvAhMf9HIRFQxRvHRn1W/xrtzMf364uTkyt16uXtKsGeA5P4KBThBS4vFi9w\n86cdWTsze9Xcfws9c+I116Cb5Qj6elFGhLSkRZbh9GGv4Exp1e091vDMtykVP2vW\nYtjzzLNGfrV16Io1g+nbV+szBRFJfHLNaax//p42RMR+vc4w/sOO5L5sYX8gsbPq\nOow9of9GeZ7i/VhHVLBuOtyVVgo3xRzT81dtpPSu7t+hlvuaKvBGp5RUmb/n0fLz\nFjDu7DNC/LOPBfhzbmI6yTM5SCCPw6myw4F3GfXxGyOU5ZWpxH1MfFZQ56pkBpjE\ni6gmlziAK2j3vJbzX5Xzo1v6EL5TTPKD4fExhk0DYEY2LkTPW6UMixTuGz0lQObk\nuPobWWWoPhr3La3g23SQl0pNFOBF9eRBQevDROvilTafMtQYxTmouH9iGe/xWpVI\nxJ4u2u4z0gC8p2qclK/u2RECAwEAAQ==\n-----END PUBLIC KEY-----\n"},"nomadicLocations":[{"id":"https://hub.somaton.com/locs/mario","type":"nomadicLocation","locationAddress":"acct:mario@hub.somaton.com","locationPrimary":true,"locationDeleted":false}],"signature":{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"type":"RsaSignature2017","nonce":"9db0043b1af71e95aaa142ff131ae154b0041f756803ca98633f6b8407875b90","creator":"https://hub.somaton.com/channel/mario/public_key_pem","created":"2018-03-27T06:03:32Z","signatureValue":"LEq8IFSTC9um/uUBp1I3f+TYb0kncucp2LCtjcpc6N5h+ByjNDhmNHoXp5q1SMER919hozDPX9WjcrKI9ysiSKsdKNZc4NvwkWluAk29dnNiynnAImX09b8xspmDEwBWhHGHQFyS4Xis22hscazLh1TTv37fcDuV27jcDHAweGZvrAfjtppU5fZn+LW3QGJqBlMmkHYUYyygkFASQ49yhnvcXrxXlWiITQUgZ3nDEQd+aDtOxxxSwqvF7GlPRoV+TDVs3Uz7SV4ByO/VOX4t/NBhM9sd3VKPvuUdWnF8iC/WTaP8Squ9ecBwRJ0X7+X1dNxZyFDbFBySxTK57dyn3ICrBNQxatz9ld+EzcFz0c+iXd+55CZ9udgCjW1gsD/LGZU8nh0d6El1DxdtnhAqgYZHqmlFd5wMYPtYiDjiDO7wv3lGPfFCTaChRazAbae4v8EdkUBvBLLKD3nhQikN7aPq5apRM2BgLZxFLU1y1JABoycUNz4+PpICxZpjML6MK/LQ2A5xMVqBVTtfdIWafbe28dXMt2pg5Jb0cvAPXo6/FgQYl0IpHPpS5tLArtr2VG66yvCnLuATsU5YQuKDv7gwRiZV39SnUnQ53QteB45lOVDrwunngaQGS0vsG7vJ4aYUAtSDnUnCI2J/zjH20EwG6lEGskFEYaEshfuoMZg="}}
2018-03-27T18:03:32Z:LOG_INFO:5fc377042201c4fcdce66e86b8531eaa:network.php:412:http_status: followers/mario:403 Forbidden
2018-03-27T18:03:32Z:LOG_INFO:3bdc975e434b5dec9ee980a1fa1fe7f9:network.php:412:http_status: following/mario:403 Forbidden
2018-03-27T18:03:32Z:LOG_INFO::pubcrawl.php:999:pubcrawl_queue_deliver: deliver: queue post success to https://peertube2.cpy.re/accounts/root/inbox

It looks like you are tying to fetch /following/mario and /followers/mario but we will not let you. I still need to investigate why...

@Chocobozzz

This comment has been minimized.

Owner

Chocobozzz commented May 11, 2018

@git-marijus I fixed the issue concerning Hubzilla comments: 5cf1350

@git-marijus

This comment has been minimized.

git-marijus commented May 11, 2018

Thanks @Chocobozzz is there an instance i can try that?

@Chocobozzz

This comment has been minimized.

Owner

Chocobozzz commented May 11, 2018

Sure, root@peertube2.cpy.re should work.

@git-marijus

This comment has been minimized.

git-marijus commented May 11, 2018

Thanks, i connected to that channel. Is there an instance with frequently updated dev code for testing where i can register?

@git-marijus

This comment has been minimized.

git-marijus commented May 13, 2018

Most basic things work now. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment