-
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
Run as UserID and Error handling changes #57
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
-Standardize SecurityRequestError Structure, merging IRRSMO00 Errors and that of RACF Errors with the smae internal structure in the result dictionary -Add an install script that defines IRR.IRRSMO00.PRECHECK with UACC of none and/or checks if the profile exists and the current user's access -Added NullResponseError -Added Unit Testing for Install script and null response error Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
-Add parameters to irrsmo00.c for userid and userid_len -Add code in irrsmo00 that can process a userid and pass it and length to c code -Add methods to security admin object that allow for changing executing userID -Add ImproperUSerIDError to enforce userid changes to theoretically valid ids Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Make changes to be compatible with 3.10 typing library Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Change type of default userid parm passed to irrsmo00. Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Also allow for run as userid to be specified in object creation Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
-Fold Surrogat error (run as userid attempted with no access defined) that yields no response into Null Response Error -Use surfaced return and reason codes from IRRSMO00 to differentiate null response errors -Add get_user_access to resource admin -Add unit testing for all of it -move custom traits testing under common folder Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
-Update type hints and error message to bring in line with doc Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Nov 28, 2023
lcarcaramo
reviewed
Nov 28, 2023
lcarcaramo
reviewed
Nov 28, 2023
lcarcaramo
reviewed
Nov 28, 2023
lcarcaramo
reviewed
Nov 28, 2023
lcarcaramo
reviewed
Nov 28, 2023
Change UserID to UserId refactor call_racf change error text strings Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Nov 29, 2023
lcarcaramo
reviewed
Nov 29, 2023
lcarcaramo
reviewed
Nov 29, 2023
lcarcaramo
reviewed
Nov 29, 2023
lcarcaramo
reviewed
Nov 29, 2023
lcarcaramo
reviewed
Nov 29, 2023
lcarcaramo
reviewed
Nov 29, 2023
lcarcaramo
reviewed
Nov 29, 2023
tests/resource/resource_result_samples/extract_resource_result_precheck_error.xml
Outdated
Show resolved
Hide resolved
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Change comment string for DownstreamFatalError Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
ca86ab8
to
588449f
Compare
lcarcaramo
reviewed
Dec 19, 2023
lcarcaramo
reviewed
Dec 19, 2023
lcarcaramo
reviewed
Dec 19, 2023
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Function testing revealed a couple of bugs in how the response value from the c code was parsed in python. This resolves that issue. Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Dec 20, 2023
f9ed423
to
9faf205
Compare
pass pointers to return codes rather than values. Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
9faf205
to
37b2214
Compare
Add Function Test for DownstreamFatalError (Null Response checking is based off something unit testing does not fully check) Add real error messages to tests in Add operations that surface error from initial extract. Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Dec 21, 2023
Changed docstring for DownstreamFatalError Update version number to 1.0b3 for next release Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
ElijahSwiftIBM
added a commit
that referenced
this pull request
Dec 26, 2023
Make documentation wording adjustments in accordance to code changes of PR #57 Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
reviewed
Jan 3, 2024
Change type hints for get_running_userid to Union[str, None] Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
lcarcaramo
approved these changes
Jan 4, 2024
This was referenced Jan 4, 2024
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: #44 #48 #45 #43
💻 What does this address?
Addresses listed issues in pyRACF's error handling and associated processing.
Adds entirely new feature to run commands as another user. This requires specific RACF authorizations.
📟 Implementation Details
Changed call to IRRSMO00 to pass in optional userid parameter which is set at the SecurityAdmin structure level. This can be set at object creation or with public access methods. The "running userid" when it exists is added to the securityResult dictionary for logging/tracking purposes.
Also changed call to IRRSMO00 to return more information than just xml string. With full return and reason codes, NullResponseErrors can be differentiated by their causes. This is also why this PR contains code from #53 and makes it redundant.
📋 Is there a test case?
Designed new test cases for new error, install script, and run as userid functions under "common" test cases. Tested new SecurityRequestError functions with existing user and group error tests