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

feat: Introduce option to delete enrollment requests that are denied/revoked #670

Merged
merged 10 commits into from
Oct 15, 2024

Conversation

srieteja
Copy link
Contributor

@srieteja srieteja commented Sep 24, 2024

Closes #628

- What I did

  • Introduce an option to allow deletion of enrollment requests (for denied/revoked enrollments only)

- How I did it

  • Introduced 'delete' as an option in the at_activate argParser
  • Introduced a delete-command parser which considers enrollmentId mandatory
  • Introduce a new method deleteDeniedEnrollment which sends a delete request to the server and parses the server response.

- How to verify it

  • Manual testing has been done.
  • To test the changes, send an enrollment request then deny/approve+revoke it. Then run at_activate with the delete option which requires the atsign and enrollmentId. The enrollment should be deleted.

@gkc
Copy link
Contributor

gkc commented Oct 8, 2024

@srieteja @sitaram-kalluri Is this blocked by something?

@srieteja
Copy link
Contributor Author

srieteja commented Oct 8, 2024

@srieteja @sitaram-kalluri Is this blocked by something?

I was waiting for the server-side changes to be released. Server-side changes were released by @sitaram-kalluri last week. I will test this again and get it ready for review over the coming weekend.

@gkc
Copy link
Contributor

gkc commented Oct 8, 2024

@srieteja You should stay focused on the C impl of at_activate.
@sitaram-kalluri can you pick this up please?

@sitaram-kalluri
Copy link
Member

@srieteja You should stay focused on the C impl of at_activate.
@sitaram-kalluri can you pick this up please?

@gkc : Sure, I will pick this up.

@sitaram-kalluri
Copy link
Member

sitaram-kalluri commented Oct 9, 2024

Tested the deletion of enrollment and works as expected. Attaching the test log:

Deleting a revoked enrollment:

sitaram@sitaram-ThinkPad-E14:~/IdeaProjects/atsign/core/at_libraries/packages/at_onboarding_cli/bin$ dart activate_cli.dart revoke -a @alice🛠 -r vip.ve.atsign.zone -k ~/.atsign/keys/\@alice🛠_key.atKeys -i 19f571bb-25a7-409d-80cb-984f2bc882a6
Connecting ... Connected
Revoking enrollmentId 19f571bb-25a7-409d-80cb-984f2bc882a6
Server response: data:{"status":"revoked","enrollmentId":"19f571bb-25a7-409d-80cb-984f2bc882a6"}

sitaram@sitaram-ThinkPad-E14:~/IdeaProjects/atsign/core/at_libraries/packages/at_onboarding_cli/bin$ dart activate_cli.dart delete -a @alice🛠 -r vip.ve.atsign.zone -k ~/.atsign/keys/\@alice🛠_key.atKeys -i 19f571bb-25a7-409d-80cb-984f2bc882a6
Connecting ... Connected
Sending delete request
Server response: {"enrollmentId":"19f571bb-25a7-409d-80cb-984f2bc882a6","status":"deleted"}
sitaram@sitaram-ThinkPad-E14:~/IdeaProjects/atsign/core/at_libraries/packages/at_onboarding_cli/bin$ 

Deleting a denied enrollment:

sitaram@sitaram-ThinkPad-E14:~/IdeaProjects/atsign/core/at_libraries/packages/at_onboarding_cli/bin$ dart activate_cli.dart deny -a @alice🛠 -r vip.ve.atsign.zone -k ~/.atsign/keys/\@alice🛠_key.atKeys -i 6458cf5d-7a92-4404-a460-412a2f7ac08b
Connecting ... Connected
Denying enrollmentId 6458cf5d-7a92-4404-a460-412a2f7ac08b
Server response: data:{"status":"denied","enrollmentId":"6458cf5d-7a92-4404-a460-412a2f7ac08b"}

sitaram@sitaram-ThinkPad-E14:~/IdeaProjects/atsign/core/at_libraries/packages/at_onboarding_cli/bin$ dart activate_cli.dart delete -a @alice🛠 -r vip.ve.atsign.zone -k ~/.atsign/keys/\@alice🛠_key.atKeys -i 6458cf5d-7a92-4404-a460-412a2f7ac08b
Connecting ... Connected
Sending delete request
Server response: {"enrollmentId":"6458cf5d-7a92-4404-a460-412a2f7ac08b","status":"deleted"}

@gkc
Copy link
Contributor

gkc commented Oct 9, 2024

@sitaram-kalluri Let's also wait to release this until this bug fix has been released

@gkc
Copy link
Contributor

gkc commented Oct 9, 2024

@sitaram-kalluri I am going to merge this PR's changes into #682 since they are all related and I've made a number of changes in #682 related to the tests

@sitaram-kalluri
Copy link
Member

@sitaram-kalluri I am going to merge this PR's changes into #682 since they are all related and I've made a number of changes in #682 related to the tests

Sure, @gkc

@gkc
Copy link
Contributor

gkc commented Oct 9, 2024

All of this PR's commits are now included in #682

@gkc gkc marked this pull request as draft October 9, 2024 12:01
@gkc
Copy link
Contributor

gkc commented Oct 9, 2024

Marked as draft since all of this PR's changes are now entirely included in #682

@murali-shris murali-shris merged commit 63eeb69 into trunk Oct 15, 2024
11 checks passed
@gkc gkc deleted the at_activate_remove_denied branch October 15, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

at_activate being able to delete denied entries in list
4 participants