This PR includes numerous updates that at a high level gets User Administration fully ready for the Beta release, converts our build backend to Poetry, fixes some bugs, and makes a few enhancements. I will do my best to cover everything here.
:pager: Implementation Details
GitHub actions configuration is now updated to drive everything through Poetry.
Pre-commit hooks are now updated to use Poetry to drive everything (This may make it easier for some people to use the commit hooks).
Updates to Contribution Guidelines for using Poetry for dependency management, building a development environment, and setting up pre-commit hooks.
Introduce recommended branch naming conventions in Contribution Guidelines.
Updates to Jenkinsfile to Use Poetry to drive build, test, and deploy to PyPi. This has been tested and validated, but currently does not work due to issues with the build system. For more details, please see: https://github.com/ambitus/pyracf/issues/21
Updates to Jenkinsfile to publish source distributions to GitHub releases in addition to wheels.
Update version number and classifiers in build metadata in anticipation of initial beta release.
Expend all segment trait names to be clearer and more descriptive.
Fix bug where redacted result result XML gets truncated and added a corresponding regression test.
Fixed bug where redaction is attempted when a delete request is made for a secret trait resulting in request XML in debugging logging being displayed incorrectly along with corresponding regression tests.
SecurityAdmin._get_field to has a keyword argument that enables values pulled from the result dictionary to be auto casted to strings for when a field is expected to be a string value but profile extract auto casts the value to a non-string value. This feature is fully leveraged in UserAdmin for getter functions that return string values.
_extracted_key_value_pair_segment_traits_map class attribute added to allow short trait names in extracted segments to be expanded to more descriptive names that correspond to the _valid_segment_traits mappings. This functionality is implemented in SecurityAdmin so it can be inherited in all other function groups and used where it makes sense. This feature has been fully leveraged in UserAdmin for all of the initial Beta traits where it makes sense.
Added standardized formatting of revoke date and resume date since they appear in a different date format from the julian dates, which were the only date formats that we encountered until now. This update helps ensure that all date values use the same format in extracted user profiles.
_case_sensitive_extracted_values class attribute added to ensure that case sensitive traits (which are uncommon) do not get converted to lowercase. For example, an OMVS home directory of /u/SQUIDWRD should not be converted to all lowercase. This feature can be inherited and used in all other function groups where it makes sense.
Profile extract now takes a segments list instead of a segments dictionary to make interface more concise, and because it is functionally useless to be able to specify segments={"segment": False}. A syntax of segments=["segment] is better.
Full validation and implementation of getters and setters for the following user traits:
Revoke Date
Resume Date
Owner
Name
OMVS Max Address Space Size
OMVS Max CPU Time
OMVS Max Files Per Process
OMVS Max Non-Shared Memory
OMVS Max File Mapping Pages
OMVS Max Processes
OMVS Max Shared Memory
OMVS Max Threads
TSO Account Number
TSO Logon Command
TSO Hold Class
TSO Max Region Size
TSO Message Class
TSO Logon Procedure
TSO Default Region Size
TSO Sysout Class
TSO User Data
TSO Data Set Allocation Unit
Extracted values of "unknown" get converted to None.
I think that is it.
:clipboard: Is there a test case?
Running the unit tests should show that everything works properly. As noted for the Poetry conversion, this has been validated, but the Jenkins build currently does not work because of a system configuration issues as noted above.
Please let me know if you have any question or if there are any issues.
:bulb: Issue Reference
Use Poetry Build Backend Instead of Setup tools: https://github.com/ambitus/pyracf/issues/19 Fix Secrets Redaction Bug: https://github.com/ambitus/pyracf/issues/20
:computer: What does this address?
This PR includes numerous updates that at a high level gets User Administration fully ready for the Beta release, converts our build backend to Poetry, fixes some bugs, and makes a few enhancements. I will do my best to cover everything here.
:pager: Implementation Details
SecurityAdmin._get_field
to has a keyword argument that enables values pulled from the result dictionary to be auto casted to strings for when a field is expected to be a string value but profile extract auto casts the value to a non-string value. This feature is fully leveraged inUserAdmin
for getter functions that return string values._extracted_key_value_pair_segment_traits_map
class attribute added to allow short trait names in extracted segments to be expanded to more descriptive names that correspond to the_valid_segment_traits
mappings. This functionality is implemented inSecurityAdmin
so it can be inherited in all other function groups and used where it makes sense. This feature has been fully leveraged inUserAdmin
for all of the initial Beta traits where it makes sense._case_sensitive_extracted_values
class attribute added to ensure that case sensitive traits (which are uncommon) do not get converted to lowercase. For example, an OMVS home directory of/u/SQUIDWRD
should not be converted to all lowercase. This feature can be inherited and used in all other function groups where it makes sense.segments={"segment": False}
. A syntax ofsegments=["segment]
is better."unknown"
get converted toNone
.I think that is it.
:clipboard: Is there a test case?
Running the unit tests should show that everything works properly. As noted for the Poetry conversion, this has been validated, but the Jenkins build currently does not work because of a system configuration issues as noted above.
Please let me know if you have any question or if there are any issues.