Skip to content

Wdt automate tokenize credentials #473

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 22 commits into from
Nov 12, 2019
Merged

Conversation

CarolynRountree
Copy link
Contributor

discoverDomain changed to automatically replace password attribute values with a property token, and the property written a specified variable file IF the -variable_file argument is included on the command line.

This will work in conjunction with any variable injector directives the user specifies.

Additionally addresses Issue #446.
…/weblogic-deploy-tooling into WDT-automate-tokenize-credentials
rakillen
rakillen previously approved these changes Nov 6, 2019
@ddsharpe
Copy link
Member

ddsharpe commented Nov 6, 2019

the default variable file, model.properties, is zeroed out even if I do not put the -variable_file argument on the command line

@ddsharpe
Copy link
Member

ddsharpe commented Nov 6, 2019

These properties for the datasources are really long. Is it hard to shorten them?
Currently:
JDBCSystemResource.Derek-DataSource.JdbcResource.JDBCDriverParams.PasswordEncrypted=

Suggested alternatives:
Derek-DataSource.PasswordEncrypted=
Datasource.Derek-DataSource.PasswordEncrypted=
JDBCSystemResource.Derek-DataSource.PasswordEncrypted=

@CarolynRountree
Copy link
Contributor Author

These properties for the datasources are really long. Is it hard to shorten them?
Currently:
JDBCSystemResource.Derek-DataSource.JdbcResource.JDBCDriverParams.PasswordEncrypted=

Suggested alternatives:
Derek-DataSource.PasswordEncrypted=
Datasource.Derek-DataSource.PasswordEncrypted=
JDBCSystemResource.Derek-DataSource.PasswordEncrypted=

One algorithm I can think of is to replace every MBean/Name pair, with Name, and remove each singleton MBean, except for the last one. So that the long name above becomes
Derek-DataSource.JDBCDriverParams.PasswordEncrypted - Richard, Derek any more ideas on how to get it shorter with an automated algorithm?

@@ -197,5 +197,30 @@ def testDictOrderedDictUpdate(self):
self.assertEqual('entry1' in dict1 and 'entry2' in dict1, True,
"expected ordereddict1 to contain 'entry1' and 'entry2' keys")

# def testOrderedDictSort(self):
Copy link
Member

Choose a reason for hiding this comment

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

Why did DS add this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought PyOrderedDict had a problem. This test exposed an issue with my own logic, so I asked him to add it permanently. It's a simple to test to sort a dictionary by keys, and add the items to the dictionary in this sorted order. The PyOrderedDict simply cares about the order you add them, but its a good example of how to sort a dictionary with our OrderedDict

def __format_variable_name(self, location, attribute):
_method_name = '__format_variable_name'
def get_folder_short_name(self, folder_name):
_method_name = '_match_short_top_folder'
Copy link
Member

Choose a reason for hiding this comment

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

Method name is 'get_folder_short_name'

rakillen
rakillen previously approved these changes Nov 12, 2019
rakillen
rakillen previously approved these changes Nov 12, 2019
@ddsharpe ddsharpe merged commit 9bd9c78 into master Nov 12, 2019
@ddsharpe ddsharpe deleted the WDT-automate-tokenize-credentials branch November 27, 2019 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants