Bug 849543 - Should remind user about password changing for phpmyadmin and rockmongo after re-adding mysql and mongodb
Should remind user about password changing for phpmyadmin and rockmongo after...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Rob Millner
libra bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-20 03:21 EDT by Wei Sun
Modified: 2015-05-14 18:58 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:48:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wei Sun 2012-08-20 03:21:15 EDT
Description of problem:
When I embed phpmyadmin or rockmongo to my application,I could get information of login about user name and user password.Then I remove mysql or mongodb,and embedded them again,I can't use name and password that were prompted when embedding phpmyadmin or rockmongo to login phpmyadmin or rockmongo .

Version-Release number of selected component (if applicable):
devenv_2029
rhc-0.97.12

How reproducible:
always

Steps to Reproduce:
1.add mysql or mongodb to an application
[sunwei@dhcp-8-229 dev]$ rhc app cartridge add -a php1 -c mysql-5.1 -d -p x
Contacting https://ec2-23-22-147-56.compute-1.amazonaws.com
Response from server:
DEBUG:
Embedded app details: Connection URL: mysql://127.0.254.1:3306/

Exit Code: 0
broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"]
api_c: ["placeholder"]
API version:    1.1.3

RESULT:

MySQL 5.1 database added.  Please make note of these credentials:

   Root User: admin
   Root Password: wU7bviFnZ-1r
   Database Name: php1

Connection URL: mysql://127.0.254.1:3306/

You can manage your new MySQL database by also embedding phpmyadmin-3.4.

2.add phpmyadmin-3.4 to application

[sunwei@dhcp-8-229 dev]$ rhc app cartridge add -a php1 -c phpmyadmin-3.4 -d -p x
Contacting https://ec2-23-22-147-56.compute-1.amazonaws.com
Response from server:
DEBUG:
Embedded app details: URL: https://php1-wsundev820.dev.rhcloud.com/phpmyadmin/

Exit Code: 0
broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"]
api_c: ["placeholder"]
API version:    1.1.3

RESULT:

phpMyAdmin 3.4 added.  Please make note of these MySQL credentials again:

   Root User: admin
   Root Password: wU7bviFnZ-1r

URL: https://php1-wsundev820.dev.rhcloud.com/phpmyadmin/

3.use the information of phpMyAdmin(Root User: admin  Root Password:wU7bviFnZ-1r) to login URL:https://php1-wsundev820.dev.rhcloud.com/phpmyadmin/

4.remove mysql or mongodb
5.embed mysql or mongodb
  [sunwei@dhcp-8-229 dev]$ rhc app cartridge add -a php1 -c mysql-5.1 -d -p x
Contacting https://ec2-23-22-147-56.compute-1.amazonaws.com
Response from server:
DEBUG:
Embedded app details: Connection URL: mysql://127.0.254.1:3306/

Exit Code: 0
broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"]
api_c: ["placeholder"]
API version:    1.1.3

RESULT:

MySQL 5.1 database added.  Please make note of these credentials:

   Root User: admin
   Root Password: msv-HfHQcc7_
   Database Name: php1

Connection URL: mysql://127.0.254.1:3306/

You can manage your new MySQL database by also embedding phpmyadmin-3.4.

6. login phpmyadmin-3.4 using the username and password of phpmyadmin

Actual results:

Can't login using the username and password of phpmyadmin

Expected results:

User should be able to login using the username and password of phpmyadmin,or prompt user to use name and password of mysql

Additional info:
use mysql's user and password ,can login
Comment 1 Dan Mace 2012-08-20 10:52:12 EDT
This is as designed:

- Phpmyadmin is configured to use the 'http' authentication style, which means users are authenticated against the underlying database, NOT a Phpmyadmin user database

- Rockmongo is configured to use 'mongo_auth', which behaves the same as Phpmyadmin in thise case, authenticating users against the Mongo database

So, if the users in the underlying databases are changed (either manually or because the db itself has been recreated), the new credentials will be used to log in to the respective web interfaces.

There may be grounds here to open a UI bug to make it more clear when a database cartridge is added and rockmongo/phpmyadmin is present to present a note to the user reminding them that they'll use the new credentials to log in.
Comment 2 John (J5) Palmieri 2012-10-09 10:32:57 EDT
We need a dependency story so we don't special case databases.  If there is some sort of dependency that the user should be aware of we should have infrastructure for grabbing that info and notifying the user.  Simply special casing the DB's is not scalable if we start to add a lot more cartridges.
Comment 3 Clayton Coleman 2012-10-17 14:49:52 EDT
Why can't the cartridge return this info as part of the cartridge add in text?
Comment 4 Rob Millner 2012-10-26 17:48:43 EDT
Added an informative message to the MySQL and MongoDB cartridges.

https://github.com/openshift/origin-server/pull/777
Comment 5 Xiaoli Tian 2012-10-28 22:36:37 EDT
(In reply to comment #4)
> Added an informative message to the MySQL and MongoDB cartridges.
> 
> https://github.com/openshift/origin-server/pull/777

Move it to ON_QA since above pull request is already merged in master
Comment 6 Wei Sun 2012-10-29 04:37:25 EDT
verified on devenv_2397

Step:
1.create an application
2.add mysql to application

Result:
[sunwei@dhcp-8-229 client]$  rhc app cartridge add -a phptest -c mysql-5.1 -d -p x
Contacting https://ec2-107-20-129-203.compute-1.amazonaws.com
Response from server:
DEBUG:
Embedded app details: Connection URL: mysql://127.1.5.129:3306/

Exit Code: 0
api_c: ["placeholder"]
broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"]
API version:    1.1.3

RESULT:

MySQL 5.1 database added.  Please make note of these credentials:

   Root User: admin
   Root Password: VRm447Qb8RPT
   Database Name: phptest

Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/

You can manage your new MySQL database by also embedding phpmyadmin-3.4.
The phpmyadmin username and password will be the same as the MySQL credentials above.

Note You need to log in before you can comment on or make changes to this bug.