Bug 117246 - Create User API
Create User API
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Other (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Bret McMillan
Bret McMillan
Depends On:
Blocks: rhn360sat
  Show dependency treegraph
Reported: 2004-03-01 17:51 EST by Joe deBlaquiere
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-22 13:46:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe deBlaquiere 2004-03-01 17:51:24 EST
In setting up sat-demo.rhn.redhat.com it would be very nice to be able
to create user accounts as part of the external management process. 

I would think the parameters would be something like:


where passwd is ignored in the case that use_pam is nonzero
Comment 1 Bret McMillan 2004-03-01 18:26:12 EST
This is already on the api list for the students.

Most likely the params would be uname, first_name, last_name, email,
and password.  use_pam is a function of the satellite/db itself, and
not really a per-user option.
Comment 2 Joe deBlaquiere 2004-03-01 23:11:26 EST
My understanding from my conversation with Chip was that use_pam is a
per-user option, but only available in satellite environments... and I
can definately see where customers would want to set that flag on
programatically created users. 

Perhaps it should be a global flag for the satellite.
Comment 3 Bret McMillan 2004-03-01 23:40:32 EST
You're probably right.  I think my brain warped 'pam' into 'encrypted
passwords'.  Dunno why, I blame the influence of solaris particles.
Comment 4 Bret McMillan 2004-03-02 15:52:24 EST
realigning w/ a more appropriate tracking bug.
Comment 5 Bret McMillan 2004-07-06 19:45:16 EDT
ok, you now have a somewhat fleshed out user api.  whether or not to
use pam can be set w/ user.use_pam_authentication at any time, instead
of just at user creation time.  also, any calls likely to enter crm
hell are now satellite only (pam, create, delete, etc).

Comment 6 Bret McMillan 2004-07-06 19:54:42 EDT
Test plan:

1.  create a satellite
    a) org admin should be 'rhn_api_test'
    b) create a normal user 'rhn_api_test_user' whose real name is
'Bret McMillan'
    c)  register 2 rhel3as boxes, and call them 'api test 1' and 'api
test 2'
2.  go to rhn/web/test on a webcode-enabled machine, and run:

  ./runtests api/user.t

3.  all tests should pass
Comment 7 Matt Jamison 2004-07-16 15:21:42 EDT
I'm a little dense here.  what constitutes a "webcode-enabled machine"
Comment 8 Bret McMillan 2004-07-16 15:28:03 EDT
one of the developer workstations, or webdev.
Comment 9 Fanny Augustin 2004-08-24 10:01:19 EDT
This is more like unit testing...  Could you please run those from
your machine (webQA)?
Comment 10 Bret McMillan 2004-08-24 10:25:38 EDT
tests run against webdev, webqa, and prod, and all passed.

fanny:  let me know what satellite you want me to point at for the
unit tests as well, and i'll run them against that.  If those pass, we
can close out this bug.
Comment 11 Fanny Augustin 2004-08-26 11:59:46 EDT
Please point it to farm02.rhndev.redhat.com (350 sat)/dog8code and
farm03.rhndev.redhat.com (340 sat)/pink4all.

Comment 12 Bret McMillan 2004-09-03 12:34:38 EDT
fails on both, moving to blocking rhn360sat:

RHN::Exception: DBD::Oracle::st execute failed: ORA-01400: cannot
insert NULL into
"RHNSAT.CREATE_NEW_USER", line 48!ORA-06512: at line 2 (DBD ERROR:
OCIStmtExecute) [for Statement "BEGIN!  :user_id :=
CREATE_NEW_USER(org_id_in => :org_id, login_in => :login, password_in
=> :password,!          oracle_contact_id_in => :oracle_contact_id,
prefix_in => :prefix,!                              first_names_in =>
:first_names, last_name_in => :last_name, genqual_in => :genqual,!   
                          parent_company_in => :parent_company,
company_in => :company, title_in => :title,!                         
    phone_in => :phone, fax_in => :fax, email_in => :email, pin_in =>
:pin,!                              first_names_ol_in =>
:first_names_ol, last_name_ol_in => :last_name_ol,!                  
           address1_in => :address1, address2_in => :address2,
address3_in => :address3,!                              city_in =>
:city, state_in => :state, zip_in => :zip, country_in => :country,!  
                           alt_first_names_in => :alt_first_names,
alt_last_name_in => :alt_last_name,!                  contact_call_in
=> :contact_call,!                              contact_mail_in =>
:contact_mail,!                          contact_email_in =>
:contact_email,!                              contact_fax_in =>
Comment 13 Bret McMillan 2004-10-04 11:37:44 EDT
ok, now giving ' ' as the prefix for an api created user... can be
changed w/ other calls

Test Plan:
Run the web unit tests pointed at a satellite.  See bretm w/ any
Comment 14 Todd Warner 2004-10-21 12:48:50 EDT
QA push. {ON_DEV,QA_READY} --> ON_QA
Comment 15 Vlady Zlatkin 2004-10-28 09:18:46 EDT

Can you test this 360 satellite: rhnblade4?  I have all the things
described in the test plan set up, although the two RHEL3 machines are
the same machine registered twice.

Comment 16 Fanny Augustin 2004-11-18 16:17:05 EST
Bret could you please take charge of this bug?  It looks like you just
have to run some unit tests agains a 360 sat.  Please use:

regular password
Comment 17 Todd Warner 2004-12-01 06:40:15 EST
Bret. FAILS_QA. You need a detailed docs description for this. If not
a priority then skip it.
Comment 18 Bret McMillan 2004-12-02 14:17:36 EST
farm02.rhndev.redhat.com is gone, unit tests passed on

Documentation for the functionality is at /rpc/api/user/

I do not think it is necessary to do any more documentation other than
note the new calls and whether they are satellite specific in the
release notes:

use_pam_authentication (satellite only)
create (satellite only)
delete (satellite only)

Comment 19 Todd Warner 2005-03-22 13:46:12 EST

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