-
Notifications
You must be signed in to change notification settings - Fork 5
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
Robust error handling #26
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Used "Fail on first error flag" which should stop Add requests from inadvertently altering existing users -Added AlterOperationError and raise this when Alter cannot extract the target profile before performing its operation
Access and Connection Admin had no difference between Add and Alter commands. The operations "under the covers" were exactly the same. Now that other function groups have more differences, these are merged to alter.
Throw InvalidSegmentTraitError when there is an invalid segment trait combination. Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Unit test to confirm that Alters for Group, Resource, User and Data Set Admin all throw AlterOperationError when failing in the EXTRACT step. Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Added Invalid Segment Name Error Pluralized SETROPTS gettrs/settrs and changed type hints Change name of alter connection and alter access Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
-Used preliminary extract to determine if add is valid (in user) -Updated unit testing framework to account for this -Moved checking of redacted secrets and debug logging to alter (for User) due to Add changes Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Pull Dev Changes and Fix resulting conflicts Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Add Unit Testing for list and string forms of multiple "classes" passed to Setropts Admin Settrs Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Move Testing of debug logging to Alter in Group, DataSet and Resource Admins Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
General_command_classes -> Generic_command_classes set/remove grpacc in connection admin to give/take away grpacc Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Oct 27, 2023
Added Alter=True to Connection, Access, and Setropts Admin's Add/Alter command to establish operation flags. Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
lcarcaramo
reviewed
Oct 27, 2023
correction for bad find/replace Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Base:ID was NOT extraneous in Access Admin, changed to AUTH_ID Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Oct 29, 2023
lcarcaramo
reviewed
Oct 29, 2023
lcarcaramo
reviewed
Oct 29, 2023
lcarcaramo
reviewed
Oct 29, 2023
lcarcaramo
reviewed
Oct 29, 2023
Formatting and Docstring Changes Also added result parser test for custom secrets on userid alter. Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Oct 30, 2023
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
ElijahSwiftIBM
force-pushed
the
robust-error-handling
branch
from
October 30, 2023 17:28
9fd222b
to
eead54f
Compare
lcarcaramo
approved these changes
Oct 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
💡 Issue Reference
Issue: #12
💻 What does this address?
Some of the functions of pyracf have a lot of functional overlap that can lead to issues, and there was very little input validation. Admin.Add functions could "alter" resource profiles that already existed and Admin.Alter functions could "add" new ones. This can lead to typos making changes to existing profiles or creating new ones that were unintentional.
📟 Implementation Details
New error objects were created:
Additionally, I took this opportunity to pluralize Setropts Getters/Setters that were already capable of taking multiple classes as arguments and adjusting the type hints accordingly, as well as some other small name changes and bug fixes prior to beta release.
📋 Is there a test case?
Testing suite was also updated. Testing of debug logging and secrets redaction were moved to ALTER functions rather than ADD as ADD lacks the consistent structure to test successes and failures with the new input validation and error cases. Each new error case is also tested. Additional testing was added to confirm pluralized Setropts functions work as now documented and referenced.