Cleanup adding new jenkins instance for production

Bug #1592486 reported by Igor Shishkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Fuel Infra Apps

Bug Description

Hello,

Please remove Username and API Key fields on page of adding new CI instance in production environment:
    https://inventory.infra.mirantis.net/jenkins_ci/new

This could be achieved by adding option in settings.yaml which would turn on and off displaying those fields.
Please don't forget to verify POST data on backend side to strictly do not accept parameters from those fields in case if this option is set to do not show them.

Those fields should not be used in production.

Igor Shishkin (teran)
Changed in fuel:
assignee: nobody → Fuel Infra Apps (fuel-infra-apps)
Revision history for this message
Alexander Charykov (acharykov) wrote :

Fields are used if Jenkins Instance isn't defined in config file.

Changed in fuel:
status: New → Invalid
information type: Private → Public
Revision history for this message
Igor Shishkin (teran) wrote :

@Alexander, as we discussed this data should be used from config files only.
There should not be an ability to specify that data in database because of security reasons.

Changed in fuel:
status: Invalid → New
Revision history for this message
Alexander Charykov (acharykov) wrote :

They aren't saved in DB.

Changed in fuel:
status: New → Invalid
Igor Shishkin (teran)
Changed in fuel:
status: Invalid → New
Revision history for this message
Igor Shishkin (teran) wrote :

As just discussed verbally:
Those fields are used for setting new CI instance avoiding config.
Which refers us to the following:
 * Security impact - it's insecure to store plaintext data in DB.
 * Security impact - based on documentation, your code would update DB data from YAML if it's different, i.e. update plaintext sensitive value in DB.
 * Testing impact - tests won't stay representative until you will be able to have exactly the same flow for all the test cases obtained for real production usage.
 * Reproducibility impact - you won't be able to reproduce instance from the same configs using some configuration from DB.

Changed in fuel:
status: New → Invalid
Revision history for this message
Igor Shishkin (teran) wrote :

So I see two choices to solve it at once:
 * Use some kind of parameter(like environment, specifies debug to True and enabling this particular feature in development case) to turn on or off a class of such "development features".
 * Use the the flow from production in your development environments(i.e. YAMLs), which is preferred.

Revision history for this message
Alexander Charykov (acharykov) wrote :

We don't write passwords from config to DB.
Reproducibility is impossible without DB dump.
Fields are used for dynamic add of jenkins instances.

Revision history for this message
Alexander Charykov (acharykov) wrote :

You are not obliged to create anything in DB by hands, imported would do it for you.

Revision history for this message
Igor Shishkin (teran) wrote :

> We don't write passwords from config to DB.
Based on docs - you are.

> Reproducibility is impossible without DB dump.
In current implementation - it's possible by deploying new instance and running importers.

> Fields are used for dynamic add of jenkins instances.
Here's the thing, it should NOT works such way in production.

> You are not obliged to create anything in DB by hands, imported would do it for you.
Here's the thing, importer ONLY should be able to do that.

@Alexander, I've described the reasons and described the ways how to solve it.
Please finally accept the bug.

Changed in fuel:
status: Invalid → New
Revision history for this message
Alexander Charykov (acharykov) wrote :

Please read documentation carefully:
> Note that username and API key information from credentials file will not be saved in the database

> Here's the thing, it should NOT works such way in production.
Please create a feature request to add functionality to disable dynamic addition.

Bug about useless fields is incorrect, because fields are used in application. If you don't need then, it doesn't mean everyone also doesn't need them.

Changed in fuel:
status: New → Invalid
Revision history for this message
Igor Shishkin (teran) wrote :

@Alexander, this means your are fine with having unrelevant tests(details highlighted above in #4) in your development environment right?

Description updated according your belief.

summary: - Remove useless fields in jenkins adding form
+ Cleanup adding new jenkins instance for production
description: updated
Changed in fuel:
status: Invalid → New
Revision history for this message
Alexander Charykov (acharykov) wrote :

What do you mean by cleanup? Those fields are used and can't be removed.

Changed in fuel:
status: New → Incomplete
Revision history for this message
Igor Shishkin (teran) wrote :

@Alexander, it's described in bug: "Please remove Username and API Key fields on page of adding new CI instance IN PRODUCTION ENVIRONMENT"

Changed in fuel:
status: Incomplete → New
Revision history for this message
Alexander Charykov (acharykov) wrote :

I can propose you a configuration parameter which would disable "adding new CI instance IN PRODUCTION ENVIRONMENT".

Create a bug with this feature request. This bug is invalid because fields can't be removed as they are used.

Please don't reopen this bug, simply create a new bug with tag feature.

Changed in fuel:
status: New → Invalid
Revision history for this message
Igor Shishkin (teran) wrote :

@Alexander, new bug won't represent the history of that solution.
Description is updated.

description: updated
Changed in fuel:
status: Invalid → New
Revision history for this message
Alexander Charykov (acharykov) wrote :

Please create a new bug.

Changed in fuel:
status: New → Invalid
Revision history for this message
izotov@mirantis.com (izotov) wrote :

@Alexander, is current bug description valid from your perspective?
If so, I would suggest to process this bug record, instead of creating a new one. Or are there any specific reasons why you are requesting a new bug? Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.