-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Custom role definitions for MHSM #11465
Conversation
Swagger Validation Report
|
Rule | Message |
---|---|
Consider using x-ms-client-flatten to provide a better end user experience New: Microsoft.KeyVault/preview/7.2-preview/rbac.json#L519 |
️❌
Avocado: 50 Errors, 0 Warnings failed [Detail]
Only 10 items are listed, please refer to log for more details.
Rule | Message |
---|---|
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":21,"column":25},"token":"}","message":"unexpected token, token: }, line: 21, column: 25","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":22,"column":21},"token":"]","message":"unexpected token, token: ], line: 22, column: 21","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":23,"column":17},"token":"}","message":"unexpected token, token: }, line: 23, column: 17","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":23,"column":18},"token":",","message":"unexpected token, token: ,, line: 23, column: 18","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":28,"column":9},"token":"}","message":"unexpected token, token: }, line: 28, column: 9","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":29,"column":5},"token":"}","message":"unexpected token, token: }, line: 29, column: 5","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":30,"column":1},"token":"}","message":"unexpected token, token: }, line: 30, column: 1","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected end of file","position":{"line":18,"column":36},"token":"]","message":"unexpected end of file, token: ], line: 18, column: 36","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/PutRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":14,"column":17},"token":"}","message":"unexpected token, token: }, line: 14, column: 17","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/PutRoleDefinition-example.json"}) |
JSON_PARSE |
The file is not a valid JSON file. json: [preview/7.2-preview/examples/PutRoleDefinition-example.json"}]({"kind":"structure","code":"unexpected token","position":{"line":15,"column":13},"token":"]","message":"unexpected token, token: ], line: 15, column: 13","url":"/home/vsts/work/1/c93b354fd9c14905bb574a8834c4d69b/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/PutRoleDefinition-example.json"}) |
️❌
ModelValidation: 1 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
Failed to load a reference example file specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/examples/DeleteRoleDefinition-example.json. (Error: Unable to parse swagger, inner error: unexpected token, token: }, line: 21, column: 25) |
"role":"Model Validation", "url":"https://github.com/Azure/azure-rest-api-specs/blob/a71f5ccbd75e638b217173a464001737abff66fb/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json" |
️❌
SemanticValidation: 1 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
JSON_PARSING_ERROR |
unexpected token, token: }, line: 21, column: 25 |
️️✔️
[Staging] Cross Version BreakingChange (Base on preview version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️
[Staging] Cross Version BreakingChange (Base on stable version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
Azure Pipelines successfully started running 1 pipeline(s). |
azure-sdk-for-java
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-go
|
Azure CLI Extension Generation
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-python
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-python-track2
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-js
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-resource-manager-schemas
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
Trenton Generation
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-net
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
/azurepipelines run |
Azure Pipelines successfully started running 2 pipeline(s). |
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.
This seems to have replaced custom role assignments (necessary to assign principals to definitions) with custom role definitions when, in fact, custom role definitions should be additive, yes? In that case, you need to add (custom) role assignment CRUD operations back in. I would expect the final form of this PR to be only additions.
@@ -27,38 +27,38 @@ | |||
"application/json" | |||
], | |||
"paths": { | |||
"/{scope}/providers/Microsoft.Authorization/roleDefinitions": { | |||
"get": { | |||
"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}": { |
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.
Nit: extraneous whitespace.
"operationId": "RoleDefinitions_List", | ||
"description": "Get all role definitions that are applicable at scope and above.", | ||
"operationId": "RoleDefinitions_Delete", | ||
"description": "Deletes a custom role definition.", |
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.
Question: should an error be expected if someone tries to delete a built-in role definition?
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.
yes
"200": { | ||
"description": "OK - Returns information about the role assignment.", | ||
"201": { | ||
"description": "Created - Returns information about the role definition.", | ||
"schema": { | ||
"$ref": "#/definitions/RoleAssignment" |
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.
This should return a RoleDefinition.
"x-ms-odata": "#/definitions/RoleDefinitionFilter" | ||
} | ||
}, | ||
"/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}": { |
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.
It seems you deleted all the role assignment CRUD operations. Looking at the file sans diff, I don't see them anywhere. These still need to be supported. I.e., I expect this file to contain only additions for custom role definitions.
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.
unclear to me what happened but it should be fixed now
e36f2b7
to
e5cc3ed
Compare
Swagger Generation Artifacts
|
NewApiVersionRequired reason: |
specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json
Outdated
Show resolved
Hide resolved
Co-authored-by: Charles Lowell <chlowe@microsoft.com>
Merging, approved by Alex offline |
* Custom role definitions for MHSM * addtl feedback * Apply suggested doc change Co-authored-by: Charles Lowell <chlowe@microsoft.com> Co-authored-by: Charles Lowell <chlowe@microsoft.com>
* Custom role definitions for MHSM * addtl feedback * Apply suggested doc change Co-authored-by: Charles Lowell <chlowe@microsoft.com> Co-authored-by: Charles Lowell <chlowe@microsoft.com>
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Contribution checklist:
If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist
Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.
Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.
If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Breaking Change Review Checklist
If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.
Please follow the link to find more details on PR review process.