summaryrefslogtreecommitdiffstats
path: root/base/common/python
Commit message (Collapse)AuthorAgeFilesLines
...
* Added server management library.Endi S. Dewata2015-01-281-3/+3
| | | | | | | | | | | | | | | The PKISubsystem and PKIInstance classes used by the upgrade framework have been converted into a server management library. They have been enhanced to provide the following functionalities: * starting and stopping instances * enabling and disabling subsystems * checking instance and subsystem statuses The validate() invocation has been moved out of the constructors into the upgrade framework such that these objects can be created to represent subsystems and instances that do not exist yet. https://fedorahosted.org/pki/ticket/1183
* Improvements for KeyClient.archive_encrypted_data().Endi S. Dewata2014-11-251-26/+41
| | | | | | | | | The archive_encrypted_data() in KeyClient has been modified to have a default value for the algorithm OID and to take a nonce IV object instead of the base-64 encoded value. https://fedorahosted.org/pki/ticket/1155 https://fedorahosted.org/pki/ticket/1156
* Fixed incorrect Python API docs format.Endi S. Dewata2014-10-282-51/+55
| | | | | | | The Python API docs in some classes/methods have been fixed to remove the errors and warnings generated by python-sphinx. https://fedorahosted.org/pki/ticket/1157
* Updates to some python client classes for prettier API docs.Ade Lee2014-10-279-41/+398
| | | | | Added missing .rst annotations and missing docstrings. Added log file for sphinx runs.
* Added Python Client API Docs to buildAde Lee2014-10-274-0/+461
| | | | | | | This patch builds HTML and man page builds for the python client API delivered in pki-base. Ticket 1157
* Fixed pylint failure on F21.Endi S. Dewata2014-10-271-2/+2
| | | | | The build failed on F21 due to stricter pylint requirements which generate new warnings. For now they are marked to be ignored.
* Updated KRA Python client library.Endi S. Dewata2014-10-092-13/+30
| | | | | | | | | | | | | | | The Python client library for KRA has been modified to simplify the usage. The NSSCryptoProvider's setup_database() and __init__() now take a password file parameter. The import_cert() now can take either cert binary/encoded data or CertData object. It also provides a default value for the trust attribute. The KRAClient now stores the crypto provider object. The KRA test has been updated to provide options to override the default test configuration (e.g. hostname, port). It also has been modified to use a temporary NSS database. The setup document has been updated to describe the process to run the test as root and as a regular user.
* Generate asymmetric keys in the DRM.Abhishek Koneru2014-08-271-13/+103
| | | | | | | | | | | | Adds methods to key client to generate asymmetric keys using algorithms RSA and DSA for a valid key sizes of 512, 1024, 2048,4096. The generated keys are archived in the database. Using the CLI, the public key(base64 encoded) can be retrieved by using the key-show command. The private key(base64 encoded) can be retrieved using the key-retrieve command. Ticket #1023
* Fix enroll_cert in cert.py to account for rejected requestsAde Lee2014-08-181-21/+73
| | | | | As per review, modified to return CertEnrollmentResult objects. Ticket 1109
* Refactoring ProfileClient to remove the property fields.Abhishek Koneru2014-07-114-347/+147
| | | | | | | | | | | | | Replaced the usage of python property feature with a dict for attribute name conversion. Fixed an issue caused to traversing the NOTYPES dict in encoder.py to find the instance of an object. The traversal causes an issue in the presence of subclassing. Modified method attr_name_conversion to return a new dictionary with modified attribute names rather than making changes to the object's __dict__.
* Fixed transport certificate delimiters.Endi S. Dewata2014-07-091-2/+2
| | | | | | | | | | The REST service and client library have been fixed to use the correct delimiters for transport certificate. The REST service was also modified to insert a new line between the header and the certificate data. Ticket #1063
* Refactored SystemCertClient.get_transport_cert().Endi S. Dewata2014-07-073-3/+10
| | | | | | | | | | | | | | | To simplify the usage, the SystemCertClient.get_transport_cert() has been modified to parse and decode the PEM certificate in CertData object, store the DER certificate back into the object, and return the CertData object to the client. This way the client will have access to the certificate attributes and both PEM and DER certificates. The PKIService.sendConditionalGetResponse() has been fixed to use the requested format. This is needed to display the transport certificate properly in the browser. Ticket #1062
* Renamed CryptoUtil to CryptoProvider.Endi S. Dewata2014-07-033-9/+9
| | | | | | | | The CryptoUtil classes in the Python client library has been renamed to CryptoProvider for consistency with the Java client library. The cryptoutil.py module has been renamed to crypto.py. Ticket #1042
* Added methods for providing file input for profile request.Abhishek Koneru2014-07-012-102/+541
| | | | | | Added new methods to allow user to provide file input to perform operations like create profile/modify profile. The supported file formats a re xml and json.
* Implemented remaining of the ProfileClient API.Abhishek Koneru2014-07-013-20/+225
| | | | | Provides methods to create/modify/delete a profile. Also adds put and delete methods to the PKIConnection object.
* Fixes for #1040 and #1041 in cert and key python modulesAbhishek Koneru2014-06-274-286/+175
| | | | | | | | | | Ticket 1040 - Perform null checks on JSON attributes. Ticket 1041 - Rename module kraclient to kra. Also refactored the code in cert module removing the usage of property. Achieved the conversion of names(camelCase to '_' separated ) using a dictionaries in the objects. The default method in encoder module has also been modified to perform the reverse conversion.
* Fixed NumberFormatException in key-request-find.Endi S. Dewata2014-06-201-1/+4
| | | | | | | | | | | Previously if a key archival failed, the REST service would return an invalid key URL, which would cause an exception when the CLI tried to parse it. The service has been fixed to return a null URL which can be detected to avoid parsing invalid value. The Python library has been modified to handle missing key URL. Ticket #1043
* Addressed comments given for patches 92-2, 93, 94.Abhishek Koneru2014-06-034-230/+417
| | | | | | | Addressed review comments for the patches that implement the CertClient and a part of ProfileClient. Also includes the pycharm project files in pki/.idea.
* Initial patch for ProfileClient implementationAbhishek Koneru2014-06-031-1/+356
| | | | | | | This patch adds methods for listing profiles, retrieving aprofile, enabling a profile and disabling a profile. It also contains few cosmetic changes in account.py and client.py(pycharm PEP8 warnings addressed)
* Added methods in CertClient for CertRequestResourceAbhishek Koneru2014-06-032-10/+1261
| | | | | | | | | Adds the methods for fetching the enrollment templates, creating the enrollment requests, submitting the requests, performing actions(approve, reject, cancel etc.) on the requests. Also defined the classes needed for representing data used to perform the above mentioned operations.
* formatting fixes in python client code for pycharmAde Lee2014-05-2911-303/+427
|
* latest changes for code reviewAde Lee2014-05-292-37/+56
|
* Added security domain functionality to python APIAde Lee2014-05-291-5/+44
| | | | | | | | | Currently the security domain python API just extracts the security domain name from the json returned by the server. This patch allows it to extract and use all the information in the response. This info is needed to determine the state of the security domain for the IPA vault case.
* fix issues identified by pycharm for system.pyAde Lee2014-05-291-15/+15
|
* Fix formatting issues identified by pycharm in key.pyAde Lee2014-05-291-141/+161
|
* Implemented CertResource methods in CertClient on the python side.Abhishek Koneru2014-05-294-139/+424
| | | | | | | | The methods currently implemented in the CertClient are: get_cert(), review_cert(), list_certs(), revoke_cert(), revoke_ca_cert(), hold_cert(), unrevoke_cert() Also included some test code in main method.
* Refactoring KeyClient class and crypto classes.Abhishek Koneru2014-03-311-22/+35
|
* Changes to KeyClient on the java side.Abhishek Koneru2014-03-191-1/+1
| | | | | The KeyClient class on the java side is modified to have a similar design as the KeyClient class on the python side.
* Modify return object for retrieve_key(key_id, twsk)Abhishek Koneru2014-03-061-10/+13
| | | | | | | Modify the return type of the function retrieve_key(key_id, trans_wrapped_session_key) from returining a tuple KeyData, unwrapped_key to KeyData by setting the unwrapped_key to KeyData.private_data attribute for the case where trans_wrapped_session_key is not provided by the caller.
* Get archival working for python key clientAde Lee2014-03-052-26/+35
|
* Fixes for coments from reviewAde Lee2014-02-262-76/+126
|
* Add ability to archive without sending pkiArchiveOptions object.Ade Lee2014-02-262-70/+118
| | | | | | With this patch, you can now either send a pkiArchiveOptions object or the exploded parameters. This reduces the processing required on the client side.
* Make generate_symmetric_key more generic.Ade Lee2014-02-262-8/+27
| | | | | | Added a method generate_session_key() which should be used when wrapping secrets for the drm. For now, this has to be a 168-bit 3DES symmetric key.
* Added error checking in python client callsAde Lee2014-02-261-16/+86
| | | | | | | | | 1) Added error checking in python client calls. 2) Allow symmetric key generation with default params. Fix bug for when usages is not defined. 3) Fix bug when requesting key recovery - must check if key exists. 4) Extend key gen to allow for providing trans_wrapped_session_key 5) added constants to python client for key status
* Moved key functions out of kraclient.pyAde Lee2014-02-263-295/+261
|
* reame client_id to client_key_idAde Lee2014-02-263-21/+24
|
* Add getActiveKey() to the python clientAde Lee2014-02-261-0/+9
|
* Add methods to create nss certdb and import certAde Lee2014-02-263-13/+63
| | | | | Also changed arguments so that all args and returns from CryptoUtil are unencoded.
* Fix minor issues from review.Ade Lee2014-02-264-40/+32
| | | | | 1. main function in SymKeyGenerationRequest does not use correct usages 2. from_dict -> from_json() for consistency
* Add methods to getKeyInfo and change key statusAde Lee2014-02-194-16/+34
|
* Added decorator to handle exceptionsAde Lee2014-02-196-118/+228
| | | | | | Decorator catches HttpErrorExceptions from Requests and extracts the relevant PKIException object, and rethrows it.
* Additional changes as per review.Ade Lee2014-02-195-419/+554
| | | | | | | | | | 1. Moved most methods back into the key.py module. 2. Simplified the invocation by combining the KeyClient and KeyRequestClient as just KeyClient. 3. Added additional invocations in KRAClient - with lots of docuemntation. These are hopefully more user friendly. 4. Extracted crypto operations to cryptoutil class. This class has an NSS implementation provided. 5. Addressed other issues found in review.
* Initial work on python APIAde Lee2014-02-194-5/+1086
| | | | | | | | This patch includes code for most of the python client library for the KeyResource and KeyRequestResource for the DRM. Some place holder code has been added for the CertResource, but this needs to be further refined and tested.
* Replaced Jettison with Jackson.Endi S. Dewata2014-02-061-5/+4
| | | | | | | | | The Jettison library has been replaced with Jackson library as JSON provider for RESTEasy. All class paths and the deployment tools have been updated accordingly. The Python library and the TPS UI have been updated as well to use the new JSON format. Ticket #817
* Debian: add init script functionalityAde Lee2014-01-081-0/+5
| | | | | | | | | | | | | | | The addtions in this patch will add start/stop/restart/status functionality to operations, so that Debian systems can perform these operations by calling these functions from an init script. We also introduce a parameter in the configuration scripts that can be used to determine if the system is a debian system. This parameter is used to specify a system V init script instead of a systemd script on a debian system, when the configuration scriptlets start and stop a system. Also source apparently does not work by default in debian. Used dot (.) instead.
* Moved web application context file.Endi S. Dewata2013-12-161-0/+15
| | | | | | | | | | | | | | The location of web application context file has been changed from <instance>/webapps/<name>/META-INF/context.xml into <instance>/conf/Catalina/localhost/<name>.xml. This will eventually allow deploying the web application directly from the shared folder. A new upgrade script has been added to move the context files in the existing instances. Ticket #499
* Backup upgrade tracker.Endi S. Dewata2013-10-312-3/+11
| | | | | | | | | The upgrade framework has been modified to backup the files used to track the upgrade progress. If the tracker file is also modified by the upgrade scriptlet, it will only keep the initial backup (before any modifications were made). Ticket #763
* Fixes for issues reported by pylint.Abhishek Koneru2013-07-182-1/+18
| | | | | | Fixed the warning W0202 - attributes defined outside init and error E0202 - An instance attribute hiding a method (which is actually an error in json.encoder.JSONEncoder line 157.)
* Fix issues reported by pylint.Abhishek Koneru2013-07-102-6/+6
| | | | | | | Fixed all warnings caused due to absolute import of modules in same package and not marking the regexes with an r when trying to match. Ticket #316
* Added support to backup folders during upgrade.Endi Sukma Dewata2013-07-082-26/+137
| | | | | | | The upgrade framework has been updated to support backup and restore operations for folders and their contents. Ticket #583