It is likely an understatement to say that policy enforcement is a complex subject. It requires operational context to craft custom policy to meet general use needs. Part of this is why the Secure RBAC effort was started, to provide consistency and a “good” starting place for most users who need a higher level of granularity.
That being said, it would likely help anyone working to implement customization of these policies to consult some reference material in hopes of understanding the context.
Historical Context - How we reached our access model¶
Ironic has reached the access model through an evolution the API and the data stored. Along with the data stored, the enforcement of policy based upon data stored in these fields.
System scoped authentication is intended for “administrative” activites such
as those crossing tenants/projects, as all tenants/projects should be visible
system scoped users in Ironic.
System scoped requests do not have an associated
project_id value for
the Keystone request authorization token utilized to speak with Ironic.
These requests are translated through keystonemiddleware
into values which tell Ironic what to do. Or to be more precise, tell the
policy enforcement framework the information necessary to make decisions.
System scoped requests very much align with the access controls of Ironic
before the Secure RBAC effort. The original custom role
privilges are identical to a system scoped
baremetal_reader is identical to a system scoped
In these concepts, the
admin is allowed to create/delete objects/items.
reader is allowed to read details about items and is intended for
users who may need an account with read-only access for or front-line support
In addition to these concepts, a
member role exists in the Secure RBAC
use model. Ironic does support this role, and in general
users in a system scope are able to perform basic updates/changes, with the
exception of special fields like those to disable cleaning.
Project scoped authentication is when a request token and associated records
indicate an associated
The legacy behavior of API service is that all requests are treated as
project scoped requests where access is governed using an “admin project”.
This behavior is deprecated. The new behavior is a delineation of
system scoped and
project scoped requests.
In essence, what would have served as an “admin project”, is now
Previously, Ironic API, by default, responded with access denied or permitted based upon the admin project and associated role. These responses would generate an HTTP 403 if the project was incorrect or if a user role.
While Ironic has had the concept of an
owner and a
lessee, they are NOT used by default. They require
custom policy configuration files to be used in the legacy
How Project Scoped Works¶
Ironic has two project use models where access is generally more delagative
owner where access to a
lessee is generally more utilitarian.
The purpose of an owner, is more to enable the System Operator to delegate much of the administrative activity of a Node to the owner. This may be because they physically own the hardware, or they are in charge of the node. Regardless of the use model that the fields and mechanics support, these fields are to support humans, and possibly services where applicable.
The purpose of a lessee is more for a tenant in their project to be able to have access to perform basic actions with the API. In some cases that may be to reprovision or rebuild a node. Ultimately that is the lessee’s progative, but by default there are actions and field updates that cannot be performed by default. This is also governed by access level within a project.
These policies are applied in the way data is viewed and how data can be updated. Generally, an inability to view a node is an access permission issue in term of the project ID being correct for owner/lessee.
The ironic project has attempted to generally codify what we believe is reasonable, however operators may wish to override these policy settings. For details general policy setting details, please see Policies.
Field value visibility restrictions¶
Ironic’s API, by default has a concept of filtering node values to prevent
sensitive data from being leaked. System scoped users are subjected to basic
restrictions, where as project scoped users are, by default, examined further
and against additional policies. This threshold is controlled with the
By default, the following fields are masked on Nodes and are controlled by the associated policies. By default, owner’s are able to see insight into the infrastucture, where as lessee users CANNOT view these fields by default.
Field update restrictions¶
Some of the fields in this list are restricted to System scoped users, or even only System Administrators. Some of these default restrictions are likely obvious. Owners can’t change the owner. Lessee’s can’t change the owner.
chassis_uuid field is a write-once-only field. As such
it is restricted to system scoped administrators.
More information is available on these fields in Policies.
allocations endpoint of the API is somewhat different than other
other endpoints as it allows for the allocation of physical machines to
an admin. In this context, there is not already an
to leverage to control access for the creation process, any project member
does have the inherent prilege of requesting an allocation. That being said,
their allocation request will require physical nodes to be owned or leased
project_id through the
Ability to override the owner is restricted to system scoped users by default
and any new allocation being requested with a specific owner, if made in
project scope, will have the
project_id recorded as the owner of
Ultimately, an operational behavior difference exists between the
lessee rights in terms of allocations exists. With the standard
lessee users are able to create allocations if they
own nodes which are not allocated or deployed, but they cannot reprovision
nodes when using only a
member role. This limitation is not the case
for project-scoped users with the
The allocation endpoint’s use is restricted to project scoped
[oslo_policy]enforce_new_defaults has been set
True using the
rule. This is in order to prevent endpoint misuse. Afterwards all
project scoped allocations will automatically populate an owner.
System scoped request are not subjected to this restriction,
and operators may change the default restriction via the
Most users, upon implementing the use of
system scoped authentication
should not notice a difference as long as their authentication token is
properly scoped to
system and with the appropriate role for their
access level. For most users who used a
or other custom project via a custom policy file, along with a custom
role name such as
baremetal_admin, this will require changing
the user to be a
system scoped user with
The most noticeable difference for API consumers is the HTTP 403 access code is now mainly a HTTP 404 access code. The access concept has changed from “Does the user user broadly has access to the API?” to “Does user have access to the node, and then do they have access to the specific resource?”.
What is an owner or lessee?¶
lessee is the project which has been assigned baremetal
resources. Generally these should be service projects as opposed to a project
dedicated to a specific user. This will help prevent the need to involve a
system scoped administrator from having to correct ownership records
should a project need to be removed due to an individual’s departure.
project_id is used to represent and associate the owner or
How do I assign an owner?¶
# baremetal node set --owner <project_id> <node>
With the default access policy, an
owner is able to change
lessee of a node. However the
lessee is unable to do
How do I assign a lessee?¶
# baremetal node set --lessee <project_id> <node>
What is the difference between an owner and lessee?¶
This is largely covered in How Project Scoped Works although
as noted it is largely in means of access. A
lessee is far more
restrictive and an
owner may revoke access to
Access to the underlying baremetal node is not exclusive between the
lessee, and this use model expects that some level of
communication takes place between the appropriate parties.