npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

web-access-control-tests

v6.0.0

Published

A test suite with some tests for CRUD operations on containers and documents on a Solid pod.

Downloads

33

Readme

WAC Tests

Surface tests for CRUD and Websockets-pubsub functionality of a pod server

Usage

In development

Start your server with a self-signed cert on port 443 of localhost (for node-solid-server, make sure to set ACL_CACHE_TIME=5) and run sh ./example.sh.

Against CSS

In one terminal window:

  • check out the https://github.com/solid/community-server repo locally, and run npm ci; npm run build
  • find the function isRSAPublicJWK(x) in node_modules/@solid/dist/identity-token-verifier/dist/guards/DPoPJWKGuard.js and add x.alg = 'RS256' at the top of that function, to work around a bug in NSS v5.6.4, caused by https://github.com/solid/oidc-op/issues/29.
  • ./bin/server.js -l debug

In another terminal window:

  • check out this repo from https://github.com/solid/web-access-control-tests and run npm ci
  • check out the run-against-css branch
  • simple test (sets a root ACL doc from node and reads it back):
  • run node ./setup.js http://localhost:3000/.acl to create a root ACL at http://localhost:3000/.acl which gives https://solidtestsuite.solidcommunity.net/profile/card#me full read/write/control access.
  • run node ./fetch.js http://localhost:3000/.acl to check that Alice ('solidtestsuite') can access it.
  • run node ./fetch-bob.js http://localhost:3000/.acl to check that Bob ('solid-crud-tests-example-2') can not access it.
  • advanced test (uses the same root ACL doc, but from bash): bash ./run-against-css.sh

You can also cut-and-paste the lines from run-against-css.sh into your bash shell, then you can more easily run tests interactively.

Against CSS with local NSS instance as the IDP

If you want to use your NSS on localhost instead of on solidcommunity.net, then:

  • Run NSS on localhost, in multi-user mode so you can support both Alice and Bob
  • You may need to set up alice.localhost in your /etc/hosts, but on Mac that is automatic.
  • Browse to https://localhost:8443/ with Firefox and say you accept the self-signed cert (with Chrome the use of self-signed certs has become harder and harder recently)
  • Set up a user, alice / 123, and edit ./fetch.js so that oidcIssuer = 'https://localhost:8443';, nssUsername = 'alice', and nssPassword = '123';.
  • Run CSS with NODE_TLS_REJECT_UNAUTHORIZED=0 ./bin/server.js -l debug.
  • Run the fetch script with NODE_TLS_REJECT_UNAUTHORIZED=0 as well, for instance:
NODE_TLS_REJECT_UNAUTHORIZED=0 node fetch.js http://localhost:3000/404.txt