Skip to content

Simplify Integration#api_field_names

What does this MR do and why?

All secret integration properties are using type: 'password', which avoids exposing the values in form fields and API responses.

This simplifies the way of fetching API field names and updates corresponding unit tests.

How to set up and validate locally

Tests

  1. Checkout the current branch
  2. Execute rspec spec/models/integration_spec.rb in the console.

API

  1. Checkout the current branch and run it locally
  2. Set an integration with secret properties (e.g. Jira)
  3. Request the following endpoint http://localhost:3000/api/v4/projects/#{project_id}/integrations/#{integration_slug}, e.g (http://localhost:3000/api/v4/projects/6/integrations/jira)
  4. Verify that properties values doesn't return any secret values.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #357671 (closed)

Edited by Bojan Marjanovic

Merge request reports