Skip to content

Geowave 811 rebase#1076

Merged
rfecher merged 8 commits intomasterfrom
GEOWAVE-811-rebase
Apr 27, 2017
Merged

Geowave 811 rebase#1076
rfecher merged 8 commits intomasterfrom
GEOWAVE-811-rebase

Conversation

@mcarrier7
Copy link
Copy Markdown
Contributor

No description provided.

mcarrier7 and others added 5 commits April 5, 2017 17:49
… from a variety of sources, as well as supporting password decryption for passwords stored in encrypted form
… from a variety of sources, as well as supporting password decryption for passwords stored in encrypted form
… from a variety of sources, as well as supporting password decryption for passwords stored in encrypted form
String value = existingProps.getProperty(storeFieldName);
String encryptedValue = value;
try {
encryptedValue = new SecurityUtils().encryptAndHexEncodeValue(value);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

static method and pass in resourceLocation


final String password = (System.getProperty("password") != null) ? System.getProperty("password") : "password";
// GeoWave:811 - providing ability to support encrypted passwords
final String password = new SecurityUtils()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

static method and pass in resourceLocation

else {
try {
// if password in config props is encrypted, need to decrypt it
pass = new SecurityUtils().decryptHexEncodedValue(pass);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

static method and pass in resourceLocation

this.password = password;
// GeoWave:811 - providing ability to support encrypted passwords
try {
this.password = new SecurityUtils().decryptHexEncodedValue(password);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

static method and pass in resourceLocation

// final String password = (System.getProperty("password") != null) ?
// System.getProperty("password") : "password";
// GeoWave:811 - providing ability to support encrypted passwords
final String password = new SecurityUtils()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

static method and pass in resourceLocation

ConfigOptions.writeProperties(
getGeoWaveConfigFile(params),
configProps);
System.out.println("GeoServer Config Saved");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can log if necessary, is there a reason for system.out here?

String encryptedValue = new SecurityUtils().encryptAndHexEncodeValue(
rawInput,
tokenFile.getCanonicalPath());
System.out.println("encryptedValue: " + encryptedValue);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can log if necessary, is there a reason for system.out here?

String decryptedValue = new SecurityUtils().decryptHexEncodedValue(
encryptedValue,
tokenFile.getCanonicalPath());
System.out.println("decryptedValue: " + decryptedValue);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can log if necessary, is there a reason for system.out here?

gsConfig);
gsConfigProperties);

System.out.println("GeoServer Config Saved");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can log if necessary, is there a reason for system.out here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can switch to a log statement. The system.out was there previously and I didn't think to change it

+ File.separator + ConfigOptions.GEOWAVE_CACHE_FILE));
}

public String getUrl() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

now that we are checking for https within the client, it seems like it may make sense to use https:// on line 124 if we detect a port that ends with 443

mcarrier7 and others added 2 commits April 26, 2017 12:17
…ng un-used methods. Adding a new URLUtils class which helps reduce redundant URL validation in a few places across codebase. Also adding feature to allow encryption to be enabled or disabled through configs. At this point, encryption should be done only when writing to the properties file, and then decrypted when loading from the properties. This should reduce the places where we are trying to decrypt values
@rfecher rfecher merged commit b761273 into master Apr 27, 2017
@rfecher rfecher deleted the GEOWAVE-811-rebase branch April 27, 2017 20:31
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.

2 participants