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

Explicit null to omit subject (powerline) #11

Open
expede opened this issue Feb 27, 2024 · 5 comments
Open

Explicit null to omit subject (powerline) #11

expede opened this issue Feb 27, 2024 · 5 comments

Comments

@expede
Copy link
Member

expede commented Feb 27, 2024

I chatted with @matheus23 earlier today about the updated powerline syntax & changes from past iterations. [Philipp, feel free to correct me if I'm wrong on any of the below but wanted to capture here.]

TL;DR he's in favour, but raised that it's too easy to omit the sub field accidentally. Two suggestions:

  1. Require that you use an explicit sub: null if omitted
  2. Use a glob sub: "did:*

The glob has the disadvantage that it looks like you can restrict DIDs by scheme (did:dns:*), when I'm pretty sure that's not the behaviour that we want.

I am in favour of making the Null explicit. In most libraries you're already going to have to give have some variation on audience: Option<DID>, so let's just render None to null as a default.

Any objections?

@expede expede changed the title Powerline optional subject synatx Explicit null to omit subject (powerline) Feb 27, 2024
@Gozala
Copy link

Gozala commented Feb 29, 2024

It seems consistent with exp so sounds good to me.

@Gozala Gozala mentioned this issue Jul 9, 2024
20 tasks
@Gozala
Copy link

Gozala commented Jul 9, 2024

I think we have discussed this in the past, but can't recall conclusions we came to so I apologize to bring this up again, but maybe we can capture decisions this time around.

One alternative we could consider is to constraint subject via delegation policy. I think side effect would be that by default all delegations would be more like power lines which may not be the right default, but on the flip side it would make it a lot easier to express cases where more then one subjects is involved.

Similarly we could use policy to restrict delegation channel e.g. using synthetic selector that gives you iterator of iss in the chain so you could say ["some", "[email protected][]", ["==", '.iss', "did:key:zAlice"]].

@expede
Copy link
Member Author

expede commented Jul 9, 2024

but can't recall conclusions we came [...] using synthetic selector that gives you iterator of iss

My understanding was that we were punting on delegations restricting things beyond the args field, due to the many implications that it would incur (such as the "do not redelegate" bit, etc)

@expede
Copy link
Member Author

expede commented Jul 9, 2024

@Gozala at least looking at my implementation from around that time, I think that we had landed on "Require that you use an explicit sub: null if omitted"

more then one subjects is involved

Can you give me a concrete example?

@Gozala
Copy link

Gozala commented Jul 9, 2024

I’m ok with punning and using null to redelegate all resources explicitly

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

2 participants