Skip to content
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

AKV: Bring changes from two recent PRs to 7.2-preview into 7.3-preview #12322

Merged
merged 7 commits into from
Jan 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"vaultBaseUrl": "https://myvault.vault.azure.net/",
"scope": "",
"scope": "/",
"api-version": "7.2-preview",
"roleDefinitionName": "00000000-0000-0000-0000-000000000000"
},
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"vaultBaseUrl": "https://myvault.vault.azure.net/",
"scope": "",
"scope": "/",
"api-version": "7.2-preview",
"roleDefinitionName": "00000000-0000-0000-0000-000000000000"
},
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"vaultBaseUrl": "https://myvault.vault.azure.net/",
"scope": "/",
"api-version": "7.3-preview",
"roleDefinitionName": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"properties": {
"roleName": "My custom role",
"type": "CustomRole",
"description": "Role description",
"assignableScopes": [
"/"
],
"permissions": [
{
"dataActions": [
"Microsoft.KeyVault/managedHsm/keys/sign/action"
]
}
]
},
"id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000",
"type": "Microsoft.Authorization/roleDefinitions",
"name": "00000000-0000-0000-0000-000000000000"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"vaultBaseUrl": "https://myvault.vault.azure.net/",
"scope": "/",
"api-version": "7.3-preview",
"roleDefinitionName": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"properties": {
"roleName": "My custom role",
"type": "CustomRole",
"description": "Role description",
"assignableScopes": [
"/"
],
"permissions": [
{
"dataActions": [
"Microsoft.KeyVault/managedHsm/keys/sign/action"
]
}
]
},
"id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000",
"type": "Microsoft.Authorization/roleDefinitions",
"name": "00000000-0000-0000-0000-000000000000"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"vaultBaseUrl": "https://myvault.vault.azure.net/",
"scope": "keys",
"roleDefinitionName": "00000000-0000-0000-0000-000000000000",
"parameters": {
"properties": {
"roleName": "My custom role",
"type": "CustomRole",
"description": "Role description",
"permissions": [
{
"dataActions": [
"Microsoft.KeyVault/managedHsm/keys/sign/action"
]
}
]
}
},
"api-version": "7.3-preview"
},
"responses": {
"201": {
"body": {
"properties": {
"roleName": "My custom role",
"type": "CustomRole",
"description": "Role description",
"assignableScopes": [
"/"
],
"permissions": [
{
"dataActions": [
"Microsoft.KeyVault/managedHsm/keys/sign/action"
]
}
]
},
"id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000",
"type": "Microsoft.Authorization/roleDefinitions",
"name": "00000000-0000-0000-0000-000000000000"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1870,6 +1870,23 @@
"type": "string",
"format": "base64url",
"readOnly": true
},
"iv": {
"type": "string",
"format": "base64url",
"readOnly": true
},
"tag": {
"type": "string",
"x-ms-client-name": "authenticationTag",
"format": "base64url",
"readOnly": true
},
"aad": {
"type": "string",
"x-ms-client-name": "additionalAuthenticatedData",
"format": "base64url",
"readOnly": true
}
},
"description": "The key operation result."
Original file line number Diff line number Diff line change
@@ -27,6 +27,155 @@
"application/json"
],
"paths": {
"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}": {
"delete": {
"tags": [
"RoleDefinitions"
],
"operationId": "RoleDefinitions_Delete",
"description": "Deletes a custom role definition.",
"parameters": [
{
"name": "scope",
"in": "path",
"required": true,
"type": "string",
"description": "The scope of the role definition to delete. Managed HSM only supports '/'.",
"x-ms-skip-url-encoding": true
},
{
"name": "roleDefinitionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name (GUID) of the role definition to delete."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the role definition that was deleted.",
"schema": {
"$ref": "#/definitions/RoleDefinition"
}
},
"default": {
"description": "Key Vault error response describing why the operation failed.",
"schema": {
"$ref": "common.json#/definitions/KeyVaultError"
}
}
},
"x-ms-examples": {
"DeleteRoleDefinition": {
"$ref": "./examples/DeleteRoleDefinition-example.json"
}
}
},
"put": {
"tags": [
"RoleDefinitions"
],
"operationId": "RoleDefinitions_CreateOrUpdate",
"description": "Creates or updates a custom role definition.",
"parameters": [
{
"name": "scope",
"in": "path",
"required": true,
"type": "string",
"description": "The scope of the role definition to create or update. Managed HSM only supports '/'.",
"x-ms-skip-url-encoding": true
},
{
"name": "roleDefinitionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the role definition to create or update. It can be any valid GUID."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleDefinitionCreateParameters"
},
"description": "Parameters for the role definition."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"201": {
"description": "Created - Returns information about the role definition.",
"schema": {
"$ref": "#/definitions/RoleDefinition"
}
},
"default": {
"description": "Key Vault error response describing why the operation failed.",
"schema": {
"$ref": "common.json#/definitions/KeyVaultError"
}
}
},
"x-ms-examples": {
"PutRoleDefinition": {
"$ref": "./examples/PutRoleDefinition-example.json"
}
}
},
"get": {
"tags": [
"RoleDefinitions"
],
"operationId": "RoleDefinitions_Get",
"description": "Get the specified role definition.",
"parameters": [
{
"name": "scope",
"in": "path",
"required": true,
"type": "string",
"description": "The scope of the role definition to get. Managed HSM only supports '/'.",
"x-ms-skip-url-encoding": true
},
{
"name": "roleDefinitionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the role definition to get."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns information about the role definition.",
"schema": {
"$ref": "#/definitions/RoleDefinition"
}
},
"default": {
"description": "Key Vault error response describing why the operation failed.",
"schema": {
"$ref": "common.json#/definitions/KeyVaultError"
}
}
},
"x-ms-examples": {
"GetRoleAssignments": {
"$ref": "./examples/GetRoleDefinition-example.json"
}
}
}
},
"/{scope}/providers/Microsoft.Authorization/roleDefinitions": {
"get": {
"tags": [
@@ -365,6 +514,18 @@
],
"description": "Role assignment properties."
},
"RoleDefinitionCreateParameters": {
"properties": {
"properties": {
"$ref": "#/definitions/RoleDefinitionProperties",
"description": "Role definition properties."
}
},
"required": [
"properties"
],
"description": "Role definition creation parameters."
},
"RoleAssignmentCreateParameters": {
"properties": {
"properties": {
@@ -375,7 +536,7 @@
"required": [
"properties"
],
"description": "Role assignment create parameters."
"description": "Role assignment creation parameters."
},
"RoleDefinitionFilter": {
"properties": {