Skip to content

Additional rcudb validation #1396

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

Merged
merged 7 commits into from
Feb 17, 2023
Merged

Additional rcudb validation #1396

merged 7 commits into from
Feb 17, 2023

Conversation

jshum2479
Copy link
Member

This PR adds more validations to RCUDbinfo:

(1) databaseType must be ATP, SSL or ORACLE
(2) check for file existence for data source params property that reference file: keystore, truststore
(3) log RCU data source driver param setting to assist diagnostics

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 17, 2023
@@ -272,6 +272,11 @@ def __run_rcu(self):
rcu_sys_pass = rcu_db_info.get_preferred_sys_pass()
rcu_schema_pass = rcu_db_info.get_preferred_schema_pass()

databaseType = rcu_db_info.get_database_type()
if databaseType is not None and databaseType not in ['SSL', 'ATP', 'ORACLE']:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this list a constant in case we ever need to use it elsewhere and/or change the items in the list.

self.__set_connection_property(location, DRIVER_PARAMS_NET_FAN_ENABLED, 'false')
self.__set_connection_property_info(location, DRIVER_PARAMS_TRUSTSTOREPWD_PROPERTY, truststore_pwd,
properties_set, encrypted=True)
self.__set_connection_property_info(location, DRIVER_PARAMS_NET_SSL_VERSION, '1.2', properties_set)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the SSL version value should be a constant since presumably, it may change in the future?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@robertpatrick robertpatrick merged commit 20b4c27 into main Feb 17, 2023
@robertpatrick robertpatrick deleted the additional-rcudb-validation branch February 17, 2023 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants