Skip to content

Conversation

@ellemouton
Copy link
Member

With this PR, you can now use the wild card character when specifying custom URIs that permissions should be added for in an LNC session. This allows you to do the following:

litcli s a --label=custom_perm_session  --type=custom --uri=/lnrpc.Lightning/ListChannels --uri="/poolrpc.Trader/*"

The above will create a session that has the perms to only access the ListChannels call of the lnrpc.Lightning but then also has the perms to access any URI that falls under the poolrpc.Trader service.
`
Fixes #439

Copy link
Contributor

@itsrachelfish itsrachelfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, just found one typo.

Going to use this branch while testing my permission changes 👍

@lightninglabs-deploy
Copy link

@ellemouton, remember to re-request review from reviewers when ready

Copy link
Contributor

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Pretty straightforward implementation, just an idea for making it even more generic.

@ellemouton ellemouton changed the title multi: support using wild-card URIs when specifying custom perms multi: support using a regex when specifying custom perms Nov 23, 2022
@ellemouton ellemouton requested a review from guggero November 28, 2022 06:01
@ellemouton
Copy link
Member Author

@itsrachelfish , this is ready for a final review :)

Copy link
Contributor

@itsrachelfish itsrachelfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK, regex support works, but the examples & tests could be updated to be more clear.

With this commit, a user can now specify a regex when specifying custom
permissions for an LNC session. This regex will be used to select
permissions for URIs that match the regex.
@ellemouton ellemouton merged commit ce2cf12 into lightninglabs:master Nov 29, 2022
@ellemouton ellemouton deleted the wildCardURIs branch November 29, 2022 10:44
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

Successfully merging this pull request may close these issues.

Wildcard permissions support

4 participants