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

ApiManagement - namedValue secrets and createContracts with required properties #8341

Merged
merged 9 commits into from
Feb 13, 2020

Conversation

vfedonkin
Copy link
Contributor

@vfedonkin vfedonkin commented Feb 7, 2020

Latest improvements:

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Contribution checklist:

  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and have all been fixed in this PR.
  • The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

  • Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
  • adding/removing APIs.
  • adding/removing properties.
  • adding/removing API-version.
  • adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

  • If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
    Please follow the link to find more details on API review process.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

2 similar comments
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Feb 7, 2020

azure-sdk-for-js - Release

️✔️ succeeded [Logs] [Expand Details]
  • ️✔️ Generate from 5bc0714 with merge commit aa38dd5. SDK Automation 13.0.17.20191226.1
  • ️✔️@azure/arm-apimanagement [Logs]  [Release SDK Changes]
    [npmPack] npm WARN deprecated rollup-plugin-node-resolve@5.2.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
    [npmPack] loaded rollup.config.js with warnings
    [npmPack] (!) Unused external imports
    [npmPack] default imported from external module 'rollup' but never used
    [npmPack] 
    [npmPack] ./esm/apiManagementClient.js → ./dist/arm-apimanagement.js...
    [npmPack] created ./dist/arm-apimanagement.js in 1.3s

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Feb 7, 2020

azure-sdk-for-go - Release

⚠️ warning [Logs] [Expand Details]

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Feb 7, 2020

azure-sdk-for-python - Release

️✔️ succeeded [Logs] [Expand Details]
  • ️✔️ Generate from 5bc0714 with merge commit aa38dd5. SDK Automation 13.0.17.20191226.1
  • ️✔️azure-mgmt-apimanagement [Logs]  [Release SDK Changes]
    [build_package] /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    [build_package]   warnings.warn(msg)
    [build_package] warning: no files found matching '*.py' under directory 'tests'
    [build_package] warning: no files found matching '*.yaml' under directory 'tests'
    [build_package] /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    [build_package]   warnings.warn(msg)
    [build_package] warning: no files found matching '*.py' under directory 'tests'
    [build_package] warning: no files found matching '*.yaml' under directory 'tests'

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Feb 7, 2020

azure-sdk-for-net - Release

failed [Logs] [Expand Details]
  • Generate from 5bc0714 with merge commit aa38dd5. SDK Automation 13.0.17.20191226.1
    [AutoRest] realpath(): Permission denied
    [AutoRest] realpath(): Permission denied
    [AutoRest] realpath(): Permission denied
    [AutoRest] realpath(): Permission denied
    [AutoRest] realpath(): Permission denied
    [AutoRest] realpath(): Permission denied
  • Microsoft.Azure.Management.ApiManagement [Logs]  [Release SDK Changes]
      Failed to create the package Microsoft.Azure.Management.ApiManagement.
      Error: dotnet msbuild build.proj /t:CreateNugetPackage /p:Scope=apimanagement /v:n /p:SkipTests=true , {} 

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Feb 7, 2020

    azure-sdk-for-java - Release

    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

    @solankisamir
    Copy link
    Member

        }
    

    we dont return clientSecret in GET... then why have it


    Refers to: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/definitions.json:2956 in 544e8d3. [](commit_id = 544e8d3, deletion_comment = False)

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @solankisamir solankisamir added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required API Management labels Feb 8, 2020
    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @vfedonkin
    Copy link
    Contributor Author

    @solankisamir , ClientSecret removed from Get. Could you please look again?

    @majastrz
    Copy link
    Member

        "clientSecret": {
    

    Can you add x-ms-secret: true to mark it as a secret?


    Refers to: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/definitions.json:2277 in 1535884. [](commit_id = 1535884, deletion_comment = False)

    @majastrz
    Copy link
    Member

        "clientSecret": {
    

    Please do this on any property that accepts a secret value.


    In reply to: 584879568 [](ancestors = 584879568)


    Refers to: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/definitions.json:2277 in 1535884. [](commit_id = 1535884, deletion_comment = False)

    Copy link
    Member

    @majastrz majastrz left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Can you add the x-ms-secret: true annotation to designate secret properties. I'll be able to sign off from ARM side after you make the change.

    @majastrz majastrz added ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Feb 11, 2020
    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @majastrz majastrz added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review labels Feb 12, 2020
    Copy link
    Member

    @majastrz majastrz left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Signed off from ARM side.

    @solankisamir
    Copy link
    Member

    solankisamir commented Feb 12, 2020

        }
    

    why does this contract have value, which is a secret? #Closed


    Refers to: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/definitions.json:3713 in 3ffd5be. [](commit_id = 3ffd5be, deletion_comment = False)

    @solankisamir
    Copy link
    Member

              "$ref": "./definitions.json#/definitions/NamedValueContract"
    

    we should have a createcontract for this entity too.


    Refers to: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimnamedvalues.json:221 in 3ffd5be. [](commit_id = 3ffd5be, deletion_comment = False)

    @vfedonkin
    Copy link
    Contributor Author

    vfedonkin commented Feb 12, 2020

    @solankisamir , NamedValues don't always contain the secrets. We return 'value' property on GET and LIST in case "isSecret" property == false

    @solankisamir
    Copy link
    Member

    solankisamir commented Feb 12, 2020

    @vfedonkin I think we should have a consistent experience, so that the customer doesn't have to think whether GET will return him secrets or not.


    In reply to: 584976201 [](ancestors = 584976201)

    @vfedonkin
    Copy link
    Contributor Author

    @solankisamir , you mean removing "isSecret" property and consider all NamedValues as secrets? Yep, I will do it.

    @erich-wang
    Copy link
    Member

    @solankisamir, @vfedonkin , please let me know when you have agreement and all concerns have been addressed, then I can merge this PR, thanks.

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @vfedonkin
    Copy link
    Contributor Author

    @solankisamir , namedValues are changed. Could you please validate?

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    Copy link
    Member

    @solankisamir solankisamir left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    :shipit:

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @vfedonkin
    Copy link
    Contributor Author

    @erich-wang , the PR is ready for merge, thank you.

    @erich-wang erich-wang merged commit aa38dd5 into Azure:master Feb 13, 2020
    ssripadham pushed a commit to ssripadham/azure-rest-api-specs that referenced this pull request Feb 21, 2020
    …properties (Azure#8341)
    
    * ApiManagement - listSecrets for NamedValues
    
    * ApiManagement - create contracts
    
    * ApiManagement - create contracts fix
    
    * ApiManagement - remove ClientSecret from get
    
    * ApiManagement - added x-ms-secret
    
    * ApiManagement - added x-ms-secret 2
    
    * ApiManagement - nmaedValue removed 'secret' property
    
    * ApiManagement - namedValue returned 'secret' property, 'listSecrets' renamed to listValue
    
    * ApiManagement - namedValue small fix in sample
    00Kai0 pushed a commit to 00Kai0/azure-rest-api-specs that referenced this pull request Oct 12, 2020
    …properties (Azure#8341)
    
    * ApiManagement - listSecrets for NamedValues
    
    * ApiManagement - create contracts
    
    * ApiManagement - create contracts fix
    
    * ApiManagement - remove ClientSecret from get
    
    * ApiManagement - added x-ms-secret
    
    * ApiManagement - added x-ms-secret 2
    
    * ApiManagement - nmaedValue removed 'secret' property
    
    * ApiManagement - namedValue returned 'secret' property, 'listSecrets' renamed to listValue
    
    * ApiManagement - namedValue small fix in sample
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    API Management ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants