Bug 1253459 - ipa vault-add creates service vault with non-existent service
ipa vault-add creates service vault with non-existent service
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: IPA Maintainers
Namita Soman
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2015-08-13 14:03 EDT by Scott Poore
Modified: 2016-02-15 12:53 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-15 12:53:15 EST
Type: Bug
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 Scott Poore 2015-08-13 14:03:30 EDT
Description of problem:
[root@master ~]# ipa vault-add vname --service=service_dne
Added vault "vname"
  Vault name: vname
  Type: standard
  Owner users: admin
[root@master ~]# ipa vault-show vname 
ipa: ERROR: vname: vault not found
[root@master ~]# ipa vault-show vname --service=service_dne
  Vault name: vname
  Type: standard
  Owner users: admin

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

How reproducible:

Steps to Reproduce:
1.  ipa-server-install
2.  ipa-kra-install
3.  kinit admin
4.  ipa vault-add vname --service=service_dne

Actual results:
adds vault

Expected results:
should not add vault

Additional info:
Comment 2 Scott Poore 2015-08-13 21:13:45 EDT
Upstream ticket:
Comment 3 Petr Vobornik 2015-08-26 12:55:11 EDT
Was discussed offline and was decided that creating a vault for non-existent user/service is a valid use-case.
Comment 4 Scott Poore 2015-09-08 11:33:57 EDT
Reopening this bug for either more detailed clarification of why adding a vault for a non-existent service is valid or to get this resolved.

IMHO, we should not add a service vault until after the service is added.

Comment 5 Petr Vobornik 2015-12-15 06:29:45 EST
The reason is consistency with delete operation. Vault is not deleted when user is deleted to preserve secrets. So the state can be achieved even if it is not permitted.

Maybe the add operation can print a warning that the user|service doesn't exist, e.g. to solve "typo" mistakes.
Comment 6 Scott Poore 2015-12-17 10:08:00 EST
A warning on add would be good but, is it possible instead to add a warning on user-del?  To me it seems better to error on vault-add and show a warning on user-del (if possible) that the vaults and containers must be manually removed.  This would prevent adding an initial orphan and/or prevent adding new ones for already deleted users.
Comment 7 Petr Vobornik 2016-02-15 12:53:15 EST
I've opened https://fedorahosted.org/freeipa/ticket/5674 to reflect comment 6. 

It will be resolved according to the triage.

Since the proposal will be resolved elsewhere I'm closing this bug again.

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