Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a role with dsidm results in proper deletion message, but role is still present #6488

Open
mirielka opened this issue Jan 9, 2025 · 0 comments
Labels
needs triage The issue will be triaged during scrum

Comments

@mirielka
Copy link
Contributor

mirielka commented Jan 9, 2025

When trying to delete a role using dsidm, the proper deletion message is produced, yet the role being deleted is still present.

Package: 389-ds-base-3.0.5-2.el10.x86_64, 389-ds-base-2.5.2-2.el9_5.x86_64

Steps to reproduce:

  1. Create a managed role using "dsidm role create-managed"
  2. Delete the role using "dsidm role delete"
  3. Verify the role is gone using "dsidm role list" or "dsidm role get"

Expected results:
The role is deleted, proper deletion message is produced, and the role no longer exists

#dsidm localhost -b dc=example,dc=com role list
No objects to display

#dsidm localhost -b dc=example,dc=com role create-managed --cn test_role
Successfully created test_role

#dsidm localhost -b dc=example,dc=com role list
test_role

#dsidm -v localhost -b dc=example,dc=com role delete cn=test_role,dc=example,dc=com
DEBUG: The 389 Directory Server Identity Manager
DEBUG: Inspired by works of: ITS, The University of Adelaide
DEBUG: dsrc path: /root/.dsrc
DEBUG: dsrc container path: /data/config/container.inf
DEBUG: dsrc instances: []
DEBUG: dsrc no such section: slapd-localhost
DEBUG: Called with: Namespace(verbose=True, json=False, instance='localhost', basedn='dc=example,dc=com', binddn=None, bindpw=None, prompt=False, pwdfile=None, starttls=False, dn='cn=test_role,dc=example,dc=com', func=<function delete at 0x7f687492ccc0>)
DEBUG: Instance details: {'uri': 'localhost', 'basedn': 'dc=example,dc=com', 'binddn': None, 'bindpw': None, 'saslmech': None, 'tls_cacertdir': None, 'tls_cert': None, 'tls_key': None, 'tls_reqcert': None, 'starttls': False, 'prompt': False, 'pwdfile': None, 'args': {'ldapurl': 'localhost', 'root-dn': None}}
DEBUG: Allocate <class 'lib389.DirSrv'> with ldapi://%2frun%2fslapd-localhost.socket
DEBUG: Allocate <class 'lib389.DirSrv'> with %2frun%2fslapd-localhost.socket
DEBUG: Allocate <class 'lib389.DirSrv'> with prereserve-1mt-rhel-10.0-20241220.0-5973-2025-01-09-08-51:389
DEBUG: Allocate <class 'lib389.DirSrv'> with prereserve-1mt-rhel-10.0-20241220.0-5973-2025-01-09-08-51:389
DEBUG: Allocate <class 'lib389.DirSrv'> with ldapi://%2frun%2fslapd-localhost.socket
DEBUG: Allocate <class 'lib389.DirSrv'> with %2frun%2fslapd-localhost.socket
DEBUG: Allocate <class 'lib389.DirSrv'> with prereserve-1mt-rhel-10.0-20241220.0-5973-2025-01-09-08-51:389
DEBUG: Allocate <class 'lib389.DirSrv'> with prereserve-1mt-rhel-10.0-20241220.0-5973-2025-01-09-08-51:389
DEBUG: open(): Connecting to uri ldapi://%2frun%2fslapd-localhost.socket
DEBUG: Using dirsrv ca certificate /etc/dirsrv/slapd-localhost
DEBUG: Using external ca certificate /etc/dirsrv/slapd-localhost
DEBUG: Using /etc/openldap/ldap.conf certificate policy
DEBUG: ldap.OPT_X_TLS_REQUIRE_CERT = 2
DEBUG: open(): Using root autobind ...
DEBUG: open(): bound as None
DEBUG: Retrieving entry with [('',)]
DEBUG: Retrieved entry [dn:
vendorVersion: 389-Directory/3.0.5 B2024.351.0000

]
Deleting Role cn=test_role,dc=example,dc=com :
Type 'Yes I am sure' to continue: Yes I am sure
DEBUG: cn=test_role,dc=example,dc=com delete
Successfully deleted cn=test_role,dc=example,dc=com
INFO: Command successful.

#dsidm localhost -b dc=example,dc=com role list
test_role

#dsidm localhost -b dc=example,dc=com role get test_role
dn: cn=test_role,dc=example,dc=com
cn: test_role
objectClass: nsSimpleRoleDefinition
objectClass: nsManagedRoleDefinition
objectClass: nsRoleDefinition
objectClass: ldapSubEntry
objectClass: top

@mirielka mirielka added the needs triage The issue will be triaged during scrum label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage The issue will be triaged during scrum
Projects
None yet
Development

No branches or pull requests

1 participant