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
- Checkout the current branch
- Execute
rspec spec/models/integration_spec.rb
in the console.
API
- Checkout the current branch and run it locally
- Set an integration with secret properties (e.g. Jira)
- 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
) - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #357671 (closed)
Edited by Bojan Marjanovic