RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1253498 - ipa vault-add does not check type for password and public-key related arguments
Summary: ipa vault-add does not check type for password and public-key related arguments
Keywords:
Status: CLOSED DUPLICATE of bug 1251561
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-13 20:54 UTC by Scott Poore
Modified: 2015-08-14 08:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-14 08:07:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Scott Poore 2015-08-13 20:54:56 UTC
Description of problem:

It looks like vault-add does not restrict use of arguments by type.  I confirmed with Endi that the password/public-key related arguments do nothing for vaults that don't match their type (symmetric/asymmetric).  So, the command line should show an error.

[root@master ~]# ipa vault-add vname --password=SomePa55w0rd
-------------------
Added vault "vname"
-------------------
  Vault name: vname
  Type: standard
  Owner users: admin
[root@master ~]# ipa vault-archive vname --in=/tmp/secret.in
--------------------------------
Archived data into vault "vname"
--------------------------------
[root@master ~]# ipa vault-retrieve vname
---------------------------------
Retrieved data from vault "vname"
---------------------------------
  Data: dGVzdF9kYXRhMgo=
[root@master ~]# echo dGVzdF9kYXRhMgo=|base64 -d
test_data2
[root@master ~]# ipa vault-add vname_password --password-file=/tmp/stdin.in 
----------------------------
Added vault "vname_password"
----------------------------
  Vault name: vname_password
  Type: standard
  Owner users: admin
[root@master ~]# ipa vault-add vname_publickey --public-key-file=public.pem 
-----------------------------
Added vault "vname_publickey"
-----------------------------
  Vault name: vname_publickey
  Type: standard
  Owner users: admin


Version-Release number of selected component (if applicable):
ipa-server-4.2.0-4.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.  ipa-server-install
2.  ipa-kra-install
3.  kinit admin
4.  ipa vault-add --password="something"
5.  ipa vault-add --public-key="somepkblob"
...

Actual results:
arguments excepted but not used.  instead should error that the args don't match the type

Expected results:
arguments would only be allowed if used by the type

Additional info:

Comment 2 Scott Poore 2015-08-14 01:13:37 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/5213

Comment 3 Petr Vobornik 2015-08-14 08:07:21 UTC
duplicate/ fixed in bug 1251561 , see https://git.fedorahosted.org/cgit/freeipa.git/commit/?id=7d7ffb62526595433412633c05af5af7909124c8

*** This bug has been marked as a duplicate of bug 1251561 ***


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