Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-10495

Avoid swagger validation when browsing /swagger

Details

    • Improvement
    • Status: Done
    • Medium
    • Resolution: Done
    • 2.29.1
    • 2.31.0
    • Documentation, UX

    Description

      Impact on the user
      Privacy issues

      Steps to reproduce

      • Login to PMM using an address other that 127.0.0.1 or localhost
      • Navigate to /swagger
      • Scroll down to the bottom to view validation status

      Actual result
      Online validation is automatically attempted each time the swagger documentation is viewed by the user.

      Expected Result
      Online validation does not occurr when viewing the swagger documentation.

      Workaround

      • Enter the PMM container/server
      • cd /usr/share/pmm-server/swagger/
      • sed -i 's;validatorUrl:"https://validator.swagger.io/validator";validatorUrl:"";g' *

      Details
      The swagger documentation automatically sends the user's PMM server address to a remote validation service:

      By default, Swagger UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators (Validator Badge). Setting it to either none, 127.0.0.1 or localhost will disable validation.

      https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/#network

      Attachments

        Activity

          People

            ceri.williams Ceri Williams
            ceri.williams Ceri Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist