Skip to content
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

A test service #21

Open
evanp opened this issue Apr 7, 2024 · 5 comments
Open

A test service #21

evanp opened this issue Apr 7, 2024 · 5 comments

Comments

@evanp
Copy link
Collaborator

evanp commented Apr 7, 2024

Could we build an online test service to test forward and backward discovery from the publisher and consumer side?

For consumers, we could have a server that provides a few dozen WF accounts that push the boundaries of this spec. Like: different origin for WF and AP ID, multiple self links, and so on.

For publishers, we could have an API and/or web page where you can submit a Webfinger address and get back the AP id, or vice versa. Its output could include errors for noncompliant behaviors or warnings for bad practices.

I think it's tough to test AP in its entirety, but I think this constrained profile provides an opportunity to make some progress and help developers with one of their first tasks with AP.

@tesaguri
Copy link

tesaguri commented Apr 8, 2024

For consumers, I think it can be a static site (which implementers can easily host locally to their environment as well). Actually, I have written an nginx config for a static Activity Streams (well, not ActivityPub) and WebFinger server for a certain testing purpose before, like the following:

location /objects/ {
    types {
        'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' jsonld;
    }
}

location = /.well-known/webfinger {
    try_files $uri /.well-known/webfinger/$arg_resource.jrd;
}

location /.well-known/webfinger/ {
    default_type application/jrd+json;
}

which can be included in a server block as a snippet. It should work by placing JRD documents at /.well-known/webfinger/acct:[email protected] and their corresponding actor documents at wherever under the /objects/ directory (with the .jsonld file extension). It should also be able to handle multiple hosts by adding multiple server blocks with appropriate server_name directives. I used Docker Compose to assign externally-accessible hostnames to the virtual tenants when I was playing with it, which I think would be a good fit for use cases like continuous integration.

For publishers, it can probably be a client program that implementers can locally run against their test servers.

@nightpool
Copy link

nightpool commented Apr 8, 2024 via email

@silverpill
Copy link

For publishers, we could have an API and/or web page where you can submit a Webfinger address and get back the AP id, or vice versa. Its output could include errors for noncompliant behaviors or warnings for bad practices.

@evanp https://verify.funfedi.dev can already test webfinger endpoints. I think it could also be a good foundation for consumer tests.

@evanp
Copy link
Collaborator Author

evanp commented May 2, 2024

@evanp https://verify.funfedi.dev can already test webfinger endpoints. I think it could also be a good foundation for consumer tests.

Great!

@trwnh
Copy link
Collaborator

trwnh commented May 3, 2024

Should this be mentioned in the report? This is the only outstanding issue, and I'm not sure what the actionable item is here in terms of the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants