Skip to content

Define list of useful SCS-standardized roles in OpenStack #396

Closed
SovereignCloudStack/docs
#240

Description

@garloff

As a IaaS user of SCS-compatible clouds, I want a number of standard roles to be available on every SCS-compatible IaaS environment which serve my typical needs and which are the same (especially from a security & privacy analysis point of view) on all these clouds.

These could be an "admin" role (not available to users, just operators), "domain-manager", "project-member", "read-only", "auditor". These would be global (all services) inside a project (or domain for domain-manager). Maybe read-only vs autitor distrinction is not useful ... Ensure that this is a hierarchy that can easily be understood and analysed from a security point of view.
Work has been done upstream (RBAC work in Yoga) on this.

Tasks:

  • Research what exists
  • Discuss what is needed (keep it simple, stay close to upstream if possible)
  • Implement it

Definition of Ready:

  • User Story is small enough to be finished within one sprint
  • User Story is clear and understood by the whole team
  • Acceptance criteria are defined
  • Acceptance criteria are clear and understood by the whole team

Definition of Done:

  • All acceptance criteria are met
  • Changes have been reviewed
  • CI tests have run successfully
  • Documentation has been updated
  • Release Notes have been updated

Activity

  1. added
    IAM
    on Aug 23, 2023
  2. reqa commented on Oct 18, 2023

    @reqa

    As Markus said, there's also the upstream manager role (ETA 2024), but that is on project scope and would co-exist in the future in addition to the domain-manager.

    As an upshot for me, I think we need to have the dimension of scope for this role matrix.

  3. markus-hentsch commented on Oct 25, 2023

    @markus-hentsch

    Upstream work

    I gathered the following upstream resources in regards to role definitions.

    Keystone

    Roles: admin, reader, member, service

    https://docs.openstack.org/keystone/latest/admin/service-api-protection.html

    Barbican

    Roles: admin, creator, observer, audit

    https://docs.openstack.org/barbican/train/admin/access_control.html

    Other

    "Consistent and Secure RBAC" track

    https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html

    • ongoing upstream rework of policy standards
    • apply the roles mentioned under Keystone above to all services (what about Barbican though?)
    • aims to introduce a manager role for projects in the final phase

    Policy concepts in Nova

    State in Nova: https://docs.openstack.org/nova/latest/configuration/policy-concepts.html


    Side note: policy config 101

    https://docs.openstack.org/cinder/ussuri/configuration/block-storage/policy-config-HOWTO.html

    • upstream explains how policies are adjusted
  4. added
    SCS-VP10
    on Oct 26, 2023
  5. moved this from Backlog to Doing in Sovereign Cloud Stackon Oct 26, 2023
  6. markus-hentsch commented on Oct 26, 2023

    @markus-hentsch

    Barbican

    Roles: admin, creator, observer, audit

    https://docs.openstack.org/barbican/train/admin/access_control.html

    Important update from the Keystone PTG session from 2023-10-25: These Barbican-specific roles are superseded by the "Consistent and Secure RBAC" track and its roles according to the Keystone team.

    This makes work on this standard substantially easier, because upstream will also deploy a consistent set of roles across all services which we can build upon.

  7. markus-hentsch commented on Dec 12, 2023

    @markus-hentsch

    I'm unfortunately unable to finish the Role Standard in its current state.
    The reason being that the behavior between the OpenStack services regarding the new RBAC defaults1 can differ greatly.
    I'm unable to formulate a consistent policy configuration that works across all of the components for the intended goal.

    Since there is no defined list of supported and allowed OpenStack services in SCS yet, the standard cannot rely on delivering and maintaining full policy configuration templates - there are just too many services. Also, writing SCS-specific and gapless policy templates for each and every possible OpenStack service would put an unfeasible development, testing and maintenance burden on SCS.

    Instead I opted to describe general guidelines in the standard draft on how to work with the OpenStack defaults in order to provide a consistent role model across SCS infrastructures, i.e. not modifying the default permission sets of OpenStack and properly preserving them when making adjustments as the CSP.
    The standard originally intended to incorporate the stable parts of the RBAC rework1, leaving the rest for future inclusion.
    Isolating the "stable parts" seems to be difficult due to inconsistent behavior across OpenStack services.

    The standard intended to provide a way to generate default policy files using OpenStack tools, define them as the gold standard and then describe on how to make individual adjustments if necessary.
    However, due to the ongoing RBAC rework1 two oslo.policy configuration options greatly influence how and which policies are used: enforce_new_defaults and enforce_scope.
    Furthermore, generated default policy templates using OpenStack tools (oslopolicy-policy-generator) do not reflect the actual default policies (if no policy.yaml file is present) at times depending on the oslo.policy options.
    This makes it incredibly hard to establish a process and guidelines for consistent defaults a CSP can safely refer to in any case.

    Below are just a few small examples of the various effects these settings can have and how they conflict across services.
    Finding a configuration and strict guidelines for the Role Standard that ensure consistent behavior and compatibility across the whole SCS would involve a lot more research and testing.

    General:

    • oslo.policy's enforce_new_defaults=True is supposed to properly activate the new reader, member and admin role model of the ongoing RBAC rework2
      • this can be considered more or less stable in its implementation
    • oslo.policy's enforce_scope=True is supposed to properly scope roles (e.g. to domains, projects etc.) including admin (in the future)
      • this seems more experimental and more of a breaking change

    Barbican:

    • when the default policy file as generated by "oslopolicy-policy-generator --namespace barbican" is used in Barbican, its behavior changes: it seems that the configuration without a policy.yaml file present diverges from using the policy file generated by oslopolicy-policy-generator
      • i.e. the policy file (allegedly generated based on defaults) does not offer the same behavior as deploying Barbican without a policy file in place
      • the SCS Role Standard intended to make the generated policy files the gold standard CSPs can rely on but it does not match with the normal Barbican behavior?
    • using enforce_new_defaults=False in Barbican, will not provide the new member and reader roles but instead fall back to its old audit, observer, creator
      • in order to offer a consistent set of roles across services as intended by the standard, we'd need to set this to True in Barbican

    Keystone:

    • on a DevStack, using enforce_new_defaults=True in Keystone renders the default openrc file and admin login unusable for some operations
      • adjustments can fix this but it is a breaking change to users relying on the current behavior of API and client
    • on a DevStack, using enforce_scope=True in Keystone renders the Domain Manager configuration of SCS unusable
      • the approach how the Domain Manager configuration works seems to be mutually exclusive to the new scope enforcement; this will most likely only be fixed when upstreaming the Domain Manager role as a whole3

    Footnotes

    1. https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html ↩ ↩2 ↩3

    2. https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#how-operators-opt-into-the-new-functionality ↩

    3. https://bugs.launchpad.net/keystone/+bug/2045974 ↩

  8. removed their assignment
    on Dec 12, 2023
  9. added
    SCS is standardized
    on Dec 19, 2023
  10. josephineSei commented on Feb 5, 2024

    @josephineSei

    I am currently reading into the secure RBAC work on upstream. So far I am concerned about the scopes especially:

    Even though system scope is currently postponed (or even cancelled?) the project scope may change the behavior of the cloud. And the system scope will either break a lot of operator workflows or will need an incredible large amount of time to be implemented.

    The standard should definitely describe this. But we may also need an upgrade path for CSPs and users, if we change the standard in this point.

  11. josephineSei commented on Feb 6, 2024

    @josephineSei

    Standardizing the roles in OpenStack is an important topic. Reading through all the current progress upstream, the problems @markus-hentsch mentioned, are still and will be most likely still in place for 2024.1. The tracking of progress shows, that Cinder does not yet fully obey the new personas (project-member and project-reader)1.

    Having not yet a wide spread consensus over the openstack-projects about those personas contradicts using the new policies right now.

    But as Markus also mentioned, There are side-effects, when enabling the new policies (e.g. it breaks the domain manager role as described in the same-named standard). As the old policies do not seem to be deprecated right now.2 We should be safe to use them for another year.

    There are two more things to consider:

    1. The newly introduced service role is used by the services themself to communicate with other services. imho we should enable them as soon as a group of openstack services the scs deems complete have implemented them and are able to deal with this new role.
    2. While setting a standard for roles is important, another thing that is necessary is the Assignment of Roles. E.g. we should permit that the admin role can be assigned to anyone outside of a group of operators from the CSP. The service role as well should not be assigned to human beings.

    I would like to add those two parts to the standard.

    Footnotes

    1. https://etherpad.opendev.org/p/rbac-goal-tracking ↩

    2. https://docs.openstack.org/releasenotes/nova/2023.1.html ↩

  12. josephineSei commented on Feb 22, 2024

    @josephineSei

    We discussed the "network rbac create" option, that lets non-admin users share security groups and networks with other projects as a default policy. Now I am thinking about adding an phrase to this standard to integrate some SCS-defined policy-optiones. It should lead to a website or document or something like this, were we should be gathering all potential security enhancements in policy, we would like to see in an scs-deployment.

    So all this standard would need to to is to point at this document and state, that those changes should be integrated.

    @bitkeks would that be possible way to go? If yes, the question remains, where the adjusted policy-options will be available.

  13. 15 remaining items

  14. markus-hentsch commented on May 17, 2024

    @markus-hentsch

    While implementing conformance tests I found a way to make sure that a test is executed with only the member role using limited role inheritance via application credentials. While implementing the corresponding Key Manager API tests I found and reported a bug in OpenStack SDK: https://bugs.launchpad.net/openstacksdk/+bug/2066045

  15. markus-hentsch commented on May 28, 2024

    @markus-hentsch

    Important statement/update1 from upstream (Nova):

    closed this for nova as we dont plan to allow scoping admin ever.

    the way to "fix this" currently based on the secure and consistent rbac community goal is i belive the manager role.

    For Nova that means a project-scoped admin token should be able to list and delete any server in any project.

    Footnotes

    1. https://bugs.launchpad.net/keystone/+bug/968696/comments/154 ↩

  16. markus-hentsch commented on Jun 28, 2024

    @markus-hentsch

    Current adoption of enforce_scope and enforce_new_defaults

    Thankfully, Josephine noticed that my assumption about none of the OpenStack services adopting the new RBAC defaults was incorrect because although oslo.policy still defaults them to disabled, some services override these defaults and already enable them.

    I looked at the current source code repositories (2024.2) of all services that are currently considered either mandatory or supported as per #587 and classified their adoption of the new oslo.policy options (enforce_scope/enforce_new_defaults):

    Service Uses new options? Comment
    Nova Fully Link
    Neutron Fully Link
    Glance Fully Link
    Barbican Fully Link
    Ironic Fully Link
    Manila Fully Link
    Heat Yes* Link, *Options were known to break Heat, current state unknown
    Cinder No, but supported Link
    Keystone No, but supported Link
    Placement No, but supported Link
    Octavia No, but supported Link
    Designate No, but supported Link
    Swift No No mentions in code
    CloudKitty No No mentions in code
    Masakari No No mentions in code
    Gnocchi No No mentions in code, not part of opendev anymore, adoption late or unlikely
    Ceilometer Not Applicable Has no API

    Note that oslo.policy still defaults to disabling those options currently. This means that any service that does not explicitly force-enable those will not use them per default.

    I already corrected my erronous statements in the standard PR but I will need to revisit the whole standard in regards to deciding for or against the new options and resulting role models.

  17. markus-hentsch commented on Jul 1, 2024

    @markus-hentsch

    Current state of Secure RBAC regarding Heat and roadmap

    Adding to the above I checked the actual state of Heat compatibility and roadmap plans in regards to Secure RBAC (enforce_scope/enforce_new_defaults).

    Backstory

    The "Consistent and Secure Default RBAC" TC upstream page1 says:

    It breaks OpenStack existing NFV use case and orchestration tooling:

    When the deployment project started consuming the nova new policy defaults with scope enabled, we got to know that the scope enable will break heat (orchestration tooling), Tacker (NFV deployment) users or any operators script interacting all the OpenStack interfaces with administrators user.

    Heat ‘create stack’ API uses the user credentials (admin) to create project and system-level resources in backend services. For example, it creates project users in keystone (system level resource), flavors in nova (system level resource), servers in nova (project level resource), and networks in neutron (project level resource). If we enable the scope checking in services, then the user calling heat ‘create stack’ APIs which are scoped to either project (existing way) or system (if we change that) will not be able to call the system and project scoped APIs on the service side.

    This mailing list message from 2022 summarized the problem pretty well and described the possible solutions.

    A Zed release Etherpad discussed a few solutions back in April 2022:

    • Proposed solution
      • Heat accetps stack API with system scope
        • This means a stack with system resources would require system admin role => Need to check with services relying on Heat
      • Heat assigns a project-scope role to the requester during processing stack operation, and use this project scope credential to maange project resources
      • (from TC discussion): Heat start accepting the new header accpeting the extra token (say SYSTEM_TOKEN) and use that to create/intract the system level resource like create flavor.

    From the above information, it is still unclear what the current state of Heat is regarding this problem now in 2024.

    Current State (as of 2024.2 in development)

    DevStack
    • DevStack offers a ENFORCE_SCOPE=True (non-default) option for local.conf
      • this will set enforce_scope/enforce_new_defaults in all applicable services (in my case: Nova, Placement, Glance, Cinder, Neutron, Barbican, Keystone, Heat)
      • when set, admin and user interaction seems to work without issue
    Heat
    • a fix was merged in March 20242 adding scope compatibility for admin users creating project-scoped resources

    The following template in Heat works as admin even with enforce_scope/enforce_new_defaults:

    heat_template_version: 2015-10-15
    
    resources:
      # Keystone user, a system-level resource
      heat_created_user:
        type: OS::Keystone::User
        properties:
          description: "A user created by Heat"
          domain: "Default"
          enabled: true
          name: "heat_created_user"
          password: "notsosecret"
      # Keystone project, a system-level resource
      heat_created_project:
        type: OS::Keystone::Project
        properties:
          name: "heat_created_project"
      # Cinder volume, a project-level resource
      heat_created_volume:
        type: OS::Cinder::Volume
        properties:
          image: "cirros-0.6.2-x86_64-disk"
          name: "heat_created_volume"
          size: 1

    (tested on a DevStack based on current master checkouts from 2024-07-01)

    Global Adoption
    • for 2024.2 it is planned3 that the default for enforce_scope/enforce_new_defaults in oslo.policy will change to True
    • for 2025.2 it is planned4 that the enforce_scope option will be retired, making it impossible to keep the new scoping behavior disabled
    Conclusion

    It initially seemed like roadblocks led to the upstream Secure RBAC implementation being on hold for the time being.
    Despite the upstream status page on the Secure RBAC implementation1 still mentioning the unresolved problems and the postponing of of the new RBAC scoping implementation and defaults, the main issues seem largely solved and the 2024/2025 release roadmaps34 clearly indicate that implementation and adoption is moving forward again.

    Judging from merged fixes2 and some basic testing, the core Heat issues seem to be solved by now.
    This should automatically fix Tacker: "Enabling scope checking also breaks Tacker (NFV Orchestration service) deployment as they use heat ‘create stack’ to build OpenStack infrastructure."1.
    With this, no critical technical regressions seem to remain.

    Regarding SCS-specific implementations:

    Only the Domain Manager approach as currently implemented downstream via policies as per SCS Domain Manager Standard will be affected and not work with the new Secure RBAC.
    When the 2025.2 release lands and removes the enforce_scope toggle, the policy-based implementation will cease to function. Hopefully, upstreaming the Domain Manager functionality will be concluded by then, which will supersede the downstream policy-based implementation.

    Footnotes

    1. https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#the-issues-we-are-facing-with-scope-concept ↩ ↩2 ↩3

    2. https://review.opendev.org/c/openstack/heat/+/907919 ↩ ↩2

    3. https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#id4 ↩ ↩2

    4. https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#id5 ↩ ↩2

  18. josephineSei commented on Jul 1, 2024

    @josephineSei

    Thank you for writing all of this down. To me this makes me wondering, whether we want to have a role standard right now. It seems to me that a lot of changes are still coming up soon. Additionally with Swift, Cloudkitty and Masakari not even supporting it right now, i have another question: how do scoped tokens behave when being used with non-scoped APIs? Do they just check the role? (Would make sense)

    But in the end, when the enforcing of the new version is coming in the next release as well as we are trying to bring the domain manager in for the next release - maybe we should wait for that to happen before we decide here. We may discuss this in the IaaS meeting, but I think focusing on the upstream domain-scoped manager may be a better way to go first.

  19. markus-hentsch commented on Jul 26, 2024

    @markus-hentsch

    Some updates:

    Global Adoption
    • for 2024.2 it is planned that the default for enforce_scope/enforce_new_defaults in oslo.policy will change to True
    • for 2025.2 it is planned that the enforce_scope option will be retired, making it impossible to keep the new scoping behavior disabled

    The new defaults have now been merged and will be part of 2024.2: openstack/oslo.policy@206ae19

    Only the Domain Manager approach as currently implemented downstream via policies as per SCS Domain Manager Standard will be affected and not work with the new Secure RBAC.

    Good news: it seems that this statement is not true anymore. The way that Keystone has progressed in adopting full compatibility to the scope enforcement makes the SCS implementation stay unaffected. On the latest master (upcoming 2024.2), I am able to successfully apply the SCS Domain Manager Standard and pass all tests even with the following options set in Keystone:

    [oslo_policy]
    enforce_new_defaults = true
    enforce_scope = true

    As it seems there are no roadblocks left with 2024.2 that prevent us from adopting the new options and role model.
    I will rewrite the standard accordingly targeting 2024.2.

  20. linked a pull request that will close this issueDocument IaaS roles #240on Aug 31, 2024
  21. markus-hentsch commented on Sep 9, 2024

    @markus-hentsch

    I'm currently in the process of wrapping up the rework of the standard.

    Due to the progress on the upstream side, the standard will be able to pretty much use the new SRBAC model completely, even for R7. Only two things are still noteworthy:

    • for R7 we will be based on OpenStack 2024.1 which does not include the domain manager yet, as such we will most likely ship the SCS downstream implementation of it according to the domain manager standard and switch to the native implementation for R8+
      • this has no direct implication on the role standard here as both approaches already use the same new role model
    • Octavia's LBaaS API does use custom RBAC roles per default; alternative policy files that limit this to the SRBAC model (reader, member, admin) are provided but not default - we need to take action here

    The role standard will mandate adhering to the new SRBAC default role model as provided by OpenStack with the new SRBAC options (enforce_scope/enforce_new_defaults). In 2024.1 those are still optional but default starting with 2024.2. With R7 we will want to make them the default already, even if based on 2024.1 still. Aside from this, only Octavia needs intervention where the standard will mandate to use the SRBAC-aligned policy template.

    I'm currently integrating Octavia into my DevStack to verify the SRBAC policy configuration. I already adjusted the standard's text and greenlight it once I can confirm it is working.

  22. markus-hentsch commented on Sep 19, 2024

    @markus-hentsch

    As it seems there are no roadblocks left with 2024.2 that prevent us from adopting the new options and role model.
    I will rewrite the standard accordingly targeting 2024.2.

    In one of the recent SCS calls it was noted by a member of the community that there have been some upstream reports recently about remaining issues with the new defaults in the currently in-development 2024.2 release.
    It seems that now that the oslo.policy defaults for enforce_new_defaults and enforce_scope have been merged, more extensive testing seems to have uncovered some more problems.

    So I looked into it again.

    The RBAC goal tracking page currently (2024-09-19) states:

    • oslo.policy 4.4.0 (OpenStack Dalmation 2024.2 release) has enabled the scope and new defaults by default (enforce_scope=True & enforce_new_defaults=True by default):
      • Below services are not yet ready with new RBAC so they disabled the scope and new defaults:
        • Barbican
        • Tacker
        • Aodh
        • Cinder
        • Horizon (also continue running on old RBAC as default)

    Notable here are Barbican, Cinder and Horizon as they are relevant for SCS releases.

    For Barbican it was disabled in this commit. It says "there are many test modification is needed for the new
    RBAC (using the new RBAC default role in tests)". It is not stated whether there are functional problems or only tests to be adjusted.

    For Cinder it was disabled in this commit. It only says "Until Cinder is ready with the new RBAC" and does not go into detail what that entails.

    For Horizon, it was disabled in this commit. It says "There are more changes (test fixes also) needed to make
    Horizon work with new RBAC.".

  23. anjastrunk commented on Oct 14, 2024

    @anjastrunk

    How is the progress here?

  24. josephineSei commented on Nov 25, 2024

    @josephineSei

    This standard is aiming to make the new secure RBAC with scopes mandatory. But we cannot make this mandatory until upstream openstack finishes its work on this topic over all projects (Nova, Cinder, Glance, etc....). Right now it seems that Cinder as well as other service do not yet fully implement the new secure RBAC roles and scopes.

    When the work is finished upstream, we can resume the work on this standard.

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

    IAMSCS is standardizedSCS-VP10

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions