flagsmith icon indicating copy to clipboard operation
flagsmith copied to clipboard

Allow configuration to remove sensitive data from flags responses

Open matthewelwell opened this issue 3 years ago • 12 comments
trafficstars

We should add a configuration (at the environment or project level?) to remove descriptions from the response. Alternatively, we could add another field to the feature, in which you can store more sensitive information.

matthewelwell avatar Jun 30 '22 07:06 matthewelwell

Is this for SDK endpoints? If yes - I don't think we need it since we have removed this field entirely in edge, no?

gagantrivedi avatar Jul 05 '22 06:07 gagantrivedi

Yes but for Core and Self Hosted people this would be helpful

dabeeeenster avatar Jul 05 '22 07:07 dabeeeenster

At the moment, the responses to flags (from the Core API) includes the feature description and tags fields. These are not necessary to return and potentially sensitive.

matthewelwell avatar Nov 07 '22 15:11 matthewelwell

Implemented here: https://github.com/Flagsmith/flagsmith/pull/2017 NOTE: please read the discussion on the above PR for more context

Tldr: a flag named hide_sensitive_data has been added to the environment endpoint that(if enabled) will make the flags response looks like the response from edge-api and will also not return traits for identity endpoints

gagantrivedi avatar Apr 11 '23 07:04 gagantrivedi

@gagantrivedi I think this is just waiting the frontend piece, is that correct?

matthewelwell avatar May 15 '23 14:05 matthewelwell

@matthewelwell, For the frontend changes, should we request the endpoint to hide sensitive data solely based on the value of the hide_sensitive_data feature flag, or should we allow the admins to set this behavior somewhere as you proposed in the first comment?

novakzaballa avatar May 24 '23 10:05 novakzaballa

@matthewelwell, For the frontend changes, should we request the endpoint to hide sensitive data solely based on the value of the hide_sensitive_data feature flag, or should we allow the admins to set this behavior somewhere as you proposed in the first comment?

Yeah, we went with the first approach, and it is now a configuration at the environment level

gagantrivedi avatar May 24 '23 10:05 gagantrivedi

@gagantrivedi I think this still needs implementing in the Edge API? For example, the traits need removing on the identities endpoints. Also, we should add a PR for the docs to confirm which fields are removed on which endpoints.

matthewelwell avatar May 24 '23 17:05 matthewelwell

Yeah, it's here: https://github.com/Flagsmith/edge-api/pull/145

gagantrivedi avatar May 25 '23 02:05 gagantrivedi