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

DAV ACL "authenticated" principal bug? #4813

Open
alecpl opened this issue Feb 20, 2024 · 1 comment
Open

DAV ACL "authenticated" principal bug? #4813

alecpl opened this issue Feb 20, 2024 · 1 comment

Comments

@alecpl
Copy link
Contributor

alecpl commented Feb 20, 2024

I'm setting ACL on a folder like this

ACL: https://host/dav/addressbooks/user/user@host/Default/

<?xml version="1.0" encoding="utf-8"?>
<d:acl xmlns:d="DAV:">
  <d:ace>
    /* cut all privileges for self */
  </d:ace>
  <d:ace>
    <d:principal>
      <d:authenticated/>
    </d:principal>
    <d:grant>
      <d:privilege>
        <d:read/>
      </d:privilege>
    </d:grant>
  </d:ace>
</d:acl>

it succeeds, but after this I got:

        <d:acl>
          <d:ace>
            /* cut all privileges for self */
          </d:ace>
          <d:ace>
            <d:principal>
              <d:all/>
            </d:principal>
            <d:grant>
              <d:privilege>
                <d:read/>
              </d:privilege>
            </d:grant>
          </d:ace>
          <d:ace>
            <d:principal>
              <d:unauthenticated/>
            </d:principal>
            <d:deny>
              <d:privilege>
                <d:read/>
              </d:privilege>
            </d:deny>
          </d:ace>
        </d:acl>

So it looks that a request to set "authenticated" user privileges results in two ace elements for "all" and "unauthenticated" that looks like an equivalent to that single "authenticated" rule. But it makes writing a client to manage ACL more complicated. Can this be improved?

@alecpl
Copy link
Contributor Author

alecpl commented Feb 22, 2024

Looks like, according to ctl_mboxlist -d, internal ACL representation is:

"acl": {
    "user@host": "lrwipkxtecdan",
    "anyone": "lr",
    "-anonymous": "lr"
}

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

1 participant