Skip to content

Can't create DomainAdmin Account to Domain #10096

Closed

Description

@hiblinux
ISSUE TYPE
  • Questions
COMPONENT NAME
Create Account And Users
CLOUDSTACK VERSION
CloudStack 4.19.1.1 
SUMMARY

I have a Role named Domain Admin L2 with the Role Type of Admin and linked to the "admin l2" account in the ROOT domain (Csv rules attached).

The problem I encounter is that when I want to create a new account in the Sub-domain, let's call it ROOT/CS/Customer1, using the available default role named Domain Admin with Role Type DomainAdmin, an error appears stating 'can not create an account with access to more privileges they have themself.'

From the CSV i see the Domain Admin L2 role has more privileges than Domain Admin role.

What is wrong with what I'm doing?

image

Domain Admin_DomainAdmin.csv
Domain Admin L2_Admin.csv

Activity

  1. boring-cyborg commented on Dec 12, 2024

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template!

  2. DaanHoogland commented on Dec 12, 2024

    @DaanHoogland
    Contributor

    @hiblinux at first sight it doesn't look like you are doing anything wrong. Can you create the new account from a user in the root admin account?

  3. hiblinux commented on Dec 12, 2024

    @hiblinux
    Author

    @DaanHoogland Yes i can create new account from the Root Admin.

    But the situation need me to seperate the privileges of account, thats the reason i create new Role name "Domain Admin L2".

  4. added this to the 4.19.2 milestone on Dec 12, 2024
  5. DaanHoogland commented on Dec 12, 2024

    @DaanHoogland
    Contributor

    Understood, there is a related PR out (that needs a volunteer to test it) #9173 . Maybe it solves your issue...

  6. BryanMLima commented on Dec 12, 2024

    @BryanMLima
    Contributor

    Hello, @hiblinux

    First, I just want to clarify how ACS checks if a given role has permission to create another account. It will check if the caller account has permission (i.e., allow) to all APIs in the role used by the target account.

    Using a diff checker tool, I managed to encounter some inconsistencies, that would fail this verification. The following APIs are denied for the role Domain Admin L2 and are allowed for the role DomainAdmin:

    • createDiskOffering
    • createServiceOffering
    • deleteDiskOffering
    • deleteServiceOffering
    • updateDiskOffering
    • updateServiceOffering
    • updateConfiguration

    Even though the type of the role Domain Admin L2 is Admin and the role Domain Admin is of type DomainAdmin, ACS will fail in the validation of the APIs above; that's why you are receiving the message can not create an account with access to more privileges they have themself.

    Now, about the why ACS does not allow this: escalation of privileges. If a user could create an account with more privileges than its own, then this is a security concern. Consider a scenario where a custom Root Admin was created with just read permissions. If ACS allowed this role to create another account with more permissions just because it is of type Admin, an attacker could you this to create a Root Admin with all permissions, which is not desired.

    To tackle your problem specifically, you'll need to normalize the permissions of the APIs mentioned above (and others, if I missed something) for the custom role Domain Admin L2.

    @DaanHoogland, I don't think this is a bug, it is working as expected.

  7. DaanHoogland commented on Dec 12, 2024

    @DaanHoogland
    Contributor

    Good find @BryanMLima , @hiblinux please see the explanation above. It makes sense.

  8. removed this from the 4.19.2 milestone on Dec 12, 2024
  9. locked and limited conversation to collaborators on Dec 12, 2024
  10. converted this issue into a discussion #10099 on Dec 12, 2024
  11. added this to the unplanned milestone on Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions