-
Notifications
You must be signed in to change notification settings - Fork 58
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
api: Define OperatorsAuthentication model #950
Conversation
api/redhatopenshift/HcpCluster.Management/hcpCluster-models.tsp
Outdated
Show resolved
Hide resolved
api/redhatopenshift/HcpCluster.Management/hcpCluster-models.tsp
Outdated
Show resolved
Hide resolved
/** The control plane operator name */ | ||
operatorName: string; | ||
|
||
...UserAssignedManagedIdentity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the client-id and principal-id will be duplicated in both the identity{}
field and this field if we choose to specify it here.
properties: {
"managedIdentityProfile": {
"controlPlaneOperators": [
{
"operatorName": "csi-disk-driver",
"resourceId": "/subscriptions/.../Microsoft.Identity/managedIdentity/csi-disk-driver"
"principalId": "csi-disk-driver",
"clientId": "csi-disk-driver"
},
{...}
]
}
},
identity: {
"/subscriptions/.../Microsoft.Identity/managedIdentity/csi-disk-driver": {
"principalId": "csi-disk-driver",
"clientId": "csi-disk-driver"
},
"/subscriptions/.../csi-file-driver": {
"principalId": "csi-file-driver",
"clientId": "csi-file-driver"
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I had no idea what the top-level identity
section would contain. In that case we can have both data and control plane operators be a map of operatorName -> resourceId
where resourceId
is a lookup key for the identity
section (validation would fail if key is not found).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, maybe the serviceManagedIdentity
field just needs to be a resource ID lookup key as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to call out here, the RP does not currently parse the top-level identity
section at all so we'll need to get that implemented immediately in addition to the plumbing needed for this new API.
I see some of the attributes have removed parts of the names compared to in the CS API. In #858 (comment) I described and reasoned why in the CS API we intentionally kept parts of the names that initially might seem "redundant" |
I'm neutral on naming and will change it based on consensus, but FTR I felt the purpose of the operator maps were clear enough from the enclosing scopes.
I'm considering renaming the |
Please rebase pull request. |
This is an extension to PlatformProfile that defines user-assigned managed identities for individual OpenShift cluster operators.
65cb766
to
46acea7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is clear on the various kinds of auth required and what fields should be provided for each. We should probably get BU feedback on names just to be sure, unless that's tracked somewhere I'm unaware of?
What this PR does
Adds
PlatformProfile.operatorsAuthentication
field to the Azure API, structured to resemble the azure.operators_authentication OCM schema (with minor tweaks to eliminate redundancy in field names, and simplifications where data is provided through ARM-defined models or headers)Jira: ARO-10911 - Frontend API Changes to support managed identities
Link to demo recording:
Special notes for your reviewer
hcpCluster-models.tsp
. The rest of the changes are generated from it.