Deny Read on Attribute but Users Still Can View

Charles Sullivan 21 Reputation points
2022-09-23T16:06:44.743+00:00

I need to hide the ipPhone attribute from all users (ideally a few privileged accounts would be able to see it). As it turns out ipPhone is a base-schema attribute so I can't use the Confidentiality Bit solution and we can't switch to a custom attribute; it needs to be ipPhone for a particular app.

So onto the OU which directly contains all of our user accounts I set the following:
Deny - Domain Users - Descendant Users - Read - ipPhone

244299-denyipphone.jpg

I am not understanding why a user can still view another user's IP Phone number.

As I was writing this I decided to do the same against a user-created group, but it has the same effect: A user from that group can still read the IP Phone attribute.

Windows for business Windows Client for IT Pros Directory services Active Directory
0 comments No comments
{count} votes

Accepted answer
  1. Gary Reynolds 9,621 Reputation points
    2022-09-27T21:31:06.63+00:00

    Changing the display order would explain the order in the screenshot.

    You are correct this doesn't change the order in which they are applied. The permissions in the ACL are ordered based on the following rule:

    Explicit Deny  
    Explicit Allow  
    Inherited Deny  
    Inherited Allow  
    

    The inherited permissions are also sorted based DN path, with the closest OU first, then the next OU and so on. The permissions at the top of the list take precedence over the lower permissions. You can think of it as the permissions are applied from the bottom up.

    The dsacls command is correct and will assign a deny permission to the user object. I would reconsider the use of the Domain User group, as this will block all users including Domain Admins from reading the attribute, unless you change the default PrimaryGroupID for users that you want to read the attribute.

    With your command the following permission will be applied, I've used the Deny-Enum group here:

    245254-image.png

    When you look at the permissions that are applied to the a user account in the OU, the user has these permissions:

    245208-image.png

    The deny permissions is shown as inherited as expected.

    To understand why the deny permissions is not being applied, first we need to look the ipphone attribute and how the user is getting the permissions to read this attribute in the first place.

    The ipPhone attribute is a member of a Property Set called Personal Information which includes a lot of attributes:

    245248-image.png

    Looking at the permissions of the user the Authenticated Users has been granted read rights to the Personal Information Property set. As this permissions is an explicit permission which will take precedence over the inherited deny permission from the OU.

    This Authenticated Users right is grant by the default security descriptor from the User Object in the schema.

    245283-image.png

    You could edit the default Security Descriptor but this could cause other issues down the track with other applications relying on this permissions.

    Other option is to remove the ipPhone attribute from the Personal Information Property Set, however, like changing the default security descriptor it could cause issues later.

    If you want to remove the ipPhone atttribute from the Personal Information Property Set, you just need to clear the AttributeSecurityGUID attribute from the Phone-Ip-Primary schema object.

    This does work however, there is a sneaky permission that will still provide access the attribute via the Pre-Windows 2000 Compatible Access permissions, removing this does cause a lot of the attribute to inaccessible, so may cause other problems as well.

    245274-image.png

    Probably best to get MS to provide their advice on how to deny access with the minimal downstream impacts. The simplest option might be to assign an explicit deny permission to the default security descriptor of the user object in the schema, but does mean this will only be applied to new user objects and you will have to apply this permission to all the existing user objects.

    Gary.

    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Gary Reynolds 9,621 Reputation points
    2022-09-23T17:53:52.3+00:00

    Hi @Charles Sullivan

    I think I can see in your screenshot that there is an allow permission above your deny, are you able to share the complete list of permissions that have been assigned above the deny, as these are likely to be the reason why the users still have access.

    Gary


  2. Charles Sullivan 21 Reputation points
    2022-09-26T20:44:23.837+00:00

    Sorry, looks like you replied 3 days ago but I got no notification until a short while ago for your latest reply.

    There is only one entry for Domain Users, which is the one that is visible. The partially viewable one is for Domain Admins. In any case I would expect Deny to always override Allow within an ACL. If I check a user object in the respective OU, the user object does in fact show the Deny for the ipPhone attribute;

    Keeping that in mind: I discovered today that if I apply the Deny directly to a user object, as opposed to relying on the inheritance, it successfully hides the ipPhone attribute. Unfortunately, that is not a solution.

    I have a case open with MS, but after spending well over an hour working with the tech, we seem to be no closer to a solution. He collected some logs so maybe he'll come back with something helpful.

    0 comments No comments

  3. Gary Reynolds 9,621 Reputation points
    2022-09-27T12:25:42.787+00:00

    Hi

    Based on the screenshot the deny permission is after the allow, as you mentioned, this should only be the case if the deny is inherited, but based on the screenshot this is not case. I would make the assumption that the util that set the permission hasn't honoured the normal permissions rules and set the deny at the end of the ACL, instead of at the top.

    Gary.

    0 comments No comments

  4. Charles Sullivan 21 Reputation points
    2022-09-27T14:50:05.027+00:00

    You mention the order of ACEs, as when you say "at the top". I changed the view order to be alphabetical, but that doesn't change how they are applied. Still, can you clarify what you are saying about the order of the ACEs?

    Here is the dsacls syntax that I used:
    dsacls.exe "<DN_of_OU_containing_users>" /I:S /D "<domain_name>\Domain Users:RP;ipPhone;user"

    It doesn't seem as though any other syntax would be appropriate for what I am trying to do.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.