question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

/-/all endpoint doesn't use access groups

See original GitHub issue

Describe the bug We’re using the simple htpasswd auth plugin currently. Tried using https://github.com/btshj-snail/snail-verdaccio-group/ but unfortunately couldn’t get it to work yet, so we ended up with just regular lists of users instead of groups.

However, it seems that the /-/all endpoint stopped working - expectation here would be that authenticated users get all packages they are authenticated for when using that endpoint, but instead no packages are returned for anyone now (even if that person has explicit access to all packages).

To Reproduce Set up explicit access instead of using $all or $authenticated:

'**':
    # scoped packages
    access: user-01 user-02
    publish: user-01
    unpublish: user-01
  • Log in in the web backend or through npm
  • Use the /-/all endpoint and see that it’s empty

The same happens with explicit package access. The web interface lists the correct results, just that (important) all endpoint isn’t working (which is important since we’re using this with Unity Package Manager which accesses that endpoint to determine which packages it allows to download).

Expected behavior user-01 and user-02 see all packages in /-/all endpoint

Actual behavior /-/all endpoint is empty

EDIT: it seems the search endpoint, on the other hand, always returns all packages, also ignoring any auth! This is so weird.

EDIT 2: to summarize:

  • current auth does not influence the outcome of search and /all
  • search always returns all packages
  • /all always returns 0 packages (unless for packages where $all is used)
  • web interface lists the correct packages the user has auth for

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hybridherbstcommented, Jul 11, 2020

Sorry, didn’t get to it yet, will try over the next week

1reaction
hybridherbstcommented, Jun 22, 2020

This reproduces easily with the default Verdaccio configuration (with htpasswd) when you remove “$all”, “$authenticated” and replace them by explicit user name lists

  • replace $all by a list of all registered user names => /all returns nothing
  • replace $all by $authenticated => /search still returns everything even when not authenticated
Read more comments on GitHub >

github_iconTop Results From Across the Web

Control access to services using endpoint policies
The endpoint policy controls which AWS principals (AWS accounts, IAM users, and IAM roles) can use the VPC endpoint to access the endpoint...
Read more >
Create and manage device groups - Microsoft Learn
A device group is accessible to all users if you don't assign any Azure AD groups to it. Create a device group. In...
Read more >
Use groups to customize service access - Google Support
Methods of giving users access to services; How to use access groups; Set up an access group; View services for users, groups, and...
Read more >
Managing Identities [Cisco Identity Services Engine]
Configuring Access for Users, Endpoints, Admins, Groups, Permissions, and Accounts ... Use this procedure to display all existing locally configured network ...
Read more >
Users API - Okta Developer
Based on the group memberships that are specified when the user is ... Hint: For all grant operations, you can use me instead...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found