Bug 773139 - user's domain can be destroyed with any domain name
Summary: user's domain can be destroyed with any domain name
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 1.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-11 03:37 UTC by Meng Bo
Modified: 2012-01-30 04:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-30 04:58:36 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Meng Bo 2012-01-11 03:37:12 UTC
Description of problem:
rhc-ctl-domain command can create user domain even use the wrong domain name

Version-Release number of selected component (if applicable):
rhc-broker-0.84.37-1.el6_2.noarch 
rhc-node-0.84.21-1.el6_2.noarch 

How reproducible:
always

Steps to Reproduce:
1.create domain with user
# rhc-create-domain -n bmengtestdomain1 -l bmeng+1 
2.try to destroy the domain using wrong name
# rhc-ctl-domain --destroy -n abcd -l bmeng+1 -d
3.
  
Actual results:
user domain had been destroyed successfully.

Expected results:
there should be some error appears since the domain name is wrong

Additional info:

[root@localhost ~]# rhc-ctl-domain --destroy -n aaa -l bmeng+1 -d
Password: 
Submitting form:
delete: true
namespace: aaa
rhlogin: bmeng+1
Contacting https://ec2-107-21-79-175.compute-1.amazonaws.com
Response from server:
DEBUG:


Exit Code: 0
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
api_c: placeholder
API version:    1.1.1
Broker version: 1.1.1
Success

Comment 1 Abhishek Gupta 2012-01-11 19:33:41 UTC
This needs to be a backend validation. On the other hand, if the namespace is not required to be specified (if the login/password is enough), then we can remove the namespace from being a required field for the rhc-ctl-domain --destroy command.

Comment 2 Rajat Chopra 2012-01-11 23:24:59 UTC
Fixed with checkin# 3fd8270..ab9c85d
If the rhlogin does not match with the namespace provided, then an error is printed saying so.

Comment 3 Meng Bo 2012-01-12 04:56:31 UTC
verified with rhc-0.84.11-1.el6_2.noarch and rubygem-cloud-sdk-controller-0.2.30-1.el6_2.noarch ,on devenv-stage_112
bug fixed.


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